MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
41 stars 10 forks source link

Check that there is at most one StopTimeUpdate for each stop in a trip #21

Open barbeau opened 2 years ago

barbeau commented 2 years ago

Issue by barbeau Wednesday Nov 30, 2016 at 18:52 GMT Originally opened as https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/35


For TripUpdate. This would generate an error. See https://groups.google.com/d/msg/gtfs-realtime/qNc7ButQbW8/tDwanvClBQAJ.

barbeau commented 2 years ago

Comment by barbeau Friday Jul 07, 2017 at 21:09 GMT


Note that there are a few existing rules/issues related to this, but that don't cover this issue exactly:

So it seems that a good implementation for a new rule here would be to implement a HashMap used to check that each stop_sequence appears only once for all stop_time_updates in a trip (to be implemented in StopTimeUpdateValidator). We can do the same with stop_id, but only for routes that don't include loops that visit a stop_id more than once (i.e., if the trip_id key doesn't exist in GtfsMetadata.getTripsWithMultiStops() HashMap). It seems like this could actually replace E036 and E037 if it covers those scenarios.