gtfs-validator
gtfs-validator copied to clipboard
Implement trip sequence duplicate verification (GTFS rule)
Is your feature request related to a problem? Please describe. A stop should not be duplicated in a trip stop sequence. This is a GTFS rule implemented in Google Python validator and featured in Google Type Error as TYPE_TRIP_DUPLICATES and TYPE_TRIP_WITH_DUPLICATE_STOPS.
Describe the solution you'd like Actual Google GTFS validator behaviour : verifies if a trip does not have multiple route types or does not have a duplicated stop in its stop sequence. https://github.com/google/transitfeed/blob/master/transitfeed/trip.py#L575
Describe alternatives you've considered
Additional context Line 130 and 146 in Error support priorities https://docs.google.com/spreadsheets/d/1vqe6wq7ctqk1EhYkgtZ0_TbcQ91vccfs2daSjn20BLE/edit#gid=0
@maximearmstrong Could you explain the implementation details of this one a little more, or link to the Python code?
I'm curious to know to what extent trips are tested to be the "same".
I rephrased the explanation above and added a link. A stop should not be duplicated in a trip stop sequence.
Ah, ok, thanks - so stop_sequence
should be unique within a trip - that makes sense.
@fabrice-v If this rule is checking for duplicate stop_sequence values within a trip, it's in spec.
I think this is covered now that we have introduced keys in the spec.
The primary key of stop_times.txt is (trip_id,
stop_sequence
). If we have a duplicate value for stop_sequence for one trip, the validator will emit the duplicate_key
notice