Josm/styles/lane features
General
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
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
lanes=<#>
using <#> = total number of lanes
lanes:forward, lanes:backward
These 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
lanes:forward=<f> lanes:backward=<r>
using <f> = count of lanes running in the direction of the way, <r> = count of lanes running in the opposite direction.
lanes:both
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.
width
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.
Tip:
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:
width=<m>
using <m> = width of the way in meters without any dimension suffix. Meters is the default dimension.
turn:lanes
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:
turn:lanes=left|left;straight||straight|slight_right;right|right
- lane: turn to the left
- lane: turn to the left or go straight ahead
- lane: no marking (in this case for demonstration)
- lane: straight ahead
- lane: turn to the right, either slight right or "normal" right
- lane: turn to the right
turn:lanes:forward/backward
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
turn:lanes:forward=<x> turn:lanes:backward=<x>
<x> = the same tags as written at turn:lanes (see above)
access:lanes
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:
access:lanes=yes|yes|psv
is interpreted as two normal lanes and one lane for bus and taxi.
access:lanes:forward/backward
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:
access:lanes:forward=yes|yes|psv access:lanes:backward=...
change:lanes
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:
change:lanes=yes|to_left|no|to_right
change:lanes:forward/backward
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:
change:lanes:forward=no change:lanes:backward=no
Street with 4 lanes, two per direction, overtaking allowed:
change:lanes:forward=to_right|to_left change:lanes:backward=to_right|to_left
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.
cycleway
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:
cycleway:right={track|opposite_track|lane|...} cycleway:left={...} cycleway:both={...}
see cycleway
sidewalk
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:
sidewalk=left sidewalk=right sidewalk=both
lit
Lighted ways (lit=yes) are shown in a color a little more light . Recommended tags:
lit=yes lit=no
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.