Adding turn restrictions
What are turn restrictions?
A turn restriction at a junction is represented by a relation that has a set of tags describing the type of turn restriction. Turn restrictions, like
No-U-turn, regulate traffic flow at intersections and accurately mapping them is critical for calculating valid routes on a map.
Traffic signs to be added
Refer to the table given below to spot/match the traffic sign in the Mapillary image against the list of traffic signs and it also consists of the OSM tags:
|No straight through||restriction=no_straight_on||Relation|
|No Right Turn||restriction=no_right_turn||Relation|
|No Left Turn||restriction=no_left_turn||Relation|
|No Left or U-turn||restriction=no_left_turn; restriction=no_u_turn||Relation|
The last two columns of the table enlists the correct tagging convention for adding the traffic data to OpenStreetMap.
Using OSM Navigation Map
The Navigation map helps us in recognizing the detected signage overlay from Mapillary on the map. These signage are represented using small circles in 3 colours:
- Green - to be validated
- Blue - Reviewed and found valid
- Yellow - Reviewed and found redundant
- Red - Reviewed and found invalid
When we click on the green circle, the area is automatically opened in JOSM and popup to select the review is opened in the Navigation map. The same can be opened in iD editor by clicking on Edit Map button on top right of the popup. Once done with the review, please add your OSM username.
Mapping turn restrictions with iD editor
The new version of iD, the web editor for OpenStreetMap, makes it even simpler to add turn restrictions to OpenStreetMap.
Adding Absolute Turn Restriction:
Adding Conditional Turn Restriction:
Mapillary overlay and Traffic Sign Overlay:
Mapillary has an efficient tool in iD that helps in seeing detected restrictions. Here’s how you enable it:
Pain Points in adding Turn Restrictions in iD editor:
- iD editor provides no way of adding a
no_u_turnrestrictions via way. If there is a via way
no_u_turn, you have to add it using JOSM editor.
- In certain cases, adding no_u_turn turn via node is also not possible. For such cases, it is better to add it using JOSM.
Mapping turn restrictions with JOSM
In order to be able to map traffic data easily, there are some plugins that JOSM needs to be configured with:
- Plugins to be downloaded:
- Map-paint styles to be added:
- traffic_signs: It displays all the existing traffic signs that have been already mapped on OSM.
Guide to use the mapillary and turn restriction plugins
Using the Mapillary plugin
- The Mapillary imagery can be added by clicking on
imagery -> Mapillaryin JOSM. This will add the mapillary layer over the dataset layer.
The explanation for how the plugin works can be found here.
Note: Every time a new data layer is added, you need to delete the existing Mapillary layer and add a new one
Using the turn restriction plugin
- The explanation for how the turn restriction plugin works can be found here.
Start mapping Turn Restrictions
- This Over-pass query can be used to get the current count of turn-restrictions present in a city that one is going to work on. This will help us in determining the current state of restrictions and further help in calculating the number of restrictions added by the team.
Note: Change the city name in the above query
- Use the navigation data coverage on OSM map to spot the Mapillary signage detections.
- Turn on the
Mapillary Street Photoslayers in the above map
Click on the turn-restriction traffic symbols detected by Mapillary (which are denoted by green dots on the map) for it to open in JOSM.
In the Mapillary layer in JOSM, detected traffic signs are represented by a tiny
red trianglenext to the green arrow. Please note that this layer might not be up-to-date.
Probe the previous and next images as well as the satellite imagery data to get a clear idea of the surroundings and then compare them with the existing Mapillary image to find the exact location of the
- Be cautious while adding an
U-turnvia a way in OSM, here is how you add it:
- Select the participating ways
- Go to
Presets -> Relations -> Turn Restrictions
Restrictionfield from the drop-down and click on
- In the
Memberssection add the respective roles for all the ways enlisted
- To get a better idea about the area/road and to see the clear image, always inspect multiple consecutive images.
- With the help of the plugins, look for traffic restrictions icons at junctions which are already present on the road/area.
- We should avoid adding
turn restrictionto roads that are leading to one-ways going in the opposite direction, like the example below. It will only result in redundant data:
_Here we should avoid adding
turn-restriction as it will result in redundant data
This situation is a clear indication of a redundant restriction
- Add a conditional restrictions when specific conditions are written on the turn-restriction sign-board.
- On certain times of the day. eg. Restriction during peak hours 7AM-10AM
- On a certain day of the year. eg. Restriction on baseball game days only
Adding Conditional turn restrictions
- Conditional restrictions during peak hours are common in SF. Tag them as
restriction:conditional=no_left_turn @ (Mo-Sa 07:00-09:00,16:00-18:00)
Conditional restriction during baseball games. Ignore
In the case below, we are leaning towards adding this as a regular
restrictionsince it applies for all regular personal vehicles.
If you come across the below instance where the restriction is applicable only on
School Days. Per discussion we will be adding the restriction for
Monday - Friday
QA for turn restrictions
During turn restrictions mapping in various cities, we have come across certain special cases where we need to pay more attention while mapping. These cases are noted down here for your reference.
Be cautious when you come across these turn restrictions
1. Restrictions on Red
Be careful with interpreting signage and always verify Mapillary signage overlay with the image and the kind of restriction. The image below shows a sign for no free right that Mapillary interpreted as
no-right-turn. This is NOT a turn restriction. If you are not sure, consult the community before mapping.
A similar restriction found in Canada depicts that left turn cannot be taken when the signal is red, otherwise it is permitted to turn left. We are not adding such turn restrictions.
Picture by Share Bear - Own work - Public Domain
2. Location and bearing of Mapillary Signage overlay
The location and bearing of the Mapillary photo is not reliable and is prone to usual GPS errors. Cross check the photograph with the map to confirm you are looking at the intersection from the correct bearing. This photograph is facing the reverse of actual heading.
3. Single restriction per image detection
Mapillary will detect only one sign type per image. Lookout for multiple restrictions in the image
4. Careful with Turn restrictions plugin in JOSM
Sometimes the Turn restrictions plugin does not detect the correct signs i.e. even though it’s a
no-right-turn, the plugin detects it as
no-left-turn. So be extra sure before adding the restriction
5. Advantage of previous/next images
There might be an offset in the Mapillary images, that is the image may appear after/before the actual location. It is ideal to inspect the previous and next images and also look for road names and other clues from the satellite imagery to verify it’s exact location and bearing.
6. Temporary turn restrictions
When the roads are in construction or under repair, you might see temporary turn restrictions placed similar to shown in the below image. We are not adding temporary turn restrictions.
7. Restriction-ahead warnings
In the below image, there is a no_left_turn sign board as detected from the Mapillary image. This sign board means that there is a
no_turn_restriction ahead. But this signage itself is not a turn restriction, so we do not map this.
Different conventions for turn restrictions in different countries
The image below shows two signages, the first one is in French and translates to ‘Wait for arrow to turn left’ and the second one is a
no_u_turn. In such cases, we ignore the the first signage and go ahead mapping
In the below image, the first board for
no_left_turn says Monday to Friday 8am-10am and 3pm-7pm (Lun-Ven 8h-10h,15h-19h in French). The second board is a
no_u_turn except authorized vehicles. In this case, first one would be a conditional turn restriction; second, an absolute
no_u_turn turn restriction.
The below image indicates that all the drivers (no matter the lane they are on) must follow this/these direction(s) at the intersection. This means that the driver needs to only turn right/left on the days mentioned in the sign and during that duration of the day.
Syntax to be used:
restriction:conditional=only_right_turn @ (Mo-Fr 07:00-09:00,16:00-18:00)
In Germany, instead of signages to prohibit turns, the signages describe the legally allowed turns at the junction. Hence a signage for a no right turn will indicate only turns for left and straight.
An example of a
restriction=no_right_turn traffic sign in Germany
Turn restriction signs of Germany and what it means:
Courtesy: German wiki
- OSM tags for routing http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
- Turn restrictions http://wiki.openstreetmap.org/wiki/Relation:restriction
- Access restrictions http://wiki.openstreetmap.org/wiki/Key:access
- Conditional restrictions http://wiki.openstreetmap.org/wiki/Conditional_restrictions
Spanish version here!