google / transitfeed

A Python library for reading, validating, and writing transit schedule information in the GTFS format.
https://github.com/google/transitfeed/wiki
Apache License 2.0
679 stars 254 forks source link

Fix wrong validation rules for location_type #488

Closed Bertware closed 4 years ago

Bertware commented 5 years ago

According to the GTFS specification, location_type can be between 0 and 4. However, the current rules only allow a location type of 0 or 1. This PR allows all specified location types.

Furthermore, a small "magic number" has been replaced by a constant value which already existed in the file, improving code readability.

https://developers.google.com/transit/gtfs/reference/#stopstxt https://gtfs.org/reference/static#stopstxt