In which I explain the differences between the exit_to= tag on the highway=motorway_junction node and the more recent destination= tag on the way branching off of the motorway. In addition I will show the need for handling both tags and leave you with a tool for automatic rewriting.
To provide great guidance for our Open Source Routing Machine users we want to include ramp information for highway navigation.
There are two established tagging schemes for highway ramp signage:
- Using the exit_to= tag on the highway=motorway_junction node where the ramp branches off of the motorway. This tagging scheme was established mainly because the default Mapnik style displayed the tag quite nicely.
- The more recent destination= tag on the way branching off of the motorway.
Why do we have two completely different tagging schemes? Have a look at the following example where a ramp branches off the continuing motorway:
a . . . b . . d . ` . c .
In this case the
exit_to tag is placed on the node
b together with the
So far so good. Now consider the common situation where multiple numbered exits diverge at a single point.
. c a . . . b ` ` . d
Now there are destination signs for the ways
bc and in addition for
There are workarounds like
exit_to:right tags but as you can imagine these do not suffice for more complex situations.
For these situations the
destination tag is the better alternative.
Here in an example for where we need such a workaround.
Photo by Mapillary user andrewsnow under CC BY-SA 4.0.
The Open Source Routing Machine supports
destination= tags for quite a while now.
exit_to= tags on nodes is not easy to implement for us, since we would have to create the road network representation first in order to derive the ways the destination signage is meant for.
There is a similar problem with stop sign nodes: without
direction tag we have to find the nearest intersection to apply the stop sign penalty to the right turns.
But in order to find the next intersection we already need the road network. It is simply not compatible with how the routing engine is structures to allow for high-performance parsing at scale.
exit_to node tag is still quite popular, especially in the US. See the Bay Area as an example:
In contrast, the
destination way tags:
We clearly have to support both tagging schemes at this point.
This is the reason I spent some time to build a tool for rewriting
exit_to node tags to
destination way tags where unambiguously possible:
It is quite conservative, taking care of oneway link roads,
destination tags that are already present, making sure the
highway=motorway_junction tag is present and more.
It prefers correctness over quantity.
For the Bay Area it is able to add roughly additional 800
destination tags in a matter of seconds.
A viable pre-processing step for making highway navigation with the Open Source Routing Machine more user-friendly, especially in the US!
Check out the tags' Wiki pages for more detailed descriptions:
Check out our recent Open Source Routing Machine v5.6 release in case you want to give it a try yourself.