gtfs-validator
gtfs-validator copied to clipboard
Implement unique Zone ID verification (GTFS Rule)
Is your feature request related to a problem? Please describe. Every Zone ID should be unique in stops.txt.
Describe the solution you'd like Verify a Zone ID is not duplicated in stops.txt
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context GTFS Spec http://gtfs.org/reference/static/#stopstxt
I think this is actually talking about fare_rules.txt: https://gtfs.org/reference/static#fare_rulestxt
Three fields in fare_rules.txt reference stops.txt zone_id. If there is more than one record in fare_rules.txt with the same combination of references to stops.txt zone_id, then consumers wouldn't know which price to show the user. So I believe this rule should check to make sure that the combination of route_id, origin_id, destination_id, and contains_id is unique in fare_rules.txt.
I'd also double-check the Python code to make sure this assumption is correct.
Thanks, I'll check the Python code in order to confirm that :)
Closing, this should be covered by duplicate_fare_rule_zone_id_fields.