CUTR-at-USF / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds. See https://github.com/MobilityData/gtfs-realtime-validator for the latest!
Other
93 stars 40 forks source link

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

Open barbeau opened 7 years ago

barbeau commented 7 years ago

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

barbeau commented 7 years ago

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.