Web-GUI for OS Routing Machine
by Pascal Neis - Published: May 15th, 2011
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 🙂
As you say, there has been a lot of discussion about integrating routing onto the main osm.org page. Part of this discussion has been taking place within the strategic working group of the OSMF. The SWG ended up agreeing that integrating routing into osm.org would be in the interest of the project and has recommended this to the OSMF board, which as far as I am aware also in principal agreed to it.
The purpose of integrating it into osm.org would be to help improve data quality of routing by providing a good visualisation of where routing works and where it brakes down due to poor data, e.g. due to the many unconnected ways that you are reporting through OSMI. It would not be to compete with Google, but to be a service for mappers.
However, in order to integrate it, someone needs to actually write the code for the patch. There is already Nic’s wonderful frontend code ( http://nroets.dev.openstreetmap.org/demo/ ) which is imho a very nice UI and has a good level of features. However, it is not yet fully integrated into the rails_port. There is Soren / Frederik’s patch ( e.g. at https://github.com/tomhughes/openstreetmap-website/commits/routing ) which does a proper job at integrating it into the rails_port, but is not yet feature complete and still needs more work.
Then there are things like YOURS ( http://www.yournavigation.org/ ) and your new routing webinterface, that provide code for writing routing front-ends, but aren’t integrated with osm.org at all.
So somehow, we need to take all of these implementations and turn them into a single well functioning patch to the rails_port so that we can finally get it implemented what people have been talking about for so long and what SWG has agreed to to politically support.
I think it would be possible to support multiple routing backends to provide both fast options and more flexible and feature complete options. Given that the mandate is to support data quality and mappers rather than end user, feature completeness is imho more important though than speed.
Integration of only a non-opensource routing engine would likely not be acceptable. Indeed it is likely that the default routing backend would have to run on OSMF hardware, but I don’t see it as impossible to integrate other (commercial/closed source) routing as an additional option (just like there are “closed source” tile layers in the layer chooser), as long as there are also open source implementations.
Looks great, thanks for your efforts! I just hope it becomes available in other parts of the world, or at least the United States ;). I hope to see a routing function on OSM.org someday soon, along with improved POI search and other similar features.
Impressive!
I would really like to see something like this for bicycle routing.
This new demo is workinh really impressive, especially the real time dragging of start / destination point!!!
But one important point is still missing (as like as at MoNav 0.3):
Still no support for Turn Restrictions.
Is there any chance to get this integrated in OSRM?
Yes, support for turn restrictions is coming.
Sieht sehr gut aus. Das Routing auf http://www.openstreetmap.org eingebaut wird ist ‘höggschte’ Eisenbahn. Und ja, es sollte natürlich opensource sein damit dort auch weiter dran ‘geschraubt’ werden kann in Zukunft. Wünschenswert wäre eine Funktion die es ermöglicht ‘Links’ zu verschicken bzw. zu erzeugen mit vorgegebenem Zielpunkt (Ort und/oder GPS Koordinate (per eingabe oder per klick in karte bestimmt), so das man nur noch den startpunkt ergänzen muss als Anwender. Praktischer Anwendungsfall: Person A teilt Person B mit wo das Ziel ist und Person B kann nach Eingabe des startpunkts die routeplanung beginnen. Das ganze wird dann natürlich auch von vielen Websites (als link) genutzt werden können.
Danke! Links stehen schon auf der ToDo-Liste 🙂
i am trying to get the code from sourceforge but i didn’t find it … is it normal , where i can find it
The project moved to github:
https://github.com/DennisOSRM/Project-OSRM
[…] Web-GUI for OS Routing Machine : Neis One! During my Easter holidays I created a web-fronted for Dennis Luxen’s Open Source Routing Machine (OSRM Project). […]