Changes between Version 1 and Version 2 of El:Styles/UkraineRoadNetwork


Ignore:
Timestamp:
2025-05-05T15:38:07+02:00 (10 months ago)
Author:
stoecker
Comment:

Drop code

Legend:

Unmodified
Added
Removed
Modified
  • El:Styles/UkraineRoadNetwork

    v1 v2  
    2525== Κώδικας ==
    2626
    27 
    28 {{{
    29 #!style type="mapcss"
    30 
    31 meta {
    32         title: "Ukraine Road Network";
    33         version: "1.[[revision]]_[[date]]";
    34         description: "This style aids in mapping the Ukrainian road network as recognised by Ukrainian law. It facilitates error correction, intersection identification, and detection of gaps in the road network.";
    35         author: "Anton Melnichuk";
    36         icon: "UkraineRoadNetwork.png";
    37         link: "https://josm.openstreetmap.de/wiki/Styles/UkraineRoadNetwork";
    38 }
    39 meta[lang=uk] {
    40         title: "Українська мережа доріг";
    41         description: "Цей стиль допоможе визначити сітку Українських дорог які є і обліковуються Українським законодавством, і допоможе виправити помилки, знайти перетини, а також дірки у дорожному графі.";
    42 }
    43 
    44 
    45 setting::colordisplayM {
    46         type: color;
    47         label: tr("Color used for displaying 'М-' roads");
    48         default: colorDisplayCustomPref#42FF77;
    49 }
    50 setting::colordisplayH {
    51         type: color;
    52         label: tr("Color used for displaying 'H-' roads");
    53         default: colorDisplayCustomPref#FFA03C;
    54 }
    55 setting::colordisplayP {
    56         type: color;
    57         label: tr("Color used for displaying 'P-' roads");
    58         default: colorDisplayCustomPref#FF6161;
    59 }
    60 setting::colordisplayT {
    61         type: color;
    62         label: tr("Color used for displaying 'T-' roads");
    63         default: colorDisplayCustomPref#0cc299;
    64 }
    65 setting::colordisplayO {
    66         type: color;
    67         label: tr("Color used for displaying 'O-' roads");
    68         default: colorDisplayCustomPref#548EFF;
    69 }
    70 setting::colordisplayC {
    71         type: color;
    72         label: tr("Color used for displaying 'C-' roads");
    73         default: colorDisplayCustomPref#2E4E8C;
    74 }
    75 
    76 /***************************************************/
    77 /*  Загальний набор стилей для визначення доріг в мережі */
    78 /***************************************************/
    79 relation[type="route"][route="road"][ref]> way|z11-[highway] {
    80         text: ref;
    81         text-offset: -9;
    82         font-size: 10;
    83         text-halo-color: current;
    84         text-halo-radius: 2;
    85 }
    86 
    87 relation[type="route"][route="road"][ref]> way|z14-[highway] {
    88         font-size: 12;
    89 }
    90 
    91 way[highway][ref=~/М-.|Н-.|Р-.|Т-.|О.|С./] {
    92         width: 3;
    93         opacity: 0.6;
    94         casing-width: 2;
    95         casing-color: #fff;
    96         casing-opacity: 0.4;
    97         casing-dashes: 30,10;
    98 }
    99 
    100 way[highway][ref ^= "М-"] {
    101         color: #42FF77;
    102         color: setting("colordisplayM");
    103 }
    104 way[highway][ref ^= "Н-"] {
    105         color: #FFA03C;
    106         color: setting("colordisplayH");
    107 }
    108 way[highway][ref ^= "Р-"] {
    109         color: #FF6161;
    110         color: setting("colordisplayP");
    111 }
    112 way[highway][ref ^= "Т-"] {
    113         color: #0cc299;
    114         color: setting("colordisplayT");
    115 }
    116 way[highway][ref ^= "О"] {
    117         color: #548EFF;
    118         color: setting("colordisplayO");
    119 }
    120 way[highway][ref ^= "С"] {
    121         color: #2E4E8C;
    122         color: setting("colordisplayC");
    123 }
    124 relation[type="route"][route="road"][ref=~/М-.|Н-.|Р-.|Т-.|О.|С./] > way[highway]{
    125         width: 5;
    126         opacity: 1;
    127         casing-opacity: 0;
    128 }
    129 
    130 relation[type="route"][route="road"][ref=~/М-.|Н-./] > way|z4-7[highway]{
    131         width: 3;
    132 }
    133 relation[type="route"][route="road"][ref=~/Р-.|Т-./] > way|z4-7[highway]{
    134     width: 2;
    135 }
    136 relation[type="route"][route="road"][ref=~/О.|С./] > way|z4-7[highway]{
    137     width: 1;
    138 }
    139 relation[type="route"][route="road"][ref=~/М-.|Н-./] > way|z8-10[highway]{
    140     width: 4;
    141 }
    142 relation[type="route"][route="road"][ref=~/Р-.|Т-./] > way|z8-10[highway]{
    143     width: 3;
    144 }
    145 relation[type="route"][route="road"][ref=~/О.|С./] > way|z8-10[highway]{
    146     width: 2;
    147 }
    148 
    149 node[place] {
    150         text: name;
    151         font-size: 12;
    152         text-halo-color: current;
    153         text-halo-radius: 2;
    154 }
    155 node|z4-11[place] {
    156         font-size: 10;
    157         text-halo-radius: 1;
    158 }
    159 node|z4-10[place][population < 3000] {
    160         text:"";
    161         icon-image: none;
    162 }
    163 
    164 node|z12-18[place] {
    165         font-size: 13;
    166         text-halo-radius: 2;
    167         text-halo-opacity: 0.9;
    168 }
    169 
    170 way|z4-8[bridge="yes"] {
    171         fill-color: currentColor;
    172 }
    173 
    174 
    175 /***************************************************/
    176 /* ці стилі допоможуть виявляти проблеми з мережею */
    177 /***************************************************/
    178 
    179 /* Відношення е, але немає REF у вея для відношення! */
    180 relation[type="route"][route="road"] > way[highway][!ref] {
    181         dashes: 30,5;
    182         dashes-background-color: black;
    183        
    184 }
    185 
    186 }}}
     27[[wiki:Styles/UkraineRoadNetwork]]