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

Flex: create exception for decreasing_or_equal_stop_time_distance #1882

Closed emmambd closed 1 month ago

emmambd commented 1 month ago

Describe the problem

Based on this old feed and its associated validation report,, there are deviated routes for this agency, where drivers can deviate off a fixed route to a specific zone based on demand booking.

In this feed, there are cases where decreasing_or_equal_stop_time_distance is triggered on stop times with location_id or location_group_id rather than stop_id.

This is confusing, because the stop_id column will be null in this case.

Image

Proposed solution

Create an exception for rows where a shape_dist_traveled value is provided and has either an associated location_id or location_group_id. These rows should be omitted and will be covered in #1885

Sample datasets:

https://data.trilliumtransit.com/gtfs/mountadams-wa-us/mountadams-wa-us.zip http://data.trilliumtransit.com/gtfs/thurston-wa-us/thurston-wa-us--flex-v2.zip

Alternatives you've considered

No response

Additional context

No response

davidgamez commented 1 month ago

For clarification, should we ignore only the rows with location ID and location group ID or any trip with a row with this condition?

For example:

Let's assume that all trip 1 rows violate _decreasing_or_equal_stop_timedistance.

stop_times.txt trip_id stop_id location_id location_group_id ...other fields...
1 stop_x ...
1 stop_1 ...
1 location_1 ...

In this case, should I expect no notice to be triggered or one notice for the second row and the third row to be ignored?

tzujenchanmbd commented 1 month ago

The latter one. We still want to trigger 1 notice for the second row.

jcpitre commented 1 month ago

I just added code for that as part of https://github.com/MobilityData/gtfs-validator/issues/1885 See PR https://github.com/MobilityData/gtfs-validator/pull/1896

davidgamez commented 1 month ago

I just added code for that as part of #1885 See PR #1896

That was not part of #1885 scope ;-)

jcpitre commented 1 month ago

I know now. I did not realize.