Tag: OSRM

Comparison of (OSM) routing-engines – Reloaded

Maybe some of you remember that I conducted a comparison analysis between three OpenStreetMap (OSM) routing engine APIs (CloudMade, MapQuest Open and OSRM) and G**gle Maps API last week. You can find the results in my blog post here. As I mentioned in the article, I wanted to try to do a second analysis with more routing engines.

Thus, I added Bing Maps and two OSM engines (YourNavigation/YOURS and Routino/Roadeeno) to the comparison. All services have a continental coverage with the exception of OSRM. The following table shows an overview of (1) the request-response time of the service, (2) the calculated distance for the test-route and (3) the file size of the service response:

As you can see in the following diagram does the OSM routing engine (OSRM) give the fastest results. A little bit strange is that the Routino/Roadeeno service returns no valid route responses for requests which are longer than 600 km.

The same diagram in a more detailed view:

The routing engines have different ping times (round-trip time). Almost all services have a round-trip time off about 25 ms. You can see the times for each engine in the following diagram:

If you take those ping times into account and use a logarithmic transformation, the result look as shown below:

The above diagram shows in a quite impressive way the results of this comparison that allow the following conclusions: OSRM (OSM) shows the fastest results followed by G**gle Maps (Tele Atlas). Bing (Navteq), MapQuest (OSM) and CloudMade (OSM) are nearly equal in most cases. YOURS (OSM) and Routino (OSM) seem not to be the right choices at least for long route calculations (>600km). Maybe a second comparison with several routes between 10 and 500 km could be an enhancement?

thx @ maɪˈæmɪ Dennis 🙂

A comparison of several routing-engines – Which one is the fastest?

In the past blog post I wrote about the newest changes and encoding techniques that have been implemented in the Open Source Routing Project (OSRM). So I think it is time do a little comparison analysis about the request/response time of several routing APIs. The main question I wanted to answer was: “Is an OpenStreetMap direction service faster than G**gle?” I tested the following direction APIs for cars (fastest): MapQuest, CloudMade, G**gle and finally OSRM. For the analyses I wrote a small Java tool, which measured the time to get a result of a routing-service. I did all tests at home with a “regular” 12kbit/s internet connection. I tested several distance levels and the results can be seen in the following table. It shows the average times of five requests for each route with a delay of 3 seconds between each request/response. Overall I did this analysis three times.

The results are quite impressive. OSRM calculates the fastest route for all five test routes! Unfortunately we do not have any information about the server infrastructure at G**gle, MapQuest or CloudMade but the OSRM engine is running on a virtual server with limited hardware resources. It seems that the CloudMade directions service does not like Paris very much, as can be seen in the following image 😉

I will try to do a second comparison with Bing Maps, YOURS and Routino. So stay tuned …

— Update —

>> The second blog post is here: Comparison of (OSM) routing-engines – Reloaded <<

thx @ maɪˈæmɪ Dennis 🙂

Fast routes of OSRM just got faster…

One of the many bottle necks of today’s web services are network latency and bandwidth. While I was working on a research paper, I recognized that G**gle encodes some information when you calculate a route on G**gle Maps. This process reduces, besides the gzip compression, the response from the server. This means that this is a speed improvement for the server client communication besides the zoom-level-generalization. You can read more about the “Encoded Polyline Algorithm Format” and how it works here.

We integrated this nice feature into the code of the Open Source Routing Machine (OSRM) project. The following table shows a few results for some sample routes comparing the old and the new file sizes (@ zoomlevel 18):

And if you are not a numbers person, let us put this in perspective: The fast routes just got faster! And that’s not all. As a second new feature the web frontend of the OSRM has shortlinks for the calculated route now. You can find the link of your route at the route summary. Try it out here: http://map.project-osrm.org/

thx @ maɪˈæmɪ Dennis 🙂

Web-GUI for OS Routing Machine

During my Easter holidays I created a web-fronted for Dennis Luxen’s Open Source Routing Machine (OSRM Project). The OSRM project (http://project-osrm.org/) is in my opinion probably the fastest Open Source software which is using data from the OpenStreetMap project. “In contrast to most routing servers OSRM does not use an A* variant to compute shortest path, but Contraction Hierarchies.” You can read a little bit more about Contraction Hierarchies in Wikipedia.

The website that I created contains in its first version an address-search (geocoding) and of course routeplanning. For the geocoding I integrated the Nominatim search from OpenStreetMap. You can find a How-To on the MapQuest-site. Unfortunately the OSRM routing service covers only most parts of Europe for now. The current version of my web-fronted can be found here: http://map.project-osrm.org

Anyway, perhaps some of you would say: “A website with OSM routing? This is nothing new and we actually did have something like that before …” I agree, BUT I think none of them is as fast and can handle as many requests, try it out! Through its really good route calculation performance the route can also be changed or adjusted by dragging the start- and destination point (I think you know this from other websites). The following video shows the great functionality:

WebGUI for Project-OSRM from Pascal Neis

Further does the new website automatically generalize the desired route on the server side for smaller map scales. This reduces the traffic between server and client and less data needs to be visualized by the client which saves system resources. Additionally I created the following feature: If a calculated route contains a segment that has no name, it is going to be displayed in a different color. I think this is a great feature to map missed road names! The next picture shows such a route. You can find the complete sources of the website in the OSRM Sourceforge project folder.

There is a lot of discussion on OpenStreetMap.org about a Routing-Integration. In my opinion there should be two routing options available on the OSM start page. One option that provides a very fast routing such as OSRM and another option that is easy to adjust and configure and is able to work with different OSM tags. A combination of both will probably not be available soon. Bigger companies such as “G****E” offer high performance routing applications to their users. Thus it should also be a desirable goal for the new OSM software to get to the same performance level that the users are familiar with from other websites. I don’t think that an integration of ”Non-Open-Source Routing Software” such as provided by CloudMade or Mapquest is a good idea. It still should be an Open Source App after all. But this limits the selection to OSRM, YOURS, Routino and Roadeeno. For now OpenRouteService is not completely Open Source.

So *if* we add routing to the OSM main website I would vote for a fast-route-planning software e.g. by the OSRM project. Hence we must only search for a preferably configurable solution, what would be your suggestion?

thx @ Dennis L.: Continue with your great work!
thx @ Frederik (Geofabrik) for supporting the OSRM Project with a VM for hosting
thx @ *Fab* for the video
and finally: thx @ maɪˈæmɪ Dennis 🙂