Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds. See https://github.com/MobilityData/gtfs-realtime-validator for the latest!
Other
93
stars
40
forks
source link
StopTimeUpdate.ScheduleRelationship must not be SCHEDULED or SKIPPED for frequency type 0 trips #334
For trips defined in frequencies.txt with exact_times=0, TripUpdates feeds should not have stop_time_updates with a schedule_relationship of SCHEDULED or SKIPPPED - these are only relevant for schedule-based transit (trips not defined in frequencies.txt or in frequencies.txt but with exact_times=1).
EDIT - Actually, considering that SCHEDULED is the default value, it shouldn't really be empty either, although until the above issue is clarified in GTFS-rt, I suppose empty is the best option.
Flag stop_time_update with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)
Observed behavior:
Validator does not flag stop_time_updates with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)
I will go ahead with this with the check being that the value is not set to SCHEDULED. We can change this later to check for UNSCHEDULED if the change to the specification is agreed.
Summary:
For trips defined in frequencies.txt with exact_times=0, TripUpdates feeds should not have stop_time_updates with a schedule_relationship of
SCHEDULED
orSKIPPPED
- these are only relevant for schedule-based transit (trips not defined in frequencies.txt or in frequencies.txt but with exact_times=1).So, the following feed should not be valid:
Related - I'm proposing adding an StopTimeUpdate.ScheduleRelationship UNSCHEDULED enumeration value in GTFS-realtime spec here: https://github.com/google/transit/issues/102
EDIT - Actually, considering that
SCHEDULED
is the default value, it shouldn't really be empty either, although until the above issue is clarified in GTFS-rt, I suppose empty is the best option.Steps to reproduce:
Run TransitClock on USF Bull Runner data: https://github.com/CUTR-at-USF/bullrunner-gtfs-realtime-generator
Expected behavior:
Flag
stop_time_update
with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)Observed behavior:
Validator does not flag
stop_time_updates
with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)Platform:
N/A
cc @scrudden