hazmat
Description
The mappaint style "hazmat" displays the value of hazmat =* and hazmat:water=* coloured.
Additional it reports unusual values of hazmat.
You can adjust the colours in the preference window of JOSM.
You can use the hazmat mappaint style together with the default JOSM internal mappaint style. You can disable the names of highways in the style settings of the internal style if they bother you.
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.
(data used for image ©OpenStreetMap contributors ODbL)
Code
meta { title: "hazmat"; version: "1.06_2020-10-05"; description: "Displays hazmat=* and hazmat:water=* coloured."; icon: "Zeichen_261.svg"; author: "Klumbumbus"; link: "https://josm.openstreetmap.de/wiki/Styles/hazmat"; /* min-josm-version: "????"; not sure if there is one */ } meta[lang=de] { title: "Gefahrgut (hazmat)"; description: "Zeigt hazmat=* und hazmat:water=* farbig an."; link: "https://josm.openstreetmap.de/wiki/De:Styles/hazmat"; } /* disable tiger layer from default internal mappaint style */ way["tiger:reviewed"=no]::core_tiger { opacity: 0; } /* display hazmat on ways */ way["hazmat"="yes"]::hazmat, way["hazmat"="no"]::hazmat, way["hazmat"="designated"]::hazmat, way["hazmat"="destination"]::hazmat { set correct_hazmat_value; width: 14; z-index: -1.1; } way["hazmat:water"="yes"]::hazmatwater, way["hazmat:water"="no"]::hazmatwater, way["hazmat:water"="permissive"]::hazmatwater, way["hazmat:water"="destination"]::hazmatwater { set correct_hazmatwater_value; width: 14; z-index: -1; } way|z12-16.correct_hazmat_value::hazmat, way|z12-16.correct_hazmatwater_value::hazmatwater { width: 12; } way|z-11.correct_hazmat_value::hazmat, way|z-11.correct_hazmatwater_value::hazmatwater { width: 10; } /* dashed if both keys are present */ way.correct_hazmatwater_value[is_prop_set(correct_hazmat_value, hazmat)]::hazmatwater { dashes: 20,20; } /* the colors can be adjusted within JOSM color preferences */ way["hazmat"="yes"]::hazmat { color: hazmat_yes#FFEE00; /* yellow */ } way["hazmat"="no"]::hazmat { color: hazmat_no#FF0000; /* red */ } way["hazmat"="designated"]::hazmat { color: hazmat_designated#00FF00; /* green */ } way["hazmat"="destination"]::hazmat { color: hazmat_destination#FF9714; /* orange */ } way["hazmat:water"="yes"]::hazmatwater { color: hazmat_water_yes#6FEDFB; /* light blue */ } way["hazmat:water"="no"]::hazmatwater { color: hazmat_water_no#6B4EB1; /* purple */ } way["hazmat:water"="permissive"]::hazmatwater { color: hazmat_water_permissive#2437FF; /* blue */ } way["hazmat:water"="destination"]::hazmatwater { color: hazmat_water_destination#000C8B; /* dark blue */ } /* display german traffic signs */ node["traffic_sign"^="DE:261"] { icon-image: "Zeichen_261.svg"; } node["traffic_sign"^="DE:269"] { icon-image: "Zeichen_269.svg"; } node["traffic_sign"^="DE:354"] { icon-image: "Zeichen_354_-_Wasserschutzgebiet,_StVO_1992.svg"; } /* report wrong value of hazmat and hazmat:water */ way["hazmat"]!.correct_hazmat_value::hazmat { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("unusual value for hazmat!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } way["hazmat:water"]!.correct_hazmatwater_value::hazmatwater { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("unusual value for hazmat:water!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; }
Attachments (5)
- Zeichen_261.svg (3.2 KB ) - added by 8 years ago.
- Zeichen_269.svg (2.3 KB ) - added by 8 years ago.
- Zeichen_354_-_Wasserschutzgebiet,_StVO_1992.svg (13.0 KB ) - added by 8 years ago.
-
legend.png
(15.9 KB
) - added by 8 years ago.
legend (NOZIP)
-
example.png
(48.0 KB
) - added by 8 years ago.
example (NOZIP)
Download all attachments as: .zip