gtfs-realtime-validator icon indicating copy to clipboard operation
gtfs-realtime-validator copied to clipboard

Detect when no vehicles exist but service is scheduled

Open mcplanner-zz opened this issue 4 years ago • 2 comments

Summary: I ran the validator on a feed that is blank by design, and no error was given.

Steps to reproduce: Bay Area Rapid Transit (BART) prefers to not produce a vehicle position feed because they're concerned about physical security. Their regional agency (MTC) produces vehicle positions, trip updates, and alerts on behalf of all their local agencies, including BART. I plugged in the vehicle position and BART identifiers in their URL format (http://api.511.org/transit/vehiclepositions?api_key=[key]&agency=BA) and put this URL in the validator. No errors were given, which made me assume it was just a really good feed.

Expected behavior: I expected some indication that the API wasn't returning anything at all.

Observed behavior: The validator returned 0 errors.

Platform: MacOS Catalina 10.15.7 Java version: 11.0.5 Chrome version 86.0.4240.80

mcplanner-zz avatar Dec 01 '20 00:12 mcplanner-zz

@mcplanner Thanks for opening this! No errors = perfect! :)

Could you attach the .pb file that is returned (just from putting the URL in a browser) in a zip file, or if you can see the results in plain text in the validator, paste the plain text?

I'm curious if there is some content (i.e., a header) and no vehicles, or if the entire feed is empty.

If the header is there but no vehicles, it might be challenging to tell the difference between this type of feed and a normal situation where an agency isn't running service (e.g., in the middle of the night) - we'd need to compare against static feed to see if there is service running. Maybe this would be better presented as % coverage of trips shown as active in the static schedule data.

Possible related issues:

  • Logging connection failures - https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/278

barbeau avatar Dec 01 '20 17:12 barbeau

Here you go. Thank you! vehiclepositions.zip

mcplanner-zz avatar Dec 01 '20 18:12 mcplanner-zz