Refactor - extract ConvertStopTimesMapToArrayStopTimes logic to fn
Cleanup mepo script integrations
add script to show stop times on cursor
Disclaimer: Mobroute is in active development and pre-0.1 and as such is currently aimed at early adopters and those who wish to help with testing. In it's current state Mobroute is at a proof-of-concept stage, routing works for select metros. See the mailing list note for more project details.
Mobroute is a minimal FOSS public-transportation router and suite of tools allowing you to route between locations by using public transportation data (GTFS) data. GTFS feeds are automatically fetched from the from the Mobility Database and the application is designed to have as few 'knobs' to adjust before being practically useful. The core of the routing algorithm is based on graph traversal using Dijkstra's algorithm.
Also - in addition to routing, Mobroute provides auxiliary support for functionality using the same GTFS data including: stop times / timetables lookups for nearby stations, assistance finding all nearby stations, and graph building.
Providing a commandline interface, Mobroute support several different output formats including: ASCII, Mepolang, and GeoJSON. The ASCII format can be used by end users who don't need any visual representation and simply want a series of steps for a route (e.g. board the A train in 2 mins etc.). Using the Mepolang format, Mobroute integrates with Mepo, the graphical minimal opensource OSM viewer to visually place routes onto the map as an ordered pingroup. And finally, by using the GeoJSON output format you may integrate Mobroute into your own mapping or custom application.
Compared to other Opensource Routers (such as GraphHopper, OpenTripPlanner, Valhalla, et al.):
What can be done with Mobroute today:
route
command:
stops
command:
stoptimes
command:
graph
command:
mobdb
command:
Handle
may be used to with -gtfsregex
to match againstNote, in all examples there will be an initial cost for downloading the Mobility DB and the targeted GTFS source file. Once downloaded initial, the GTFS file is cached and subsequent commands will run quicker.
A. Route: Route from Grand Palace to the Hilton Garden, Brussels
mobroute \
-gtfsregex '.+bruxelles.+' \
-cmd route \
-lat 50.85728 \
-lon 4.351426 \
-dlat 50.83214 \
-dlon 4.350534
B. Stops: Display nearby stops near the Grand Palace, Brussels:
mobroute \
-gtfsregex '.+bruxelles.+' \
-cmd stops \
-lat 50.85728 \
-lon 4.351426
C. Stoptimes: Display stoptimes and departure times for stops near the Grand Palace, Brussels:
mobroute \
-gtfsregex '.+bruxelles.+' \
-cmd stoptimes \
-lat 50.85728 \
-lon 4.351426
D. Mobility DB: Display the Mobility DB (note the Handle
field can be matched against using the -gtfsregex
flag):
mobroute -cmd mobdb
Mobroute was built with Mepo in mind; in future releases of Mepo, mobroute will automatically be integrated (e.g. menuing for various mobroute operations). Until then, mobroute may still be integrated by performing the following:
./build.sh install
This will install both the mobroute
executable and a script
mepo_menu_mobroute.sh
to /usr/local/bin. Once installed, launching
the central menu within mepo, you'll see new entries for Route: via Mobroute directions
and Route: show Mobroute stoptimes on cursor
.
Do note, that by default Mobroute is configured to use NYC's subway
system GTFS file. This can be changed by configuring a few variables
set in mepo_menu_mobroute.sh
which
are exported as ENV variables.
Debugging can also be accomplished with Mepo by using the -i
feature on
mepo's cli, e.g.:
mobroute -cmd route -format mepolang | mepo -i