afimb / gtfslib-python

An open source library in python for reading GTFS files and computing various stats and indicators about Public Transport networks
GNU General Public License v3.0
44 stars 6 forks source link

Two frequencies can refer to the same trip? #41

Closed skinkie closed 8 years ago

skinkie commented 8 years ago

https://github.com/afimb/gtfslib-python/blob/master/gtfslib/converter.py#L623

Can you give an example of the above. Is it legal to do define a trip with a stop pattern and instantiate it multiple times in frequencies?

laurentg commented 8 years ago

This exemple here has three frequencies referring to the same trip: https://developers.google.com/transit/gtfs/examples/gtfs-feed#frequenciestxt

It's legal and even documented (for example you can't have overlapping ranges, but the end-time of a range can be perfectly identical to the start range of the next).

I think this would be rather common to do so, if you have the same pattern with varying frequency during the day.