Comments (6)
I think this makes sense as a best practice. If most consumers only support matching on trip_id
, or greatly prefer that, it is important for producers to know that.
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 difficult
The proposed best practice of including trip_id
in TripDescriptor for SCHEDULED trips has a tricky interaction with the GTFS Schedule best practice of including both the current and upcoming schedule in a single GTFS Schedule file.
Each trip_id
value in trips.txt must be unique. At my agency it is not feasible to generate new trip_id
values for minor schedule revisions. This means we must modify the trip_id
values in GTFS Schedule in order to make them unique when we merge the current and upcoming schedules. Modifying the values makes them fall out of sync with the trip_id
values in our realtime data sources.
Options for data producers
At my agency, we are currently writing some code that ingests the data coming out of our trackers and rewrites trip_id
values to match the ones in GTFS Schedule. Other agencies have described doing something similar.
But if the industry is working toward a future where having matching trip_id
values across GTFS Schedule and Realtime is easy for producers, even if they are merging two schedules for GTFS Static and even if their scheduling and tracking tools are from different vendors, it may be worth revisiting the conversation about whether to make the primary key for trips.txt (service_id, trip_id) instead of (trip_id).
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.
from transit.
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.
from transit.
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.
from transit.
@doconnoronca Doesn't the static GTFS contain the relationship from trip to route?
from transit.
@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.
from transit.
What if the route_id in a SCHEDULED trip update doesn't match what's in the GTFS?
from transit.
Related Issues (20)
- Make UTF-8 the mandatory GTFS encoding HOT 6
- GTFS Fares 2.0: Manage fare change HOT 2
- Moving Realtime Best Practices into the Spec: Phasing Plan
- [DRT] After the adoption of GTFS-Flex, stops.txt should no longer be a required file. HOT 1
- Using StopTimeEvent.uncertainty for non-timepoints HOT 4
- Addition of vehicles.txt to GTFS static HOT 6
- Make Shapes a recommended file in GTFS HOT 11
- Make bikes_allowed a recommended field in GTFS HOT 10
- Global trip id HOT 10
- The recommended discussion HOT 1
- Add cars_allowed field to trips.txt HOT 8
- Inconsistency in trip update example vs. reference documentation? HOT 1
- Proposed Best Practice: clarify intended use for CANCELED/SKIPPED TripUpdates VS NO_SERVICE Alerts. HOT 6
- Center coordinate or Bounding box definition in feed_info.txt HOT 6
- GTFS-R : destination display (dynamic)
- Best practice for the use of shapes HOT 1
- Sample Feed HOT 1
- Make headsigns a recommended GTFS field HOT 10
- Scheduled reinforcement trips HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transit.