MobilityData / gtfs-realtime-validator

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

StopTimeUpdate stop/stop_sequence pairing must match GTFS? #51

Open isabelle-dr opened 2 years ago

isabelle-dr commented 2 years ago

Issue by barbeau October 20, 2017 Originally opened as https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/297


Summary:

We currently have rule "E045 - GTFS-rt stop_time_update stop_sequence and stop_id do not match GTFS" for this, but after this discussion it doesn't look like this is explictlly mentioned in the spec - see: https://groups.google.com/forum/#!topic/gtfs-realtime/BZOfsVeI2Cc

And StopTimeUpdate docs: https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-stoptimeupdate

A point to clarify in the current spec, and potential part of a proposal to add trips with new geometries dynamically, or a proposal to identify child stops of stations.

Note that changes in stop_sequence would also affect VehiclePosition.current_stop_sequence: https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-vehicleposition

isabelle-dr commented 2 years ago

Comment by barbeau October 30, 2017


More comments on a proposal regarding needing to better specify changes to trips, including changes to stop_sequence:

isabelle-dr commented 2 years ago

Comment by barbeau Aug 06, 2018


Also, it looks like Google and some producers are supporting changing stop_ids in the real-time feed to represent changing platforms at stations, when a platform assignment isn't known at static GTFS build time: https://groups.google.com/d/msg/gtfs-realtime/BZOfsVeI2Cc/gIUjGbkCBAAJ

In this case, changing from the parent station ID to the child stop ID is supported, which means that the stop sequence/ID pairing won't match GTFS by definition.

isabelle-dr commented 2 years ago

Comment by minhhpham Sept 29, 2018


We performed an analysis using transit-feed-quality-calculator and found these agencies that have stop/stop_sequence mismatch:

Feed Location
Cincinnati Metro Trip Updates Cincinnati, OH, USA
HART Trip Updates Tampa, FL, USA
Saskatoon Transit Trip Updates Saskatoon, SK, Canada
LTD Trip Updates Eugene, OR, USA
VIA Trip Updates San Antonio, TX, USA
ETS Trip Updates Edmonton, AB, Canada
MST Trip Updates Monterey, CA, USA
MBTA Trip Updates Boston, MA, USA
isabelle-dr commented 2 years ago

Comment by barbeau December 13, 2022


Per the discussion of supporting real-time stop assignments in GTFS Realtime (see proposal PR google/transit#219), we agreed NOT to enforce stop/stop_sequence pairing matching in the GTFS Realtime spec. If this changes, it will be part of the GTFS Service Changes v3.1 spec. So our rule in the validator related to this needs to change.

barbeau commented 2 years ago

Given that stop/stop_sequence pairing is a common error in feeds, but as discussed above there are also cases used in practice that the spec is silent on, I propose we make this a warning instead of error.

Specifically, the community adopted an official experimental practice that should replace the undocumented practice of platform changes - see https://github.com/google/transit/pull/219. We should warn producers using the undocumented practice that they should switch to the official experimental method of platform changes. This should help increase adoption of the experimental method.