gtfs-validator
gtfs-validator copied to clipboard
shape_id is required if the feed has continuous pickup/dropoff
Describe the problem
The spec says in trips.shape_id:
Conditionally Required:
- Required if the trip has a continuous pickup or drop-off behavior defined either in routes.txt or in stop_times.txt.
- Optional otherwise.
It seems like we don't have a validation rule for this currently.
Describe the new validation rule
The new rule should be triggered by these two cases:
- If a dataset has records in
routes.txtwithroutes.continuous_pickuporroutes.continuous_drop_offdefined, all trips using this route should havetrips.shape_iddefined. - If a dataset has records in
stop_times.txtwithstop_times.continuous_pickuporstop_times.continuous_drop_offdefined, their associated trips should havetrips.shape_iddefined.
Sample GTFS datasets
Here is a sample dataset I've modified from an existing dataset that has stop_times.continuous_pickup and stop_times.continuous_drop_off defined and where I've removed trips.shape_id.
Archive.zip
Severity
ERROR
Additional context
No response