Mapbox OpenStreetMap

OpenStreetMap is the free and editable map of the world, created and maintained by a huge international community. Mapbox Streets, our customizable map layer of streets, buildings, and places from all around the world, is powered by open data from OpenStreetMap. Anybody can create an account and start editing on OpenStreetMap.org within minutes.

Our data team updates OpenStreetMap based on quality analysis and customer feedback. Our principle is to work in the open, these mapping guides are primarily consolidated and maintained by our data team for various mapping projects and on-boarding new team members.

You are welcome to join one of our open mapping projects over on the issue queue and use these best practice mapping guides. These guides are licensed under Public Domain (CC0), if you would like to contribute or have an feedback on these, please feel free to raise an issue in this repository.

Adding turn restrictions

Mapping guides

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-left-turn and No-U-turn, regulate traffic flow at intersections and accurately mapping them is critical for calculating valid routes on a map.

image

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:

Symbol Description OSM Tag Node/Way/Relation
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 Turns restriction=only_straight_on Relation
No U-turn restriction=no_u_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:

epl4xsg

Adding Conditional Turn Restriction:

conditional tr

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:

traffic overlay mapillary

Pain Points in adding Turn Restrictions in iD editor:

  • iD editor provides no way of adding a no_u_turn restrictions via way. If there is a via way no_u_turn, you have to add it using JOSM editor.

image

  • 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:

mapi_plugins

  • Map-paint styles to be added:
    • traffic_signs: It displays all the existing traffic signs that have been already mapped on OSM.

mapi_paint

Guide to use the mapillary and turn restriction plugins

Using the Mapillary plugin

  • The Mapillary imagery can be added by clicking on imagery -> Mapillary in 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 Turn Restrictions, Oneways and Mapillary Street Photos layers 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.

    navigation

  • In the Mapillary layer in JOSM, detected traffic signs are represented by a tiny red triangle next to the green arrow. Please note that this layer might not be up-to-date.

    screen shot 2015-11-27 at 1 41 55 pm

  • 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 traffic-sign.

    turn_res

  • Be cautious while adding an U-turn via a way in OSM, here is how you add it:
    • Select the participating ways
    • Go to Presets -> Relations -> Turn Restrictions
    • Select no_u_turn in the Restriction field from the drop-down and click on New Relation
    • In the Members section add the respective roles for all the ways enlisted

    u-turn

Note

  • 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 restriction to roads that are leading to one-ways going in the opposite direction, like the example below. It will only result in redundant data:

![screen_shot_2015-11-30at_11_36_26_pm](https://cloud.githubusercontent.com/assets/4470913/11480317/deeac0c6-97bc-11e5-8d0a-852e3ae2f69f.png) _Here we should avoid adding turn-restriction as it will result in redundant data screen shot 2016-05-24 at 6 37 06 pm 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

Special cases

  • 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
    screenshot 2016-04-27 16 51 33

  • In the case below, we are leaning towards adding this as a regular restriction since it applies for all regular personal vehicles.

    screenshot 2016-05-02 12 01 18

  • 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

    screen shot 2016-05-06 at 2 57 43 pm

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.
screenshot 2016-04-26 21 39 06

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.

no_right_turn_on_red_sign 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.
screenshot 2016-04-27 12 28 12

3. Single restriction per image detection

Mapillary will detect only one sign type per image. Lookout for multiple restrictions in the image
screenshot 2016-04-27 17 49 34

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 turn_restrictions_plugin_bug

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. offset_mapillary

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. pjimage

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. screenshot 2016-07-26 15 31 15

Different conventions for turn restrictions in different countries

Canada

Case:1

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 no_u_turn.

screenshot 2016-07-26 14 34 36

Case:2

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.

screenshot 2016-07-26 14 48 15

Case:3

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.

image

Syntax to be used: restriction:conditional=only_right_turn @ (Mo-Fr 07:00-09:00,16:00-18:00)

Germany

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.

screen shot 2016-08-17 at 4 12 05 pm

An example of a restriction=no_right_turn traffic sign in Germany

Turn restriction signs of Germany and what it means:

screen shot 2016-08-17 at 4 27 33 pm

Courtesy: German wiki

Reference

  • 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!