A turn restriction at a junction is represented by a relation that has a set of tags describing the type of turn restriction. This turn restriction relation is not limited to turns, but can also be used for instance if you are only allowed to go straight on. A bus gate is another example of a use of the turn restriction relation as an alternative to Tag:barrier=bus_trap. At the junction passage from one side to the other is restricted (except for buses of course).

There are a number of important things that need to be taken into account when creating a turn restriction.

There may be several turn restrictions at a junction, represented by separate relations.

There is no need to restrict turning into the wrong way of a one way street. This is taken for granted.

Turn restrictions do not apply to pedestrian unless the type or key is restriction:foot.

When a particular turn restriction is the default for a given jurisdiction and is not signeddon't map them. It is much better to ensure that routing engines embody the regional rule rather than mapping every occurrence as a turn restriction. This applies particularly to unsigned U-turns in Brazil, where using turn restrictions will requires hundreds or thousands of restrictions and micro-segmentation of all roads which in turn make editing data hard.

If the first word is "no_", then no routing is possible from the "from" to the "to" member. If it is "only_", then you know that the only routing originating from the "from" member leads to the "to" member. This distinction is also shown in the examples section of this page.

The restriction does not apply to these vehicle types (more than one: except=bicycle;psv)

day_on

day of week

for example, no right turn in the morning peak on weekdays might be day_on=Monday;day_off=Friday;hour_on=07:30;hour_off=09:30

day_off

day of week

hour_on

time of day

hour_off

time of day

Members

Way or node

Role

Recurrence

Discussion

from

1

1 or more

A way from which restriction starts (e.g., no right turn from here).[2] A no_entry restriction can have more than 1 from member, all others have exactly 1 from.

to

1

1 or more

The other end of the restriction.[2] A no_exit restriction can have more than 1 to member, all others have exactly 1 to.

via

Node: One (1) node

Way: One (1) or more ways

The via member(s) connect the beginning and end ways representing the allowed or restricted maneuver. As shown to the left, a turn restriction can either have (i) one node or (ii) one or more ways with a via role.

The nodes or way between the end points across which you would travel if the turn weren't restricted - may just be the simple intersection of the two ways, or consider a dual carriageway where you can't turn across it, where via would be the nodes on each carriageway and/or the little way connecting the two carriageways[3].

location_hint

0 or 1

A hint to a renderer as to where might be a good place to position a symbol indicating the restriction. E.g., in a N/S/E/W cross roads where you can't turn from S to E, you might put a node just SE of the junction and the renderer might place a no right turn sign there.

Road signs

The sign number in the US MUTCD is given in parentheses. There are slight differences of these roadsigns from country to country. Images of turn-signs all around the world can be found on Wikimedia Commons

Note: The symbols for restrictions displayed in editors are not authoritative; tagging must not rely on them. E.g., a no_right_turn in JOSM displays either symbol 2a (straight ahead and left) even if there is no left turn. The relation members and restriction value are the important part.

