-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed Best Practice: always including trip_id in TripDescriptor for SCHEDULED trips #465
Comments
TransSee requires trip_id, but I haven't seen a feed without it, even for unscheduled trips. TransSee also benefits significantly from having route_id including. |
@doconnoronca Doesn't the static GTFS contain the relationship from trip to route? |
Yes, but it is an extra query to look it up. It is also needed for added trips. |
What if the route_id in a SCHEDULED trip update doesn't match what's in the GTFS? |
If that happens it's probably a symptom of bigger problems. The increased performance it worth the risk. |
I think this makes sense as a best practice. If most consumers only support matching on I will describe below why this proposed best practice has been difficult for my agency, and what we are doing about it. I don't think the difficulty means we shouldn't make this a best practice; I'm just noting some implications. Why this proposed best practice can be difficultThe proposed best practice of including Each Options for data producersAt my agency, we are currently writing some code that ingests the data coming out of our trackers and rewrites But if the industry is working toward a future where having matching Alternatively, I wonder if getting realtime tracker systems to use the Operational Data Standard for their schedule information would help--presumably if ODS is a superset of GTFS, trip_id values must match. But I haven't wrapped my head around the question of whether ODS would include both current and upcoming schedule info in a way that would correspond to the public GTFS Schedule file. |
This issue could be of use for this discussion: #462 |
In addition to what @willcanderson wrote, I think what is fundamentally missing is the relationship between GTFS Static version and GTFS-RT. This is #434 This is an everything is connected situation where a broader vision is important. |
Context
This issue is part of an effort to bring one of the outstanding issues we've identified from the Best Practices repos.
Issue
In the Realtime spec, producers can identify trips by either 1) having a trip_id that corresponds to the trip_id in GTFS Schedule, or 2) by including all of route_id, direction_id, start_date, and start_time instead.
However, based on conversation in #gtfs-realtime (you can join the Slack here), option 1 (using trip_id) is easiest and most commonly used by consumers. Option 2 causes headaches and sometimes isn't supported by consumers at all. As a result, it would make sense to recommend that producers use trip_id in all cases.
Proposed solution
Add a mention in the TripDescriptor trip_id description that for SCHEDULED trips that are not frequency-based, the identification of the trip should be done via trip_id.
Tagging folks involved on slack @leonardehrenfried @e-lo @lauriemerrell @gcamp @doconnoronca @willcanderson
The text was updated successfully, but these errors were encountered: