Changes between Initial Version and Version 55 of Help/Plugin/TurnRestrictions


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Plugin/TurnRestrictions

    v1 v55  
     1[[TranslatedPages]]
     2[[PageOutline]]
     3
     4=  Plugin -> Turn Restrictions =
     5
     6[[Image(source:osm/applications/editors/josm/plugins/turnrestrictions/images/preferences/turnrestrictions.png,48,link=,middle,margin-right=20)]]
     7
     8== Introduction ==
     9In OpenStreetMap a **turn restriction** limits navigation options. It represents the restriction that one cannot navigate from a [wikitr:/Help/Concepts/Object#Ways way] to another way. For instance, the turn restriction depicted below forbids to drive straight. Vehicles have to turn left at the junction where the two ways meet (the so called via-node). Turn restrictions are important for routing and navigation software which are based on OSM data. 
     10
     11[[Image(only_left_turn_sample.png,link=)]]
     12
     13The ''**turnrestrictions**'' plugin supports editing of turn restrictions. It consists of two major components:
     14
     151. **Turn Restriction Panel** - the turn restrictions panel is displayed on the right in sidebar. It displays the list of turn restrictions in the current data set and allows to create or delete turn restrictions, or to launch the Turn Restriction Editor to edit a turn restriction.
     161. **Turn Restriction Editor (`Alt+Shift+2`)** - the Turn Restriction Editor is a special purpose editor for turn restrictions.
     17
     18
     19== Tagging model ==
     20Turn restrictions a standard map feature decribed on the [osmwiki:Relation:restriction OSM wiki].
     21
     22Technically, a turn restriction is an OSM [wikitr:/Help/Concepts/Object#Relations relation]. A turn restriction
     23
     24 * must have a relation member with role **`from`** referring to a [wikitr:/Help/Concepts/Object#Ways way]. We call this way the **''from**''-**way**.
     25 * must have a relation member with role **`to`** referring to a [wikitr:/Help/Concepts/Object#Ways way]. We call this way the **''to**''-**way**.
     26 * must have at least one relation member with role `via` referring to a [wikitr:/Help/Concepts/Object#Nodes node] or [wikitr:/Help/Concepts/Object#Ways way]. We call these objects **''via**''-**object**.
     27
     28
     29== Use Cases ==
     30=== Creating a turn restriction ===#CreateANewTurnRestriction
     31There are several possibilities to create a new turn restriction. First, you can lauch the Turn Restriction Editor for a new turn restriction from the Turn Restriction Panel:
     32 1. Click on [[JOSMImage(new,link=,24,middle)]] in the Turn Restriction Panel. Alternatively, select [[JOSMImage(new,link=,24,middle)]] **New** from the popup menu.
     33
     34Alternatively, you can launch a new editor with a keyboard shortcut:
     351. Press the shortcut for creating or editing a turn restriction. On most platforms the shortcut is **`Alt+Shift+2`**.
     361. If objects in the current JOSM selection already participate in a turn restriction, the following window pops up.
     37 
     38 [[Image(create-turn-restriction-popup.png,link=)]] \\
     39 Just click on [[JOSMImage(new,link=,24,middle)]] **Create new turn restriction** to launch the turn restriction editor for a new turn restriction. Alternatively, press the key **`N`** or hit **`Enter`**.
     40
     41In both cases, the ''turnrestrictions'' plugin initializes the new turn restriction with objects from the current JOSM selection:
     421. The first selected way in the JOSM selection becomes the **''from**''-way.
     431. The last selected way in the JOSM selection becomes the **''to**''-way
     441. If the **''from**''- and **''to**''-way have a node in common, this node becomes a ''via''-object.
     45
     46A fast way to create a turn restriction is therefore to
     471. Select the **''from**''- and **''to**''-way in JOSM
     481. Press **`Alt+Shift+2`**
     491. Choose the type of the turn restriction and save it.   
     50   
     51=== Editing a turn restriction === #EditingATurnRestriction
     52There are several possible ways to launch a Turn Restriction Editor in order to edit a turn restriction. First, you can lauch the Turn Restriction Editor for an existing turn restriction from the Turn Restriction Panel:
     531. Select a turn restriction in the Turn Restriction Panel
     541. Click on [[JOSMImage(dialogs/edit,link=,24,middle)]]. Alternatively, select [[JOSMImage(dialogs/edit,link=,24,middle)]] **Edit** from the popup menu.
     55
     56Second, you can launch a new editor with a keyboard shortcut:
     571. Press the shortcut for creating or editing a turn restriction. On most platforms the shortcut is **`Alt+Shift+2`**.
     581. If objects in the current JOSM selection already participate in a turn restriction, the following window pops up.
     59
     60 [[Image(create-turn-restriction-popup.png,link=)]] \\
     61 Just double-click on the turn restriction you want to edit. Alternatively, for the top 9 turn restrictions displayed in the popup window you can use the shortcuts **1** to **9** to launch the Turn Restriction Editor. In the example above, you would press **1** to start editing.
     62
     63A fast way to edit a turn restriction is therefore to
     641. Select the **''from**''- or **''to**''-way in JOSM
     651. Press **`Alt+Shift+2`**
     661. Type **`1`** to launch the Turn Restriction Editor
     67 
     68=== Deleting a turn restriction ===
     69There are several possible ways to delete a turn restriction. First, you can delete it in the Turn Restriction Panel:
     701. Select a turn restriction in the Turn Restriction Panel
     711. Press **`DEL`** or click on [[JOSMImage(dialogs/delete,link=,24,middle)]]. Alternatively, select [[JOSMImage(dialogs/delete,link=,24,middle)]] **Delete** from the popup menu.
     72
     73Alternatively, you can [#EditingATurnRestriction launch a Turn Restriction Editor] and click on [[JOSMImage(dialogs/delete,link=,24,middle)]] in its toolbar.
     74
     75
     76== Turn Restriction Panel == #TurnRestrictionPanel
     77[=#TurnRestrictionToggleDialog]
     78The Turn Restriction Panel helps you to keep track of the turn restrictions in the current edit layer.
     79
     80Here's a screenshot of the panel and its popup menu: \\
     81[[Image(toggle-dialog-screenshot.png,link=)]]
     82
     83If you tick the checkbox **Only participating in selection** the dialog displays only turn restrictions in which objects from the current selection are participating. If the checkbox isn't selected, then all turn restrictions in the current edit layer are displayed.
     84
     85You can apply some commands to the turn restrictions displayed in this dialog.
     86||=**Command**=||=**Description**=||
     87||**Create** a new turn restriction||Click [[JOSMImage(new,link=,24,middle)]] or select [[JOSMImage(new,link=,24,middle)]] **New** from the popup menu.||
     88||**Edit** a turn restriction||Select the turn restriction and click [[JOSMImage(dialogs/edit,link=,24,middle)]] or select [[JOSMImage(dialogs/edit,link=,24,middle)]] **Edit** from the popup menu.||
     89||**Delete** a turn restriction||Select one or more turn restrictions, press **`DEL`**, or click on [[JOSMImage(dialogs/delete,link=,24,middle)]] or select [[JOSMImage(dialogs/delete,link=,24,middle)]] **Delete** from the popup menu.||
     90||**Select** the turn restriction||In order to select the turn restriction and its members in the current edit layer, first select the turn restriction in the list and then select [[JOSMImage(selectall,link=,24,middle)]] **Select in current data layer** from the popup menu.||
     91||**Zoom** to the turn restriction||Select the turn restriction in the list and then select [[JOSMImage(dialogs/autoscale/selection,link=,24,middle)]] **Zoom to** from the popup menu.||
     92
     93
     94== Turn Restriction Editor ==#TurnRestrictionEditor
     95The Turn Restriction Editor allows you to create and edit turn restriction. It provides two user interfaces:
     96* a **Basic Editor**. This is a special purpose user interface for editing the properties of a turn restriction.
     97* an **Advanced Editor**. This is a generic user interface for editing the raw data elements of the OSM relation which represents a turn restriction.
     98
     99You can use either of these user interfaces. Regardless of whether you use the Basic Editor or the Advanced Editor you should make sure that the resulting turn restriction is valid. The turn restriction editor checks the turn restriction and shows error messages and warnings in a third user interface, i.e. the list of issues.
     100
     101=== Basic Editor === #BasicEditor
     102The Basic Editor allows you to set the **''from**''-way, the **''to**''-way, and exceptions to the turn restriction for a selection of vehicle types.
     103
     104In order to set the **''from**''-way
     1051. Select a way in the current edit layer
     1061. **Drag** it from the list of selected objects (on the left in the editor) onto the input field **From:**
     107
     108Alternatively, you can
     1091. Select a way in the current edit layer
     1101. Copy  it (using **`Ctrl+C`** or [[JOSMImage(copy,link=,24,middle)]] **Copy** in the popup menu) in the list of selected objects on the right of the Turn Restriction Editor
     1111. Click on the **From:** field and paste the copied way (using **`Ctrl+V`** or [[JOSMImage(paste,link=,24,middle)]] **Paste** from the popup menu)
     112
     113[[Image(sample-screen-shot-1.png,link=)]]
     114
     115In the standard configuration, ''via''-objects aren't displayed in the Basic Editor. You have to switch to the [#AdvancedEditor Advanced Editor] to edit them. In the preferences for the turnrestrictions plugin you can change the default configuration, though. [#Preferences Launch the preference dialog] and [#ToggleEditingOfViaObjects enable displaying/editing of via-objects] in the Basic Editor.
     116
     117The following screen shot shows the Basic Editor configured to display/edit ''via''-objects too.
     118
     119[[Image(basic-editor-with-vias.png,link=)]]
     120
     121=== Advanced Editor === #AdvancedEditor
     122The Advanced Editor allows you to edit the raw OSM data, i.e. the tags and the relation members of the relation representing the turn restriction.
     123
     124[[Image(sample-screen-shot-2.png,link=)]]
     125
     126==== Editing the tags ====
     127In the upper half of the Advanced Editor you can edit the tags of the turn restriction. You can add tags with arbitrary keys and values but please note that some tags have a special meaning in turn restrictions:
     128
     129* `type=restriction`  - this is a required tag for a turn restriction.
     130* `restriction=...`   - the value of this tag should be one of the [osmwiki:Relation:restriction supported types for turn restrictions]. Instead of editing the raw tag value you can also select a restriction type from the drop-down box in the [#BasicEditor Basic Editor].
     131* `except=...` -  the value of this tag should be a set of [osmwiki:Relation:restriction supported vehicle types]. Instead of editing the raw tag value you can also tick the respective vehicle types in the [#BasicEditor Basic Editor].
     132* (`day_on=...`, `day_off=...`, `hour_on=...` and `hour_off=...` can be used to specify when a turn restriction is actually in place, refer to the [osmwiki:Relation:restriction OSM wiki for more information].) **''Deprecated, please use [osmwiki:/Conditional_restrictions conditional restrictions] instead.''**
     133
     134==== Editing the members ====
     135In the lower half of the Advanced Editor you can edit the [osmwiki:Relation:restriction#Members members] of the turn restriction relation.
     136
     137In addition to the ''from''-way and the ''to''-way, which you can edit in the  [#BasicEditor Basic Editor] too, you can also enter ''via''-objects. (The role `location_hint` is deprecated as it is not verifiable on the ground).
     138
     139To add members just drag-and-drop or copy/paste objects from the JOSM selection view on the right to the list of relation members.
     140
     141You can **reorder** the relation members:
     1421. Select one or more members
     1431. Press **Alt-Up** to move them up by one position. Alternatively you can select **Move up** from the popup menu.
     144
     145 Press **Alt-Down** to move them down by one position. Alternatively you can select **Move down** from the popup menu.
     146
     147To edit the role of a relation member
     1481. Double-click on the table cell with the role
     1491. Edit the role and press **ENTER**
     150
     151=== Resolving Errors and Warnings === #ErrorsAndWarnings
     152[[Image(sample-screen-shot-3.png,link=)]]
     153
     154
     155== Preferences ==#Preferences
     156To launch the preferences panel for the turnrestrictions plugin:
     157
     1581. Click on [[JOSMImage(preference)]] in the JOSM toolbar or press **`F10`**.
     1591. Click on [[Image(source:osm/applications/editors/josm/plugins/turnrestrictions/images/preferences/turnrestrictions.png,24,link=,middle)]] to display the preferences panel for the turnrestrictions plugin
     160
     161[[Image(ticket:21243:preferences-withoutShortCut.png,link=)]]
     162
     163=== Select icon set for road signs ===
     164The turnrestrictions plugin uses one of two icon sets for the type of turn restrictions. In the preferences panel
     165you can configure which icon set should be used, see screenshot above.
     166
     167=== Toggle editing of via-objects in the Basic Editor ===#ToggleEditingOfViaObjects
     168Most turn restrictions entered in OSM have a simple structure. They restrict navigation from one way to another where the two ways have exactly one node in common. This node becomes the only via-object in the turn restriction. In most cases it isn't necessary to display and/or edit it in the Basic Editor. In order to keep simple things simple, the default configuration is therefore not to show via-objects in the Basic Editor.
     169
     170You can override the standard setting, though. If you tick the respective checkbox in the preferences (see screen shot above) the list of via-objects is displayed in the Basic Editor too.
     171
     172
     173== See also ==
     174* [osmwiki:JOSM/Plugins/turnrestrictions Turnrestriction Plugin page] - Historic reference, development of this plugin in 2010-03 was sponsored by [https://www.skobbler.de/ skobbler GmbH]
     175
     176
     177----
     178Back to [wikitr:/Plugins#JOSMdocu Plugin Help] \\
     179Back to [wikitr:/Help Main Help]