Description
Follow-up conversation from this PR.
For now, if we have multiple OSM route_masters with the same ref
tag, we only keep the first one and discard the others.
But multiple lines with the same line number can be a thing. See examples in the PR in France and Ivory Coast.
OSM ref
tag is used to set these values in routes.txt files:
- route_short_name
- route_id (in the default creator and in some others creators)
source: https://github.com/grote/osm2gtfs/wiki/Source-for-GTFS-values
GTFS spec does not forbid to have duplicates on route_short_name
, but GTFS Best Practices discourages this practice.
But GTFS spec does forbid duplicates on route_id
.
How should we handle that ?
For now, we discard the duplicates and only keep the first one. The result in case of ref
duplicates is an incomplete GTFS.
We could also group all OSM lines with ref
duplicates under the same GTFS route.
It can be a strong option, unless if
- the lines have different
route_long_name
and actually represent a different public_transport line - the lines have different agency (example of bus lines Stigo 18 / Seine-et-Marne Express 18 that run in the same area)
- the lines have different public transport mode (Paris have a Tram 2 and a Metro 2 operating in almost the same area)
We could keep them distinct and create a GTFS route for each one of them, but we then need to change the route_id
construction process in the default creator. relation/{osm_id}
or osm_id
is a good option already used in some connectors.
What do you think ?