[Routing] How to Establish Road Hierarchy

Graham Asher graham.asher at cartotype.com
Tue Dec 11 12:51:14 GMT 2012


There is no need for an explicit hierarchy. Routing is best done by 
applying weightings to each route segment, which is an arc in the 
directed graph, so as to create an overall arc cost that, broadly 
speaking, is the estimated time taken to traverse that arc.

You can use the OSM information in the 'highway' tag as input data to 
your weighting system. For example, I use an estimated speed of 120kph 
for a motorway, 80kph for a motorway link, 110kph for a trunk road, etc.

Then you should use the A* routing algorithm, and the best route 
according to those weightings will be found.

I have developed a routing system (part of CartoType, which is free for 
non-commercial use). My experience has been that A* is all you need - as 
long as you code it up carefully, with due regard for speed 
optimisation, it works fast enough even on mobile devices.

Graham Asher


On 11/12/2012 12:00, routing-request at openstreetmap.org wrote:
> Send Routing mailing list submissions to
> 	routing at openstreetmap.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.openstreetmap.org/listinfo/routing
> or, via email, send a message with subject or body 'help' to
> 	routing-request at openstreetmap.org
>
> You can reach the person managing the list at
> 	routing-owner at openstreetmap.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Routing digest..."
>
>
> Today's Topics:
>
>     1. JOSM Routing - How to Establish Road Hierarchy
>        (jwicklund at awtymaps.com)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 10 Dec 2012 12:55:37 -0600
> From: "jwicklund at awtymaps.com"<jwicklund at awtymaps.com>
> To: routing at openstreetmap.org
> Subject: [Routing] JOSM Routing - How to Establish Road Hierarchy
> Message-ID:
> 	<CAErgOV4qfUjMp4ukWa2rHowm03m-DO+40XMzr5a1hmEQNiCO=Q at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> I've built an OSM road dataset (from a shapefile to a .osm in JOSM), in
> which each unique feature has been assigned a'highway'
> tag<http://wiki.openstreetmap.org/wiki/Key:highway>.
> I've declared oneways and bridges in the proper syntax as well. This
> dataset is going to be used in a mobile routing application, which I am
> currently beta testing with a developer. The one-ways and the turn
> restrictions that I've already built are being recognized and followed in
> solving routes in this application currently, but I would like to build-in
> some kind of hierarchy as well so that a 'primary' road is given preference
> over an 'unclassified' when solving a route.
>
> I had thought originally that the 'highway' tag would do this
> automatically, but that does not seem to be the case. What is it that I am
> missing?
>




More information about the Routing mailing list