Relation:restriction: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
m (fix)
(examples)
Line 18: Line 18:
View current restriction relations in the database - [http://osm.virtuelle-loipe.de/restrictions/ Restriction Analyser]
View current restriction relations in the database - [http://osm.virtuelle-loipe.de/restrictions/ Restriction Analyser]



__TOC__
<br clear="all"/>
== Tags ==
== Tags ==
{| class="wikitable" border="1" cellspacing="0" cellpadding="2" width="100%"
{| class="wikitable" border="1" cellspacing="0" cellpadding="2" width="100%"
Line 129: Line 128:


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

== Examples ==

{|class="wikitable"
|-
|Map || Tag and Members || Descriptions
|-
|[[Image:only_right_restriction.png]]
|restriction=only_right_turn<br>
way A role from<br>
way B role to<br>
node n role via
|At '''n''' from '''A''' only turning right to '''B''' is allowed. So turning to left is forbidden.
|-
|[[Image:no_left_restriction.png]]
|restriction=no_left_turn<br>
way A role from<br>
way B role to<br>
node n role via
|Turning left form '''A''' to '''B''' is not allowed at '''n'''. But going straight and right is not forbidden. The other 3 restrictions at this crossing have to be defined all separate.
|-
|}


== See Also ==
== See Also ==

Revision as of 18:57, 26 January 2009

Public-images-osm logo.svg restriction
France road sign B2b.svg
Description
Used for a set of tags and members to represent a turn restriction. Show/edit corresponding data item.
Group: Restriction
Members
  • way - from
  • way - to
  • way node - via
  • node - location_hint
Status: de facto

This is a proposal for a set of tags and members making a Relation to represent a turn restriction at a junction or other restrictions (you don't have to be turning - you may not be allowed to go straight on - e.g. a bus gate is a kind of junction where the restriction is no passage from one side to the other - except for buses of course).

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

There is no need to model no turning into the wrong way of a one way street - we take this for granted.

View current restriction relations in the database - Restriction Analyser


Tags

Key Value Explanation
type restriction
restriction no_right_turn / no_left_turn / no_u_turn / no_straight_on / only_right_turn / only_left_turn / only_straight_on

If the first word is "no", then no routing is possible from the "from" to the "to" member, and if is is "only_", then you know that the only routing originating from the "from" member leads to the "to" member.
The "from" and "to" members must start/end at the "via" node (see 1).

except psv / bicycle / hgv / motorcar The restriction does not apply to these vehicle types (possible 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
  1. If the way do not start/end at the "via"-node, split it!
  2. Avoid using ways as the "via" member unless you absolutely have to - not all routing implementations will support ways as "via" members. You are on the safe side if your "via" member is a node.

Members

Way or Node Role Recurrence? Discussion
way from one a way from which restriction starts (e.g. no right turn from here)
way to one the other end of the restriction
way node via one ore more the nodes or ways 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.
node location_hint optionally one 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

Road Sign Restriction Remark
1 a File:No left turn a.png / b File:No left turn b.png restriction=no_left_turn a) germany, italy

b) france, spain, poland, ireland, uk

2 a File:No right turn a.png / b File:No right turn b.png restriction=no_right_turn a) germany, italy / b) france, spain, poland, ireland, uk
3 a File:No straight on a.png / b No straight on b.png restriction=no_straight_on a) germany, poland / b) ireland

(uk never uses such signs - you would be facing a No Entry sign in such a situation)

4 a No u turn a.png / b No u turn b.png restriction=no_u_turn a) germany, france, spain, poland / b) united kingdom
5 a File:Only right turn a.png / b File:Only right turn b.png restriction=only_right_turn (a) typically approaching the junction and (b) at the junction
6 a File:Only left turn a.png / b File:Only left turn b.png restriction=only_left_turn -
7 File:Only straight on a.png restriction=only_straight_on -

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.

Examples

Map Tag and Members Descriptions
Only right restriction.png restriction=only_right_turn
way A role from
way B role to
node n role via
At n from A only turning right to B is allowed. So turning to left is forbidden.
No left restriction.png restriction=no_left_turn
way A role from
way B role to
node n role via
Turning left form A to B is not allowed at n. But going straight and right is not forbidden. The other 3 restrictions at this crossing have to be defined all separate.

See Also