Worldwide and Offline Routing

KDE SC 4.5 is about to be released soon — just two weeks to go. We will have some great new features in Marble, your favorite virtual desktop globe. Hopefully we’ll have a visual changelog ready for the release summarizing the new and noteworthy.

While releases need their time to stabilize, development continues distributed in git repositories and in subversion trunk. Siddharth Srivastava is making great progress on his GSOC project Marble to Go with a major part of his work already in reviewboard. I’m sure he’ll give an overview in his blog when it hits trunk. I’ll focus on a different topic today. Marble’s routing capabilities rely on OpenRouteService in KDE SC 4.5. Although it works great in most situations relevant to me, there are two major disadvantages: The OpenRouteService integration in Marble requires Internet access to retrieve routes and OpenRouteService itself is limited to Europe.

Recently Nic Roets announced a new routing webservice demo which can be accessed via a HTTP API as well. It is similar to with a major difference: The server offers much more performance and can keep OSM data in RAM, therefore routing requests do rarely time out. Moreover, it serves routing requests for all areas covered by OSM. In other words, we can now do worldwide routing in Marble using this service.

One problem solved, another one still around: Relying on Internet access to retrieve routes can be expensive or even impossible at times. Ultimately we want to integrate vector maps in Marble and use them for routing; for now I found a simpler solution that enables offline routing. It uses a local installation of gosmore to retrieve routes. The drawback here is that you need to take care to install gosmore and its maps on your system. Once they’re there, you have a fast routing solution for Marble however which can be used without Internet access.

If you kept counting, you’ll notice that Marble (in trunk) retrieves routes from up to three different sources. This poses some questions: Do the routes differ? How? Which one is the best? Compare these two screenshots (today’s trunk):

Alternative Routes in Marble

Although the distances are pretty much the same, the routes to take differ in most parts. This is an interesting information that can be used to tell the user about two equally well suited alternative routes. In other situations, the routes retrieved may be very similar and it’s enough to show the best of them. This serves as a good short-term roadmap for Marble’s routing feature: Sort routes by score (how well do they match the user’s preference? Do they provide turn instructions? Are they localized?), filter similar ones and provide a “semantic” difference description of alternative routes. “4.0 km (Gosmore)” in the screenshot above would be replaced with “Via Adenauerring (4 km)” and “Via Kriegsstraße (4 km)” then.

Given the length of this blog, I’ll stop for now and write a follow-up that addresses how to install gosmore and gosmore maps for use in Marble in more detail soon.

8 Replies to “Worldwide and Offline Routing”

  1. The first route is better because it contains only one left turn (since cars drive right in Germany).

  2. @Bugsbane: In KDE SC 4.5 there’s online routing in Europe. Offline and worldwide routing will be in KDE SC 4.6.

Comments are closed.