Key:direction

From OpenStreetMap Wiki
Jump to navigation Jump to search
direction
Description
Specifies the direction of a feature. Show/edit corresponding data item.
Group: properties
Used on these elements
may be used on nodesmay be used on waysmay be used on areas (and multipolygon relations)may be used on relations
Status: approvedPage for proposal

The key direction=* is used to specify the direction of a feature in a variety of meanings in OSM. The most common ones are Cardinal, Relative, Traffic, Parking and Rotation.

Meanings

Cardinal

Cardinal directions can be used on independent nodes or areas. They are not allowed to specify directions on a way.

For nodes, the common use is the direction of a view from a viewpoint, bench, cliff, cave entrance or hunting stand. For areas, examples are the direction of planting in vineyards or the direction of roof ridge.

Value Element Description
<number> nodearea The given number specifies the degrees from 0 to 359 in which the feature faces, where 0 is equal to northward, using clockwise rotation.
<abbreviation> nodearea One of the 16 main or first or secondary intercardinal directions, specified as its abbreviation using up to three uppercase characters [NWSE], e.g. NE means north-east.
<range> nodearea A degree number range or abbreviation range to specify the field of view of a feature faces. The sector is calculated clockwise from the given range border values.
<word> nodearea One of the four main cardinal directions, spelled out in lowercase. Not recommended.

All possible values for abbreviations are shown with their corresponding degrees in this compass rose:

The word values north/south/east/west may be used as synonyms for the abbreviations N/S/E/W to describe a cardinal direction. This may conflict with the traffic meaning (see below) and is therefore not recommended. Also directions should not be specified in an ordinal form such as north-east.

Examples

Bench facing east:

 amenity=bench
 direction=90  (or direction=E)

Cave entrance facing north-north-west (View from inside the cave):

 natural=cave_entrance
 direction=NNW

View point on the northern hemisphere to observe the sun path:

tourism=viewpoint
direction=67-292  (or direction=WSW-ESE for the same sector on the southern hemisphere)

Note that independent traffic signs traffic_sign=* are tagged the direction the sign faces, i.e., against the direction of travel. For example, when travelling west, signs are facing east, so you tag them with the cardinal direction=E or direction=90. But if the node of the sign is connected to the highway, then the relative direction tagging scheme comes into effect (see below).

Renderers may calculate the effect for points like tourism=viewpoint, tower:type=observation or historic=cannon on their behalf if a numeric range is not given. To explicitly map a 360° panorama view direction=0-360 may be used [1][2]. Samples: OpenTopoMap renders along their rules, Osmtools draws circles or sectors and historic.place points cannons.

Relative to OSM way

The values forward & backward and left & right can be used to specify the direction relative to an existing way. This applies to a node that is part of a way. Examples may include directed traffic signs.

Key Value Element Description
direction forward node (part of way) The direction is forward, relative to how the associated way was drawn in the editor.
direction backward node (part of way) The direction is backward, relative to how the associated way was drawn in the editor.

Note that this tagging is ambiguous if the node belongs to more than one way! So use directions only on nodes which are part of exactly one way (or, depending on context, highway=*). Avoid junction nodes and connecting nodes as well. Better insert a new node into the way which can be freshly tagged.

Do not use the simple direction tag for highway=traffic_signals and traffic_sign=* that are part of a way, instead use traffic_signals:direction=forward/backward and traffic_sign:direction=forward/backward. Unfortunately a lot of road-bound traffic signs have still the key direction still set.

If these nodes are placed at their real position next to the road, the cardinal direction should be used.

Traffic routes

To describe the general direction of traffic on touristic, highway, bus or railway relation type=routes a variety of descriptive values can be used.

In Canada, New Zealand, and the United States, the official cardinal direction along the route when both directions are mapped as separate relations within a superrelation.

For the case of specifying the posted direction of travel along route relations in Canada, New Zealand, and the United States spelled-out cardinal are used. As of August 2021, spelled-out directions were 13 times more common than abbreviations on route=road relations and 9½ times more common than abbreviations on route relations overall.

Carriers may have very specific direction naming schemes for their trains.


Parking direction

Sign from Germany stating "Parking head in only"
Back-in angle parking (sign in California)

The key direction=* can be used to specify special rules on parking directions for back-in and head-in parking. These rules determine the direction of parking/driving into a diagonal or perpendicular parking space. These include back-in angle parking (reversed/back-in diagonal parking - a traffic engineering technique intended to improve the safety of on-street parking) and rules for head in or back in perpendicular parking (e.g. to prevent car exhausts from reaching the roadside). When such rules apply, they are usually signposted with a special sign or are indicated by markings.

If the parking spaces along the road are mapped as attributes of the street, use this key with the street parking prefix (e.g. parking:right:direction=* or parking:both:direction=*). If the parking spaces are mapped separately (tagged with amenity=parking), just use direction=* without prefix. Use one of the following values:

Value Illustration Description
back_in The vehicle must be parked with the rear facing the side of the road (i.e. with the front facing the middle of the road). In combination with parking:side:orientation=diagonal, this means Reversed/back-in diagonal parking (parking space direction is inverted in this case).
head_in The vehicle must be parked with the front facing the side of the road (i.e. with the rear facing the middle of the road). Note: Usually only exists in combination with parking:side:orientation=perpendicular, as head in parking is the standard for diagonal parking and does not need to be explicitly tagged. For back-in diagonal parking, see back_in above.


Rotation

On highway=mini_roundabout nodes different values for direction key are used.

Value Element Description
anticlockwise node The mini-roundabout runs anti-clockwise.
clockwise node The mini-roundabout runs clockwise.

Note that the default value for roundabouts in general depends on the territory where they are located. Mostly it is anti-clockwise in countries driving on the right side of bidirectional highways. In countries (or territories) with Left-hand traffic (e.g. United Kingdom or Hong Kong SAR) it is clockwise.

Roundabouts and mini-roundabouts are themselves not bidirectional so the driving direction is almost always given by the public traffic rules. Cases where the effective direction is reversed (and requiring this tag to be set) are extremely rare on non-public roads.

See also