Make generic functions to read a local feed and use local envvars defining "home" and "work" stations so gtfs_home() will screen-dump the next available service from work -> home, and gtfs_to_work() will dump the reverse direction.
This will require construction and local storage of a timetable. Reading back just the timetable part of the Berlin VBB data (4.5 million entries) still takes ~0.4s, so the function will need to be cleverly optimised to perform well. Maybe write a separate C++ routine to just read the timetable data directly from disk line-by-line without having to load it into local memory?
Make generic functions to read a local feed and use local envvars defining "home" and "work" stations so
gtfs_home()
will screen-dump the next available service from work -> home, andgtfs_to_work()
will dump the reverse direction.This will require construction and local storage of a timetable. Reading back just the timetable part of the Berlin VBB data (4.5 million entries) still takes ~0.4s, so the function will need to be cleverly optimised to perform well. Maybe write a separate C++ routine to just read the timetable data directly from disk line-by-line without having to load it into local memory?