ModRana offline routing guide
 How does it work ?
- searches for routes without the need for Internet connection
- routes much faster than online routing
- mode based results (Car, Walk, Cycle; Bus & Train get results for Car)
- uses monav-server as backend
 Enable offline routing in 6 easy steps
 download routing data
 from monav repository
Compatible routing data packs are available from monav.openstreetmap.de. Just download a relevant pack for your area. :) It can be also done directly on the N900 like in this example:
cd MyDocs wget http://monav.openstreetmap.de/mapsets/Czech_Republic.zip
 from modrana repository
 unpack it to the Monav data folder
This is the main Monav routing data folder:
The .maps folder is normally visible by default when connecting the N900 in USB mass-storage mode to Windows PCs, on Linux PCs you have to enable Show hidden files/folders to see it. If there is no monav_data folder in .maps, create it:
cd MyDocs/.maps mkdir monav_data
and unzip you data packs into it.
Example (continuing where we left):
unzip Czech_Republic.zip -d .maps/monav_data/
tar xvzpf czech-republic_car.tar.gz -C .maps/monav_data
You should get paths similar to these:
/home/user/MyDocs/.maps/monav_data/Czech_Republic /home/user/MyDocs/.maps/monav_data/Czech_Republic/routing_bike /home/user/MyDocs/.maps/monav_data/Czech_Republic/routing_car /home/user/MyDocs/.maps/monav_data/Czech_Republic/routing_pedestrian
As their content is not currently used, you can remove the rendering_osm and rendering_vector folders.
 start modRana
Just start modRana as usual. ModRana currently only scans for new map packs at startup. So if you add new map packs, you will have to restart modRana for them to be available for routing.
 select preferred map data pack
Go to menu->options->Navigation->Routing data and select a Monav data pack to use.
 select Monav as routing backend
In Go to menu->options->Navigation->Routing and select Monav as Routing provider.
 route :)
Please note that offline routing currently does not work for address to address routing.
All the other methods (point to point, point to here, routing to POIs or search results, etc.) should work.
 Generating your own routing data
If the online Monav data repositories don't cover the area you are interested in or if you just want to have fresh routing data for your area generated every hour from local OSM extracts - no problem! Generating your own Monav routing data packs is quite easy. :)
 The Monav data generator
I've made a simple script, that takes raw OpenStreetMap and outputs modRana compatible Monav routing data packs. Just download the generate.py script and base.ini configuration file from the Github project to some folder:
wget https://raw.github.com/M4rtinK/monav-data-generator/master/generate.py wget https://raw.github.com/M4rtinK/monav-data-generator/master/base.ini
And you are good to go. :)
The script generates modRana compatible Monav routing data packs from OpenStreetMap data files (both plain osm files and pbf are supported).
You need to have monav-preprocessor installed (as this script is basically a wrapper around it). The monav-preprocessor package should be available from the default repositories in Debian, Ubuntu, Fedora and other major distributions.
./generator.py osm_data_file [output_directory_name]
If no output_directory_name is provided, the filename of the osm_data_file without extension will be used instead.
./generate.py czech_republic.osm.pbf Czech_Republic_2012
Once the processing finishes, just move the output (called Czech_Republic_2012 in our example) directory to .~/MyDocs/.maps/monav_data/ as usual.
The Monav preprocessor can run a part the conversion in multiple threads, speeding the whole process quite a bit. By default, 4 threads are used.
To set the thread number, just edit the THREADS variable in the generate.py file. The number of threads should roughly correspond to the number of logical processing cores on your machine.
 Known issues
directions are very basicfixed Monav actually doesn't return a turn type, so I'll have to add an algorithm that detects different turn types and assigns corresponding description (Marble also does it like this).
ModRana now properly handles most turn types and support for more advanced turn types (roundabouts, highway merging, etc.) will be added in the future.
some turns are missedfixed Monav actually doesn't return turns at all - just points for the route & name + type for the route edges. So an algorithm that analyses all edge junctions on the route and decides what is turn and what is not (based on sharp turns, edges changing type or name, etc.). Currently every route type change is just used to trigger turn.
- no address2address offline routing
The Monav GUI can be used for offline address search - I'll have to investigate if the same functionality can be used over the monav-server API.
 Planned features
modRana project hosted repository with up-to-date data packs(done: data.modrana.org)
- built-in map pack downloader & updater
- This page was last modified on 9 May 2014, at 22:23.
- This page has been accessed 7,640 times.