Josm/styles/lane features

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Josm/styles/lane features
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen Kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk bokmål norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް


This style lane features shall enable mappers to control their input for completeness and correctness in a complex but clear rendering. Lanes are not shown as different colors but as realistic lanes as far as possible in JOSM.

The style is pretty new and should be used with caution. During test phase and as far as feedback is coming from mailing lists, there were no actual program crashes caused by this style. However JOSM is slown down considerable specially in the arrow version of the style depending on the performance of your actual hardware.

There are two versions of the style: colored and using direction arrows. The version using direction arrows might be more pleasant to you but uses much more resources depending on the small posibilities of rendering pictures in JOSM.

Interpreted Tags


lanes = total number of lanes of the way. If it's not a one-way road it is supposed lanes are partioned symmetrically into both directions. Having odd numbers one lane in the middle is shown in yellow color and is assumed to serve both directions. Lanes can be used in combination with lanes:forward and lanes:backward providing a clear split into both directions.

Recommended tags


using <#> = total number of lanes

lanes:forward, lanes:backward

This tags are describing the count of lanes running in the direction of the way respectively in the opposite direction (backward). Giving only the forward or backward tag the missing value is calculated automatically if the total number of lanes is provided.

Recommended tags


using <f> = count of lanes running in the direction of the way, <r> = count of lanes running in the opposite direction.


This tag describes the number of lanes (in the middle of the street) serving both directions, e.g. avoiding that vehicles left-turning to driveways hinder through-going traffic. If not defined explicitly this tag will be assumed to 0 if total number of lanes is served and is even. Having odd numbers it will be guessed to be 1. If the amount of lanes serving both directions is less than the total number of lanes the difference will be supposed to be lanes:both in the middle of the street. Negative value by input mistake will be set no 0.

Recommended tags:

lanes:both = <m>

serving <m> as lanes in the middle of the street. If <m> = 0 (as normally) it should be omitted.


The tag describes the width of the street in meters without any dimension. The suffix '_m' recommended in Wiki does not work, mapcss is not able to transform it into a decimal value. Width can be used with and without the lanes-tag. Using this tag streets will be shown in a relating width to each other. Is width missing, it is assumed from a standard-width of 3.5 meters per lane. If both width and lanes tags are missing, the object will be shown only in josm standard style.

If you zoom josm so that shown width of lane joins width scaled width (josm mapcss supports no scale information but only zoomlevels ending at 19) objects like hydrants can be positioned meeting their place relative to the street. In advance the street itself should be positioned very exactly. The meeting zoomlevel varies and depends on your system. You can detect the right zoomlevel zooming in and out and measuring the shown width of a street which real width is known using the josm measurement plugin.

Recommended tags:


using <m> = width of the way in meters without any dimension suffix. Meters is the default dimension.


This complex tag describes turn lanes at crossings and junctions. Data of each particular lane is separated by the pipe-sign (|). The style recognizes the tags straight, through, *left and *right and any combination of two of them. Lanes are counted from left to right. However this tag is not quite clear. On one hand whole width of the street should be affected, on the other hand nearly nobody would keep an overview if the tagging deals with lanes in different directions. Additional reversing the direction of the way would lead in a chaotic situation because all lanes would run in the wrong direction at the wrong side of the street. Because of this the style handles the tag turn:lanes as turn:lanes:forward. That means lanes are counted from left to right beginnig in the middle of the street if it is no one-way road.

Therefor turn:lanes should only be used on one-way roads ore at seperated ways running all lanes in the same direction where hopefully no one will reverse the direction of the way.

Lanes not marked with direction-arrows can be omitted by two separators "||", ore tagged with "none" which is ignored by the style.

Recommended tags:

to the left:                    left, sharp_left, slight_left 
to the right:                   right, sharp_right, slight_right
straight: (2 values in wiki)    straight, through
merging into other lane:        merge_to_left, merge_to_right
lane separator:                 |

Because of the possibilities of JOSM mapcss the rendering is equal for all *right respective *left - elements. Remember josm is an editor, no renderer. This style is only for controlling the tags.

Example given a way with six lanes:

  1. lane: turn to the left
  2. lane: turn to the left or go straight ahead
  3. lane: no marking (in this case for demonstration)
  4. lane: straight ahead
  5. lane: turn to the right, either slight right or "normal" right
  6. lane: turn to the right


It is strictly recommended not to use turn:lanes but turn:lanes:forward/backward for the reason of inexperienced mappers possibly changing the direction of the way.

All values ending *left or *right (merge_to_left, sharp_right, right ...) are shown by this style in the same manner because until today it's not possible to show more than one graphics on the same line using different offsets. So all symbols are generated by using dash-function, seven different dashes per possible sign and per line.

For saving resources on less powerful systems there is a second version showing colors green as right, red as left and yellow as straight. It's not so obvious but saving resources.

Recommended tags


<x> = the same tags as written at turn:lanes (see above)


This tag is used as turn:lanes above. You can use the values listed in tag access but there is a difference. In key access all values first are set to no and then vehicle for vehicle is set yes. If you try to do so in this tag for every lane no mapper would overlook the result. So the style takes the values as exclusive. If the value is yes all vehicles are allowed in this lane, if the values is bus, only bus is allowed. To allow more than one type use a list and the separator ';' e.g. motorcar;hgv.

Today only yes for all vehicles and psv for bus and taxi is used by the style.

Recommended tags:


is interpreted as two normal lanes and one lane for bus and taxi.


The problem of forward/backward was already diskussed before turn lanes. Access should be defined with the values forward/backward in the respective direction too. Take the same values as access:lanes.
Recommended values:



This tag is rather new. It describes the possiblity of changing from one lane to the other on both side. It is used like the other lane tags with separator '|'. Using forward/backward ist the same as turn:lanes. The style accepts yes for changing to both sides, to_right means changing one line to the right, to_left means changing one line to the left, and no means no legal change is possible.

Recommended tags:



Like the other lane tags, this one should be used only in the forward/backward-version if there is two-way traffic in the street. The ban of passing in streets with one lane per direction can be expressed by a "no" in the respective direction.

If the change of the lane is not allowed, a closed line is rendered.

Recommended tags:
Street with 2 lanes, one per direction, overtaking prohibited:


Street with 4 lanes, two per direction, overtaking allowed:


Instead of the final to_left it would be right to tag a yes too because at the right is no more lane to change to. At the left side to_right signs that passing the center line of the street is not allowed.


Rendered tag: cycleway:right/left/both = track. The roadside is shown in blue color (like mapnik cycleway). The width of the cycleway is about 1.25 m in relation to the width of one lane at 3.5 m. A width-tag relating the cycleway is not yet interpreted.

Recommended tags:


see cycleway


Interpreted is sidewalk = left/right/both. The roadside is colored orange. Is a cycleway tagged too, it is colored green. The width of the sidepath is about 1.5 m, in combination with a cycleway about 2.5 m in relation of one lane at 3.5 m. A width-tag relating the sidepath and/or cycleway is not yet interpreted.

Recommended tags:



Lighted ways (lit=yes) are shown in a color a little more light . Recommended tags:


Lit=no is the same as a missing lit=yes but it shows to other mappers that the lighting of the street is already checked.