Forward & backward, left & right
![]() |
![]() |
Description |
Used to describe position or direction relative to a way. |
Tags |
When adding details to highways or other ways, it is often important to differentiate between the direction of travel or the side of the way. To do this we define the four terms forward, backward, left and right, which all depend on the direction in which the way is drawn in OpenStreetMap.
Contents
Definition
It is important to know the difference between codes forward/backward and left/right when they are used as tag key suffixes (or in some tag values) indicating a direction or side relative to a way.
Forward and backward
The tag values (or key suffixes) forward and backward describe a direction along a way, but not a side of the way. The code forward means the direction in which the way is drawn in OpenStreetMap, while backward means the opposite direction.
The oneway=yes tag is a good example of a direction-dependent feature: if this tag is added to a way, it becomes a one-way in the forward direction, but the oneway=-1 tag means the same way drawn in the reverse direction so that the one-way is in the backward direction.
Left and right
The tag values (or key suffixes) left and right describe a side of a way, but not a direction along the way. left means the left-hand side of the way when looking in the forward direction (as defined above), while right means the right-hand side also when looking in the same direction.
Both
Depending on the key,
- both (or both_ways used sometimes) includes both directions (forward and backward) of a way — for example in overtaking=*; or
- both (or both_sides used sometimes) includes either both sides (left and right) of a way — for example in sidewalk=*.
Tagging
As part of the key
Forward, backward, left and right are often appended as a namespace to a tag's key. This is done by adding a colon and the desired direction or side to the key.
Examples include:
- maxspeed:forward=* - maximum speed which only applies in forward direction
- lanes:backward=* - number of lanes in backward direction
- cycleway:left=* - a cycleway on the left side of the road
- parking:lane:both=* - a parking lane on both sides of the road
- name:left=*, name:right=* - e.g. when street name is different on the right and left side
As value
Forward, backward, left and right are also sometimes used as a tag's value. In this case, no additional namespace is added to the key of the tag.
Examples include:
- sidewalk=left - the side(s) of the road where sidewalks are present
- traffic_signals:direction=forward - the direction of travel affected by traffic signals
Identifying the direction of a way
iD
In iD the direction of a selected way is indicated by the triangular midpoints half way between each pair of nodes on a way (note that clicking and dragging these midpoints will add a new node to the selected way). Furthermore grey arrows are shown on the way (even when not selected) if it is tagged with a oneway=* tag. The arrow direction is the opposite of the way direction if it is tagged oneway=-1.
Potlatch 2
In Potlatch 2 the direction of a selected way is shown ...
- ... in the toolbox in the bottom right hand corner (the arrow will rotate to indicate the selected way's direction, calculated by using the first and last node, arrowhead at last node equivalent).In Potlatch 2 the direction of a selected way is shown in the toolbox.
- ... if you choose the "Enhanced" map view in Potlatch 2 the direction is indicated by small, light grey arrows on the way itself. This only works if the way is tagged with key highway, railway or waterway (+ maybe also some other keys) and is currently not tagged as oneway street (reason follows).
- If ways are tagged as oneway streets then they always show bigger, grey arrows which indicate the allowed oneway direction (which is the opposite of the way direction if it is tagged
oneway=-1
).
JOSM
In JOSM arrows are shown on the selected way. To show arrows for all ways, go to menu Edit → Preferences → Display Settings page → "OSM Data" tab: check "Draw Direction Arrows".
Merkaartor
In Merkaartor, you can switch way direction display between always-on, always-off and only-oneways in the View menu.
Data view on osm.org
The node list of a way in the data view on osm.org is sorted with the top/first node in the list being the start/first node of the way respectively the bottom/last node in the list being the end/last node of the way. Example way data view (iD, JOSM, Potlatch2, history, XML). The data layer helps you to get to such a page.
See also
- Category:Way Direction Dependent - Category of tags that depend on way direction
- The proposal page for ':right' and ':left' - Proposed features/right left
- Proposed features/Suffix both_ways