Open-source GTFS-realtime validator

48 views
Skip to first unread message

Barbeau, Sean

unread,
Nov 28, 2016, 4:07:26 PM11/28/16
to gtfs-r...@googlegroups.com, gtfs-c...@googlegroups.com, transit-d...@googlegroups.com

Hi all,
I just wanted to announce here that we're working on an open-source GTFS-realtime validation tool under a project sponsored by the National Institute for Transportation and Communities at Portland State University (NITC - http://nitc.trec.pdx.edu/).

Here's the project on Github:
https://github.com/CUTR-at-USF/gtfs-realtime-validator

We're still in the early stages, but if you have specific real-time cases that you think this validator should check for, please create a new Github issue:
https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues

Some real-time rules require certain GTFS data (e.g., if you're going to supply only a delay field in GTFS-rt, you need to have times for specified stops in stop_times.txt), so validation of static GTFS data is within the scope of this project as well.  We're leveraging the existing gtfs-validator project (https://github.com/conveyal/gtfs-validator) for the static validation, and will be contributing there as relevant.

Feedback and collaboration is welcome!

Thanks,
Sean

Sean Barbeau, Ph.D.
Center for Urban Transportation Research
University of South Florida

Ritesh Warade

unread,
Nov 30, 2016, 9:41:00 AM11/30/16
to gtfs-c...@googlegroups.com, gtfs-r...@googlegroups.com, transit-d...@googlegroups.com

Hi Sean,

We have come up with this list of common things to check for and validate in GTFS-realtime feeds:

 

From GTFS-rt spec for Trip Updates, check that:

  • There is at most one TripUpdate entity for each actual trip instance.
  • There is at least one StopTimeUpdate for each TripUpdate entity if the trip is not cancelled.
  • There is at most one StopTimeUpdate for each stop and trip.
  • Route id, trip id, stop id, stop sequence match the ids in GTFS.
  • Start_time and start_date are consistent with GTFS.

 

From GTFS-rt spec for Vehicle Positions, check that:

  • There is at most one vehicle id and vehicle label for each trip.
  • Trip id and stop id match the ids in GTFS.

 

Best Practices:

  • Check for negative travel times in Trip Updates i.e. predicted time at stop is earlier than predicted time at previous stop.
  • Check that the delay field is consistent with difference between the scheduled and predicted times.
  • Check whether trips that are predicted to be over are included in the feeds.
  • GTFS-realtime feeds should be refreshed at least every 30 seconds.
  • Sometimes agencies include trips that are for training or non-revenue trips/stops in their GTFS-realtime feeds. These trips/stops are not included in the GTFS schedule data. These are not regularly scheduled trips/stops and are not available to the public. These trips/stops should not be included in the GTFS-realtime feeds.
  • Added trips should have unique ids.
  • Include the trip schedule_relationship in the trip updates and vehicle positions feeds.
  • Include timestamp in the feeds.

 

 

Hope this is useful

 

Regards,

 

Ritesh

 

---

Ritesh Warade

Associate Director, IBI Group

617.699.9544 | ritesh...@ibigroup.com

--
You received this message because you are subscribed to the Google Groups "General Transit Feed Spec Changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtfs-changes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtfs-changes/DM5PR08MB2809635BF1696B1A598729439C8A0%40DM5PR08MB2809.namprd08.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Sean Barbeau

unread,
Nov 30, 2016, 2:01:12 PM11/30/16
to GTFS-realtime, gtfs-c...@googlegroups.com, transit-d...@googlegroups.com
Thanks Ritesh!  I've opened issues for each of these - these new rules (and others) are tagged with the "new rule" label on Github if you want to see them or comment further:

Sean
Reply all
Reply to author
Forward
0 new messages