Managing Offline Routing Maps in Marble

Categories: KDE
Tags: No Tags
Comments: 5 Comments
Published on: October 25, 2010

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:

  1. 198 Netherlands
  2. 166 Germany
  3. 157 Belgium
  4. 139 United Kingdom
  5. 117 Switzerland
  6. 111 France
  7. 106 Czech Republic
  8. 103 Austria
  9. 89 Italy
  10. 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.

5 Comments
  1. Markus says:

    Some suggestions:
    1.) Remove the “Manage Maps” button and display the other columns all the time (don’t forget to make the window wider).
    2.) Add an auto-update option. Default to once per month or so.
    3.) (Maybe for the farther future) Such large data sets could maybe also distributed via BitTorrent. I’m not sure how feasible this idea is, though.

  2. Vamp898 says:

    I wish that even online routing would work for me…

  3. Dennis Nienhüser says:

    @Markus: My first version displayed all columns and I added the “Manage Maps” button to have less actions initially on the first page. Also the Maemo version can not display all columns simultaneously. I was thinking of making a third tab for the Manage Maps mode though, that’d probably make it clearer that it affects all profiles as well.

    @Vamp898: What does not work for you? In Marble 0.10 / KDE 4.5 online routing is limited to Europe, maybe that’s the problem?

  4. jospoortvliet says:

    What an awesome video dude… Great work on Marble!

  5. alex says:

    Simply astonishing, great work.
    Hope can be “stable” on gentoo. Fast.
    Thank you.

Comments are closed.

Welcome , today is Saturday, September 20, 2014