A Question Regarding GTFS Data Order


#1

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: https://1drv.ms/i/s!AhMuM2ZKbttQpIMPHSz9f68vRExVhw)

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)


#2

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


#3

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.


#4

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.


#5

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