I just committed one of the last features that hopefully will make it into the next release: Installing and updating offline routing maps from within Marble.
Unlike tile-based maps used as layers in map themes, offline routing maps consist of large chunks of data that enable the calculation of routes in a certain area. For all of the offline routers supported by Marble, these maps are created by a router specific conversion tool: Put an osm map file in, get a router map file out. When copied to the right place, Marble uses them for offline routing. This task can only be accomplishing by users with detailed technical knowledge and quite some motivation to read the documentation and follow all steps. Clearly nothing I’d expect from the average user.
To make the installation easier, we now host offline routing maps for all countries of the world that can easily be installed (and updated) from within Marble. This way you only need to select the country (or a region in a country) you’d like and Marble downloads and installs an appropriate offline routing map for you. For now we provide motorcar maps for the Monav router. If things work out well, other transport types or different routing backends may follow.
To get the needed map files, I worked on a set of scripts that automate the download, conversion and creation of country maps for the whole world. They download the osm maps from cloudmade.com and geofabrik.de, convert them to the Monav file format and create a marble.kml file with metadata. The compressed files — about 300 files, one for each country — take up about 9.5 GB. The lovely filelight shows a nice overview:
The dark blue chunk are the compressed final files. The uncompressed files are below the directory painted in red. You see a nice distribution of their sizes for each continent. While looking at the files created by Monav, I noticed an interesting variance in the size of some of the created files which relates to the OSM activity in that country. Let’s make a ranking of the most active OSM countries:
- 198 Netherlands
- 166 Germany
- 157 Belgium
- 139 United Kingdom
- 117 Switzerland
- 111 France
- 106 Czech Republic
- 103 Austria
- 89 Italy
- 88 Denmark
The number in the front of each country relates to the ratio of its size and the number of OSM ways. I excluded small countries mainly consisting of one large city. Don’t take that ranking too serious, though, it’s not very accurate
With the files uploaded to my server, I started its integration into Marble. Niko Sams’ work on configurable routing profiles came just right and I added a configuration widget for Monav. When configuring a routing profile, you can now limit Monav maps to a certain transport type. More importantly, you can download new maps as well as updating those where newer versions are available on the server. Technically it’s based on GHNS and therefore could be easily integrated into the “Download Maps” feature of Marble’s KDE version as well. I didn’t do that yet however because the 300 available maps to download would swamp the other available map themes.
The download feature does also work on the N900, of course — mobile devices are the ones where offline routing makes most sense. Below is a screencast of the Desktop version that shows how to update a map, install a new one and use it for offline routing.