MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
288 stars 101 forks source link

shape_id is required if the feed has continuous pickup/dropoff #1785

Open isabelle-dr opened 4 months ago

isabelle-dr commented 4 months ago

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:

  1. If a dataset has records in routes.txt with routes.continuous_pickup or routes.continuous_drop_off defined, all trips using this route should have trips.shape_id defined.
  2. If a dataset has records in stop_times.txt with stop_times.continuous_pickup or stop_times.continuous_drop_off defined, their associated trips should have trips.shape_id defined.

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