Closed polettif closed 5 years ago
@polettif don't apologise - this is really helping to make the package more robust, so much appreciated! That commit now yields this response:
gtfs <- gtfsrouter::extract_gtfs("/data/mega/code/repos/atfutures/gtfs-router/routing.zip")
gtfs <- gtfsrouter::gtfs_timetable(gtfs)
#> Day not specified; extracting timetable for Thursday
gtfsrouter::gtfs_route(gtfs, from = "One", to = "Four", start_time = 7 * 3600)
#> route_name stop_name arrival_time departure_time
#> 1 Line D One 07:17:00 07:17:00
#> 2 Line D Three 07:23:00 07:23:00
#> 3 Line B Three 07:28:00 07:29:00
#> 4 Line B Four 07:37:00 07:37:00
Created on 2019-05-16 by the reprex package (v0.2.1)
The trip_name
column simply does not appear when trips
has no trip_headsign
column. The fix is a bit hacky, and what I need to do is more systematically go through the entire GTFS specs and ensure every "Optional" table and field are appropriately handled when not present, and so -> #16
Sorry for the possibly spammy issues but I had a look at this package again today and I've just run into these. If I try to run the router on this test feed I get the following error.
Created on 2019-05-10 by the reprex package (v0.2.1)
It appears that gtfsrouter needs the optional trip_headsign column to work? Is there a way around that or should I simply add the column to the feed.