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

Check for existence of a shape_id for each trip #1277

Open owades opened 2 years ago

owades commented 2 years ago

Describe the problem

The California Minimum General Transit Feed Specification (GTFS) Guidelines require that schedule feeds, "Include shapes.txt, with valid route shapes for each trip."

While gtfs-validator performs some validation on the shapes in shapes.txt, it does not (to my knowledge) confirm that there exists a shape for each trip in trips.txt.

Describe the new validation rule

If there exists at least one row in trips.txt with a null value in the shape_id column, trigger a "missing_shape_id" notice.

Sample GTFS datasets

No response

Severity

Warning

Additional context

Note that, once a shape_id is referenced in trips.txt, the foreign_key_violation rule will check whether that shape_id actually appears in shapes.txt

isabelle-dr commented 2 years ago

Hello @owades,

If I understand correctly, a valid dataset according to this Cal-ITP's Guidelines would mean

As mentioned in the other issues, we plan to change the validator architecture to allow users to do such changes. What it would look like on your end could be either:

It would be great to have your comments in Google's proposal here.

isabelle-dr commented 2 years ago

Labeling as blocked, let's come back to this issue when we close issue #1067.