The best part of using everyday OSM technologies & relying on OSM to make sure that you get to be “there” on time is that you can directly influence the quality of the experience.
Regardless which OSM technology you’ll be using, to provide you the best route possible, the routing software has to know as much information as possible about the roads (ways) between you and your destination: one-way streets, the turn restrictions, the speed limits and much more.
For example, the turn restrictions contribute significantly to the total travel time (and to the correctness of the route altogether) thus, by ignoring them in the traffic network model, essential characteristics of the network might be missed, leading to substandard and unreasonable paths.
Dealing with turn restrictions in OSM
To help us navigate the complexities of properly translating real map scenarios to the ways and points schema of OSM we will rely on JOSM with the turn restrictions plugin installed.
Turn restrictions in OSM are handled by creating a relation.
A relation is one of the core data elements that consists of one or more tags and also an ordered list of one or more nodes, ways and/or relations as members which is used to define logical or geographic relationships between other elements. (source)
! There is a mandatory requirement when creating a turn restriction: a turn restriction relation has to consists of minimum three members and has assigned two tags (see below the example)
*This image represents the relation tags. The tag ‘type’=restriction’ flags the relation as turn restriction and ‘restriction=no_left_turn’ indicates the turn restriction type.
A table with allowed turns to prohibited turn restrictions available in OSM:
A “no_” type relation can also be represented in map data as an “only_” type relation. The prohibited turn restriction relation is preferred by our routing engine instead of an allowed turn restriction relation.
Members of a turn restriction relation are ways and nodes
(if applicable, where a restriction in vehicular movement exists)
- One simple case can be a turn restriction relation that consist of three members: two ways and one node.
The two ways would represents the beginning (‘from’ role) and end (‘to’ role) of the turn restriction. The node would represent the continuity of travel between the two ways and has a ‘via’ role.
- Another case where a turn restriction relation can consist of three or more ways.
Two ways of this type of turn restriction relation would represent the beginning and end of the turn restriction and at least one way would represent the continuity of travel between the aforementioned ways (‘via’ role).
Workflow for adding “Turn Restrictions”
There are two ways to add turn restrictions:
- The traditional way using the embedded relation editor available in JOSM. A slight disadvantage of this method is that you spend a bit more time to manually constructing the relation.
2. A more user friendly way would be to use the “turnrestrictions” plugin that automatically recognizes the type of the relation and the relation members. Below there is a “how to” video:
These examples were shared by our mapping analysts team. Using the aforementioned tools they have added nearly 2,500 turn restrictions in the LA/Orange County area, where 85 % of the turn restrictions that were added to the map are no_u_turns, followed by 11% of no_left_turns and the rest is covered by the other categories. The map build with all of the LA turn restrictions will be in the production release in early-January.
Hopefully we’ve managed to illustrate how easy is to map turn restrictions in OSM. Now it’s up to you – if you have any questions feel free to contact us for support and remember: mapping is fun!