Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underground stops connected to ground level street #127

Open
hbruch opened this issue Nov 7, 2021 · 0 comments
Open

Underground stops connected to ground level street #127

hbruch opened this issue Nov 7, 2021 · 0 comments

Comments

@hbruch
Copy link
Member

hbruch commented Nov 7, 2021

Expected behavior

Underground railway stops should be linked to platforms instead of streets at ground level.

Observed behavior

For VVS dataset, some underground rail stops are linked to ground level street.

grafik

grafik

Version of OTP used (exact commit hash or JAR name)

e151d7f

Data sets in use (links to GTFS and OSM PBF files)

VVS GTFS
RegBez Stuttgart OSM

Steps to reproduce the problem

Route from e.g. (48.71679, 9.11230) to (48.77194, 9.15522)

Thoughts

Currently, stops are snapped to the OSM street network either by TransitToTaggedStopsModule or StreetLinkerModule.

TransitToTaggedStopsModule requires that GTFS stop has a stop_code and OSM stop must exist as node with a matching ref attribute, which usually is the case for bus stops.

StreetLinkerModule on the other hand calls VertexLinker.linkVertexPermanently which does not consider any transit specific information, a TransitStopVertex is linked to it's closest reachable street node.

Solution idea:

A quick and dirty fix would be to filter for platformEdges in VertexLinker.linkToStreetEdges (probably only for Scope.PERMANENT , INITIAL_SEARCH_RADIUS_METERS and TraverseMode.WALK):

	Predicate<StreetEdge> platformEdgesOnlyIfRailStop = e -> true;
    if (vertex instanceof TransitStopVertex) {
      Set<TransitMode> modes = ((TransitStopVertex) vertex).getModes();
      if (modes.contains(TraverseMode.RAIL) || modes.contains(TransitMode.SUBWAY) || modes
              .contains(TransitMode.TRAM)) {
        platformEdgesOnlyIfRailStop = e -> (e.getStreetClass() & StreetEdge.CLASS_TRAIN_PLATFORM) > 0;
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant