Languages:
- Deutsch
- English
- Esperanto
- norsk bokmål
Layer checker
Description
This style displays the value of Key:layer as a colored underlay. This helps to check, if the correct layer
value is tagged without the need to select every single way and look at the layer
value. The following values are allowed: -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. All other values are reported as wrong value. There is a style setting to disallow also layer=0
. The layers -9 to -4 and 4 to 9 each use the same color because layer
values above 4 and below -4 are very rare (and often even errors). See also the legend below. You can change the colors in the Colors preferences of JOSM (also for -9 to -4 and 4 to 9 which use the same color by default). You should use Layer checker together with the default JOSM internal mappaint style. In the List of mappaint styles in the preferences Layer checker need to be below the internal style (which means higher priority).
For ideas/questions/bugs/suggestions or similar please write a message to Klumbumbus. Feel free to translate this wiki page into more languages. Already translated languages see top right.
Example images
Example of Layer checker:
(data used for image ©OpenStreetMap contributors ODbL)
Legend:
Testcenter for quality assurance of this style.
Changelog
(Latest change first)
Version 1.3
- add two new darker colors for values -9 to -4 and 4 to 9 so the values -3 and 3 have an own color
- make the colors for -9 to -3 and 3 to 9 also separate editable by user via the JOSM color preferences
Version 1.2
- made background of icon transparent
Version 1.1
- disable distracting
piste:difficulty
style from internal paint style
Version 1.0
- change default colors
- add icon
- add style setting to disallow
layer=0
Version 0.9
- inital version
Code
meta { title: "Layer checker"; version: "1.3.20_2024-10-12"; description: "Display of layer values by different colors."; icon: "layerchecker.svg"; author: "Klumbumbus"; link: "https://josm.openstreetmap.de/wiki/Styles/LayerChecker"; min-josm-version: "7450"; /* due to mappaint settings */ } meta[lang=de] { title: "Ebenenprüfer"; description: "Anzeige der layer-Werte durch verschiedene Farben."; link: "https://josm.openstreetmap.de/wiki/De:Styles/LayerChecker"; } /* create settings */ setting::allow_layer_0 { type: boolean; label: tr("allow layer=0"); default: true; } /* Changes to the JOSM internal mappaint style elemstyles.mapcss to fit better together with Layer checker */ /* disable tiger layer */ way["tiger:reviewed"=no]::core_tiger { /* no longer part of josm default style since r11229. keep this rule for backwards compatibility. */ opacity: 0; } /* disable street names */ way[highway] { text: none; } /* disable piste:difficulty */ way["piste:difficulty"]::core_piste { width: 0; } way["piste:difficulty"]:closed::core_piste { width: 2; color: grey; } area["piste:difficulty"]:closed::core_piste { fill-opacity: 0; } /* make bridge and tunnel layer wider */ way[bridge]::core_bridge, way[tunnel=yes]::core_tunnel { width: +6; } /* display layer=* */ /* ways */ way["layer"="-9"]::layer { set layer; z-index: -9; color: layer_minus9#720000; } way["layer"="-8"]::layer { set layer; z-index: -8; color: layer_minus8#720000; } way["layer"="-7"]::layer { set layer; z-index: -7; color: layer_minus7#720000; } way["layer"="-6"]::layer { set layer; z-index: -6; color: layer_minus6#720000; } way["layer"="-5"]::layer { set layer; z-index: -5; color: layer_minus5#720000; } way["layer"="-4"]::layer { set layer; z-index: -4; color: layer_minus4#720000; } way["layer"="-3"]::layer { set layer; z-index: -3; color: layer_minus3#ff0000; } way["layer"="-2"]::layer { set layer; z-index: -2; color: layer_minus2#ff7519; } way["layer"="-1"]::layer { set layer; z-index: -1; color: layer_minus1#ffff00; } way["layer"="0"][setting("allow_layer_0")]::layer { set layer; z-index: 0; color: layer_0#b8b8b8; } way["layer"="1"]::layer { set layer; z-index: 1; color: layer_1#00ff00; } way["layer"="2"]::layer { set layer; z-index: 2; color: layer_2#00ffff; } way["layer"="3"]::layer { set layer; z-index: 3; color: layer_3#9933ff; } way["layer"="4"]::layer { set layer; z-index: 4; color: layer_4#46008D; } way["layer"="5"]::layer { set layer; z-index: 5; color: layer_5#46008D; } way["layer"="6"]::layer { set layer; z-index: 6; color: layer_6#46008D; } way["layer"="7"]::layer { set layer; z-index: 7; color: layer_7#46008D; } way["layer"="8"]::layer { set layer; z-index: 8; color: layer_8#46008D; } way["layer"="9"]::layer { set layer; z-index: 9; color: layer_9#46008D; } way.layer::layer { opacity: 0.9; width: 20; major-z-index: 1.9; /* below bridge layer of default style, to see the bridge */ } /* nodes */ node["layer"="-9"]::layer { set layer; z-index: -9; symbol-fill-color: layer_minus9#720000; } node["layer"="-8"]::layer { set layer; z-index: -8; symbol-fill-color: layer_minus8#720000; } node["layer"="-7"]::layer { set layer; z-index: -7; symbol-fill-color: layer_minus7#720000; } node["layer"="-6"]::layer { set layer; z-index: -6; symbol-fill-color: layer_minus6#720000; } node["layer"="-5"]::layer { set layer; z-index: -5; symbol-fill-color: layer_minus5#720000; } node["layer"="-4"]::layer { set layer; z-index: -4; symbol-fill-color: layer_minus4#720000; } node["layer"="-3"]::layer { set layer; z-index: -3; symbol-fill-color: layer_minus3#ff0000; } node["layer"="-2"]::layer { set layer; z-index: -2; symbol-fill-color: layer_minus2#ff7519; } node["layer"="-1"]::layer { set layer; z-index: -1; symbol-fill-color: layer_minus1#ffff00; } node["layer"="0"][setting("allow_layer_0")]::layer { set layer; z-index: 0; symbol-fill-color: layer_0#b8b8b8; } node["layer"="1"]::layer { set layer; z-index: 1; symbol-fill-color: layer_1#00ff00; } node["layer"="2"]::layer { set layer; z-index: 2; symbol-fill-color: layer_2#00ffff; } node["layer"="3"]::layer { set layer; z-index: 3; symbol-fill-color: layer_3#9933ff; } node["layer"="4"]::layer { set layer; z-index: 4; symbol-fill-color: layer_4#46008D; } node["layer"="5"]::layer { set layer; z-index: 5; symbol-fill-color: layer_5#46008D; } node["layer"="6"]::layer { set layer; z-index: 6; symbol-fill-color: layer_6#46008D; } node["layer"="7"]::layer { set layer; z-index: 7; symbol-fill-color: layer_7#46008D; } node["layer"="8"]::layer { set layer; z-index: 8; symbol-fill-color: layer_8#46008D; } node["layer"="9"]::layer { set layer; z-index: 9; symbol-fill-color: layer_9#46008D; } node.layer::layer { symbol-size: 26; symbol-shape: circle; z-index: -1; symbol-fill-opacity: 0.9; } /* report wrong value of layer */ way!.layer[layer]::layer { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("no correct value for layer!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } node!.layer[layer]::layer { symbol-shape: triangle; symbol-fill-color: red; symbol-size: 30; symbol-stroke-color: yellow; text: tr("no correct value for layer!"); }
Attachments (4)
-
example.png
(340.5 KB
) - added by 10 years ago.
Example (NOZIP)
-
layerchecker.svg
(216 bytes
) - added by 5 years ago.
Icon
-
legend.png
(108.7 KB
) - added by 6 months ago.
Legend (NOZIP)
-
Testcenter.osm
(38.1 KB
) - added by 6 months ago.
Testcenter (NOZIP)
Download all attachments as: .zip