Search code examples
searchgtfs

Understanding GTFS service times


I have a problem with the understanding of the gtfs file format. Or maybe there is an error in that data. There is a gtfs file from a public transportation agency called "Verkehrsverbund Mittelthüringen" (VMT). This data is accessible at https://transitfeeds.com/p/verkehrsverbund-mittelth-ringen/1080/latest/routes.

For example: I have taken the trip with the ID 9782458 (trips.txt).

2841_0,45,9782458,"Erfurt, Thüringenhalle","",0,,,,

This has the service ID 45 with the specification

45,0,0,0,0,0,0,0,20191101,20200229

Additionally here are the entries for the celendar_dates.txt

45,20191104,1
45,20191111,1
45,20191118,1
45,20191125,1
45,20191202,1
45,20191209,1
45,20191216,1
45,20191105,1
45,20191112,1
45,20191119,1
45,20191126,1
45,20191203,1
45,20191210,1
45,20191217,1
45,20191106,1
45,20191113,1
45,20191120,1
45,20191127,1
45,20191204,1
45,20191211,1
45,20191218,1
45,20191107,1
45,20191114,1
45,20191121,1
45,20191128,1
45,20191205,1
45,20191212,1
45,20191219,1
45,20191101,1
45,20191108,1
45,20191115,1
45,20191122,1
45,20191129,1
45,20191206,1
45,20191213,1
45,20191220,1

Does this mean, that the service is available all times, except from the 1st November 2019 to the 29th February 2020? My Problem now is the output of the search engine tansitfeeds.com. It says the trip with the ID 9782458 is available at the 14th November 2019. Which is contary to my understanding of the data: the trip won't be available in November. Where is the clue I missed? Or is there an error in the data?


Solution

  • The line you pasted indicates that service ID 45 runs on zero days of the week (that's what all those zeros mean), so the start and end dates in the same line don't really mean anything.

    If this service actually does run on Nov. 14, this could be represented in the calendar_dates.txt file, which is usually used to represent service changes for special dates.

    EDIT: the data you added from calendar_dates.txt does indeed show that service 45 has been added for date 20191114.