Brazil, US (UK and France never use such signs; you would usually be facing a no entry sign in such a situation, or if it's two-way ahead you might see adjacent left-turn-only and right-turn-only signs). Formerly used in Ireland.

In the US, a white rectangular sign is used for this situation and the case where one lane on a multi-lane road must turn (R3-5R).

In the Philippines, it is mainly used before a junction or sometimes in a junction, either on a standalone blue circular sign with a white arrow or a blue circular sign on a white rectangle with text, usually "ALL TRAFFIC".

Ukraine (just before a junction).

5b

restriction=only_right_turn

Typically at the junction.

In the US, a white rectangular sign is used for this situation and the case where one lane on a multi-lane road must turn (R3-5R).

In the Philippines, it is mainly used on a junction with a one-way road, either on a standalone blue circular sign with a white arrow or a blue circular sign on a white rectangle with the text "ONE WAY".

In the US, a white rectangular sign is used for this situation and the case where one lane on a multi-lane road must turn (R3-5L).

Ukraine (just before a junction).

6b

restriction=only_left_turn

Typically at the junction.

In the US, a white rectangular sign is used for this situation and the case where one lane on a multi-lane road must turn (R3-5L).

7

restriction=only_straight_on

Used in Russia, in Ukraine and in the UK; usually seen just before a junction or on the approach to a junction.

In the US you'll see the text "NO TURNS" in a white square (R3-3; R3-5a is usually used only in the case where one lane on a multi-lane road must turn).

8

restriction=no_entry

Used for not one-way roads, where entering across some point (member node with role via) is prohibited. Relation can have several from members[2] and one to member.

In Ukraine is used for opposite-direction one-way road entries, and for roads that even residents are not allowed to drive.

9

restriction=no_exit

Used for not one-way roads, where exiting across some point (member node with role via) is prohibited. Relation can have one from member and several to members.[2]

Obviously, the above table can't be complete; e.g., swedish road signs use a yellow background instead of the white one. However, with the above signs it should be easy to find the corresponding restriction=xy value for most countries.

In Brazil all signs in this category (no_turn or only_turn) are red circular signs with an arrow pointing in the corresponding direction. only_turn signs do not have the diagonal bar, while no_turn signs do (similar to 1-3b, but also for 5-7).

Examples

There is a clear distinction between two types of turn restrictions. There is the mandatory restriction type and there is the prohibitory restriction type. Different ways will have to be selected for each of these restriction types.

Only turning right from a to b is allowed at N. So turning left is forbidden.

Mandatory restriction

This restriction type sets the way where one is only allowed to go to. Going to other ways from the via point is forbidden with this relation. The turn restriction relation is tagged with the following two tags:

iD

For turn restrictions whose 'via' member is a node: Native editor support exists. These can be added by selecting the node of the intersection where you want the turn restriction. Then select the way entering the turn and toggle between restricted and unrestricted turns by clicking the red or green icons (see Simple Editing for Turn Restrictions in OpenStreetMap for further instructions on how to do this).

For turn restrictions whose 'via' member is a way: full in-editor support does not exist. You will need to create and edit relations of this type by manually creating the Restriction relation. Highlight the way which will be the 'via' member, create a new 'Restriction' relation with the 'restriction' type you intend, and label the way as a 'via' member in this new relation. Lastly, add the ways which will be the 'from' and 'to' way members, labeling each accordingly with their relation membership. Be careful not to confuse the turn restriction you are working on with others in the same location! Use a temporary 'name' for the new relation (you can delete this name when finished adding members) if this helps you keep track.

JOSM

JOSM has partial in-editor Restriction support, with the use of a plugin.

The Turnrestrictions plugin can be downloaded to create and edit turn restrictions which have a node as its 'via' member.

Node as 'via' restrictions, or those with a way as the 'via' member, can also be added by manually creating a new relation.

Potlatch 2

Potlatch 2 has partial in-editor Restriction support. Restrictions which require a node as its 'via' member can be edited natively, as shown in the wiki article Potlatch 2/restrictions. Those with a way as the 'via' member must be manually edited using Potlatch 2's relation editing functions.

Vespucci

Vespucci, the OSM Android editor, supports editing of Restriction relations, but only through relation editing. There is no "interactive" turn restriction function.

Vespucci supports creation of and editing of Restriction relations (both node-as-'via' and way-as-'via' types). Once a Restriction relation exists and is selected, its members (or tags on the relation) are edited via dropdowns.

Errors

Missing turn restrictions or errors in turn restrictions can be reported by different error reporting tools. To check if turn restrictions are properly applied, a routing test can be performed using different routing engines such as OSRM.

There are several data sources that can be used to find missing turn restrictions or errors in turn restrictions:

Mapillary has the possibility to show traffic signs on a map that have been recognized in crowdsourced street view photos.

See also

Different tagging (not ways but nodes for from and to) used at enforcement

References

↑ 1.01.1The restriction:hgv=only_straight_on style matches the approved Conditional restrictions syntax. But because of an unresolved bug in some widely used software, it can lead to incorrect routing - restriction:hgv=only_straight_on is treated as if the relation was tagged restriction=no_*. As a result, some mappers use type=restriction:hgv + restriction=only_straight_on as a workaround.

↑ 2.02.12.22.3The "from" and "to" members must start/end at the "via" node or the "via" way(s), otherwise split it!

↑Notice: Processing of turn restrictions which contain one or more 'ways' in the via role is more complicated than if a single 'node' is used for the via role. As a result some routing software works only with turn restrictions that contain nodes in the via role. This should be fixed by the software, however if you have a straight choice whilst tagging the restriction, please consider using just a single node within the via role.