wiki:Ru:Styles/hazmat

Version 1 (modified by ak099, 8 years ago) ( diff )

--

Другие языки:

hazmat

Описание

Стиль отрисовки карты "hazmat" показывает цветом значения hazmat =* и hazmat:water=* (классификация разрешения на транспортировку опасных материалов).

Дополнительно он сообщает о необычных значениях тега hazmat.

Цвета можно изменить в окне настроек JOSM.

Стиль отрисовки hazmat можно использовать совместно со стандартным встроенным стилем отрисовки JOSM. Названия дорог, если они вам мешают, можно отключить в настройках встроенного стиля.

Об идеях, вопросах, ошибках, предложениях и т.п. пишите Klumbumbus.

Переводите эту wiki-страницу на другие языки. Языки, на которые она уже переведена, можно увидеть наверху справа.

legend (NOZIP)

example (NOZIP)

(data used for image ©OpenStreetMap contributors ODbL)

Код

meta
{
    title: "hazmat";
    version: "1.04_2020-10-05";
    description: "Displays hazmat=* and hazmat:water=* coloured.";
    icon: "Zeichen_261.svg";
    author: "Klumbumbus";
    link: "http://josm.openstreetmap.de/wiki/Styles/hazmat";
    watch-modified: true;
    /* min-josm-version: "????"; not sure if there is one */
}

meta[lang=de]
{
    title: "Gefahrgut (hazmat)";
    description: "Zeigt hazmat=* und hazmat:water=* farbig an.";
    link: "http://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;
}

Ru:Styles_hazmat-style.mapcss, Ru:Styles_hazmat.zip

Note: See TracWiki for help on using the wiki.