A Question Regarding GTFS Data Order

A project I’m currently working on utilises a document oriented database to store static transit data. Currently I’m building an algorithm that takes the static GTFS table data, reshuffles in to suit my purposes, and ultimately updates the database.

So far, it looks like the trip data and stop time data are ordered to match each other. That is to say, the first row of trip data file has its stop times in the first few rows of the stop time data file, for example. (probably easier to follow a visual example: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.)

Is this intentional? (I’m hoping yes, as it would greatly reduce the amount of code needed, while also keeping the amount of processing needed to a minimum)

Hi @Silicon_Soldier, still finding an answer for you, will get back to you soon…

Thanks @alejandro.felman, I’ve since found that it doesn’t match the order of trips.
I’ll have to code more defensively, but to be frank that’s probably a good idea for any data.


Hi @Silicon_Soldier, I can confirm that yes, entries won’t be in any certain order in our GTFS feeds. Unfortunately you will have to sort the data on your own at the moment.

If you have any more questions about this just let me know. Thanks.

1 Like

Thanks @alejandro.felman, time to put my thinking hat on. :thinking: