JOSM Relations and Turn Based Restrictions
Turn based restrictions (such as "no left turn at this intersection") can be input into the database using a relation as documented here. This page shows how to add such a relation using JOSM.
In the most simple case, a turn based restriction consists of three members and is assigned two tags:
- the tag type=restriction flags the relation as turn restriction
- the tag restriction=no_left_turn,no_right_turn,... indicates the type of turn restriction
- there is one member with role from referring to an oSM way
- there is one member with role to referring to an oSM way
- there is one member with role via referring to the node where the way from and the way to meet
Using the turnrestrictions plugin
The turnrestrictions plugin provides a custom editor for entering and editing turn restrictions in JOSM. Below is a sample screenshot of the basic editor panel on which basic components of a turn restriction can be edited:
- you can select the type of turn restriction from a drop-down list
- you can drag-and-drop or copy/paste a way onto the input field From:
- you can drag-dan-drop or copy/paste a way onto the input field To:
Additional required tags and the via-node are maintained automatically in the background. If necessary, you can edit them in the Advanced panel.
- turnrestrictions plugin
- Online help for the turnrestrictions plugin
- Video: How to create a turn restriction using the turnrestrictions plugins
Using JOSM relation editor
Alternatively, you can use JOSMs generic relation editor to create or edit a turn based restriction.
- note: There exists a preset for turn-restriction (because of a bug the dialog only opens without any selction, so far).
Make sure that the required tags type=restriction and restriction=* are assigned. Here's an example screenshot:
In addition to these required tags you can add optional tags, i.e.
- source=* to indicate the source of information
- name=* to give the turn based restriction a name
Including the correct members
Make sure the member table in the generic relation editor include the following members:
- a member with role from referring to an OSM way
- a member with role to referring to an OSM way
- a member with role via referring to an OSM node
- The via-node should be the node where from and to are connected.
- Sometimes, but not often, the via member must be an OSM way. In those cases the turn from the from way to to way would depend on how the from way was reached. Currently known software can't handle such cases, so, when possible, it's better model the restrictions with a via node.
In contrast to the editor in the turnrestrictions plugin, the generic relation editor doesn't check the data you enter. You have to carefully check yourself that the turn based restriction consists of the expected relation members.