conveyal / r5

Developed to power Conveyal's web-based interface for scenario planning and land-use/transport accessibility analysis, R5 is our routing engine for multimodal (transit/bike/walk/car) networks with a particular focus on public transit
https://conveyal.com/learn
MIT License
272 stars 71 forks source link

Routes added by modifications are not recognizable in paths output #909

Open abyrd opened 8 months ago

abyrd commented 8 months ago

The route IDs given in CSV path output are the GTFS route IDs when the routes are taken from a GTFS file. The IDs for routes created by modifications are randomly assigned, and in the path text/CSV there's no way to tell which modification created them.

It should be possible to change the way these IDs are assigned, but I don't believe the modification ID is currently available when constructing the R5 modification for this purpose.

The route_short_name and route_long_name fields that exist in GTFS also exist on the routes created by modifications, and are set to the name the user gave to the modification. There is a switch within the source code that will include these long/short names in the text output, but I believe the only way to enable that switch is changing source code.

We can't use user-supplied input as the ID for routes created by modifications, because other parts of the system must be able to assume these route IDs are unique. As long as modifications never make more than one route, the modification ID should be useable as a unique route ID. This still requires the user to look up modifications by ID to understand the paths. The same might be true with GTFS-supplied routes. The output is a lot easier to read if it includes user-specified names or GTFS-supplied short names that are not absolutely guaranteed to be unique but are immediately meaningful to the user.

abyrd commented 6 months ago

Any solution to this issue should be coordinated with #920. If we decide to add a new field revealing the feed scope of route and stop IDs, then that new field could also indicate a which modification a route came from using the unique modification ID (which is never expected to collide with any unique feed identifier).