Restrictions are used to limit use of a highway in some way. This may be to prevent use by a sub-group (for example, vehicles over 12 meters in length), or to impose conditions on it's use (for example a maximum speed of 80 km/h). To understand how to tag restrictions it may be helpful to classify the restriction by its level of complexity:
- Long standing tags such access, oneway, maxweight, maxspeed, and so on, make it easy to add simple restrictions to OpenStreetMap. Although they are the easiest to understand the tags are limited to just the most basic of cases. For a list of common tags, see Types of restriction below.
- If the restriction only applies to certain transportation modes (vehicle category) or directions, the tag key can be extended by appending this information after the restriction type. For more, see Extending restrictions below.
- In some cases restrictions are only valid when certain conditions are fulfilled. Examples may be cars not allowed on Sundays or a lower maxspeed applicable between 6:00 and 20:00. See Conditional restrictions.
This document describes general aspects on how restrictions can be tagged.
Types of restriction
Legal access restrictions
The access tag is used to describe the legal access for highway's and other facilities including building entrances. Possible tag values include 'yes', 'no', 'private', 'delivery' and so on. Note that these values are used no only with the access=* tag, but also with tags associated to particular forms of transport:
- Ex 1. Access to the tagged highway is private for all transportation modes, including on foot.
- Ex 2. Heavy Goods Vehicles (HGV's) can use the tagged highway for delivery only, and not as a through road.
- For more information see key:access.
Size and statutory restrictions
A number of statutory restrictions based on height, width, weight etc can also be defined. A assumed units are the appropriate SI unit and should be specified without any suffix. For lengths use metres, for weights use metric tonnes and for times use hours. Decimal numbers should include a decimal point. Exceptions include speeds which should be in mph in places where speed limits are defined in these units and times which can include a suffix of 'days' if appropriate.
Ways may have different access restrictions for each direction. The most simple case is a way designated as a oneway road:
- oneway=yes driving is only allowed in the direction of the way
- oneway=-1 driving is only allowed against the direction of the way
- oneway=no default, access is allowed in both directions (this key/value combination does not normally need to be added to ways, unless another tag such as highway=motorway_link implies oneway=yes)
The restriction tags given above can be extended to indicate additional information about a restriction. Existing tag keys such as access, oneway, maxweight and maxspeed are extended by appending the extra details to the end of existing tag key. The additional information may include:
- The type of transportation mode (vehicle category) affected
- and/or the direction in which the restriction applies.
- Note: If further information is required in order to accurately capture the full nature of a restriction, these can be expressed as 'true conditions' and tagged using the 'Conditional Restrictions' tagging scheme.
The general syntax of the tag is as follows (fields in square brackets [..] are optional):
<restriction-type>[:<transportation mode>][:<direction>]= *
This can be any type of restriction from the lists above.
This key-part specifies the vehicle category or transportation mode to which the restriction applies. E.g. bicycle, motor_vehicle, foot, agricultural. For access restrictions it is allowed to use the abbreviated form by omitting access: in front of the category. E.g. motorcar instead of access:motorcar. Please note that the value agricultural designates the type of vehicle (not the purpose of the highway use) and is therefore a valid transportation mode. For "By use" modes (hov, emergency, hazmat, disabled) it is however recommended that you consider these to be true conditions and therefore tag the restriction using the 'Conditional Restrictions' tagging scheme.
- See Key:access for the full transportation mode hierarchy.
Some restrictions are direction dependent. Use forward and backward to indicate in which direction the restriction applies. The value depends on the direction in which the way is drawn in OpenStreetMap. For guidance on how to identify this in Potlatch 2 and for more information click here.
In some cases restrictions are only valid when certain conditions are fulfilled. For example the restriction may be limited to a particular time or day, or may only apply to vehicles over a certain weight. Such conditions can be tagged as shown in these tagging examples:
- Ex 1. A lower speed limit of 60 kph applicable only between 06:00 and 20:00:
maxspeed:conditional=60 @ (06:00-20:00)
- Ex 2. Only destination access is permitted during 8am and 5pm on Mondays to Fridays:
access:conditional=destination @ (Mo-Fr 08:00-17:00)
- Ex 3. Motor vehicles heavier than 5 tonnes may only access this street for the purpose of delivering goods:
motor_vehicle:conditional=delivery @ (weight>5)
Please note that the above tagging style can be used to replace the following time dependent restrictions. It has been suggested that they be deprecated and should therefore no longer be used. date_on=*, date_off=*, day_on=*, day_off=*, hour_on=*, hour_off=*
- For a full description and more examples, please see the conditional restrictions page.
Lane dependent restrictions
Access restrictions may differ between lanes. This detail can be included by adding the :lanes sub-key. It is suggested that the sub-key be added after the transportation mode, but before the direction:
- hgv:lanes=*no|yes|yes (Heavy good vehicles are not allowed on the leftmost lane of a road with three lanes)
- bus:lanes:forward=*no|yes|designated (Buses are not allowed on the leftmost lane of a road with three lanes in forward direction. The rightmost lane is a designated bus lane)
- For more details about lane-dependent tags see Lanes.
These restrictions either use their own tagging schemes that are not comparable to the general scheme presented in this article, or are not related to highway map featreus. See the wiki pages for the respective tags for a full description.
|maxstay=*||Maximum time allowed to stay at the element such as a carpark or parking lane.|
|parking:lane=*||Parking lane features including parking restrictions are tagged using its own tagging scheme.|
|type=restriction||Turn restrictions are tagged using relations which use their own tagging scheme.|
|toll=*||Toll road. Vehicles must pay a fee to use this road. See also barrier=toll_booth|
|traffic_sign=city_limit||Start/end sign of city limits. In most areas such signs imply the start or end of urban zone speed limits|
|maxheight:physical=*||The physical height restriction.|
|width=*||The physical width of the entire road or other map feature.|
cycleway=opposite_lane (if a separate lane exists)
cycleway=opposite_track (if a separate track exists).
|Cycleway tags that could all be considered to imply oneway:bicycle=yes.|