gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

Implement unique Zone ID verification (GTFS Rule)

Open maximearmstrong opened this issue 4 years ago • 2 comments

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

maximearmstrong avatar Jun 03 '20 15:06 maximearmstrong

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.

barbeau avatar Aug 25 '20 17:08 barbeau

Thanks, I'll check the Python code in order to confirm that :)

lionel-nj avatar Aug 25 '20 17:08 lionel-nj

Closing, this should be covered by duplicate_fare_rule_zone_id_fields.

isabelle-dr avatar Oct 03 '22 19:10 isabelle-dr