CUTR-at-USF / transit-feed-quality-calculator

A tool that uses the gtfs-realtime-validator to calculate the quality of a large number of GTFS-realtime feeds
Other
7 stars 1 forks source link

CSVDownloader - Don't download GTFS more than once for same URL #22

Closed barbeau closed 6 years ago

barbeau commented 6 years ago

Summary:

Records in the CSV file look like:

id,title,gtfs_url,gtfs_rt_url
"-1-Portland, OR, USA","TriMet Trip Update",https://developer.trimet.org/schedule/gtfs.zip,http://developer.trimet.org/ws/V1/TripUpdate&appID=225D5601E7729B9ED863DCA39
"-1-Portland, OR, USA","TriMet Alerts",https://developer.trimet.org/schedule/gtfs.zip,http://developer.trimet.org/ws/V1/FeedSpecAlerts&appID=225D5601E7729B9ED863DCA39
"-2-Oakland, CA, USA","AC Transit Trip Update",http://www.actransit.org/wp-content/uploads/GTFSWinter17B.zip,http://api.actransit.org/transit/gtfsrt/tripupdates?token=9A6257A021F944E7BE0AD32702DF23CE

Because the same agency can have multiple GTFS-rt feeds (VehiclePositions, TripUpdates), we should only download the GTFS data once, and each GTFS-rt feeds should be put in the same directory by using the same ID.

Steps to reproduce:

Use above CSV file and run java -Djsse.enableSNIExtension=false -jar target/transit-feed-quality-calculator-1.0.0-SNAPSHOT.jar -directory output -csv feeds.csv

Expected behavior:

GTFS data should only be downloaded once for TriMet

Observed behavior:

GTFS data is downloaded twice for TriMet

Platform:

Windows 7 Enterprise SP1, Java 64bit version "9.0.1"