Changes between Version 3 and Version 4 of Styles/Power


Ignore:
Timestamp:
2020-04-18T00:32:42+02:00 (2 years ago)
Author:
francois.lacombe
Comment:

Improve power style with international voltage ranges

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Power

    v3 v4  
    1212        title: "Power";
    1313        description: "A more detailed style for various power facilities and features";
    14         version: "0.3.[[revision]]_[[date]]";
    15         author: "Cobra";
     14        version: "0.4.[[revision]]_[[date]]";
     15        author: "FLacombe";
    1616}
    1717
     
    2121}
    2222
    23 /*
    24  * facilities
    25  */
    26 way[power=cable] {
    27         width: 1;
    28         color: #eeeeee;
     23/* Substations */
     24area[power=substation][substation=transmission]{
     25        width:3;
     26        color:#FFD800;
     27        fill-color:#FFD800;
     28        fill-opacity:0.05;
    2929}
    3030
    31 /*
    32  * color by voltage
    33  */
    34 relation[type=route][route=power][voltage>=100][voltage<=400] > way,
    35 way[power=line][voltage>=100][voltage<=400],
    36 way[power=minor_line][voltage>=100][voltage<=400],
    37 way[power=cable][voltage>=100][voltage<=400] {
    38         color: blue;
     31/* Supports */
     32way["power"="portal"]{
     33        width:2;
     34        color:#FFFFFF;
     35}
     36way[power="portal"] node{
     37        symbol-shape:triangle;
     38        symbol-size:10;
     39        symbol-fill-color:#EDEDED;
    3940}
    4041
    41 relation[type=route][route=power][voltage>=1000][voltage<=20000] > way,
    42 way[power=line][voltage>=1000][voltage<=20000],
    43 way[power=minor_line][voltage>=1000][voltage<=20000],
    44 way[power=cable][voltage>=1000][voltage<=20000] {
    45         color: green;
     42/* Power lines */
     43way[power=line]{
     44        text:cables;
     45        font-size:14px;
     46        text-halo-radius:2;
     47}
     48way[power=cable]{
     49        dashes:2,2;
     50        text:cables;
     51        font-size:14px;
     52        text-halo-radius:2;
     53}
     54way[power=line][line=busbar]{
     55        casing-color:#FFD800;
     56        casing-width:1;
     57        width:3;
     58}
     59way[power=line][line=bay]{
     60        casing-color:#A0A0A0;
     61        casing-width:2;
     62        width:3;
    4663}
    4764
    48 relation[type=route][route=power][voltage=110000] > way,
    49 way[power=line][voltage=110000],
    50 way[power=cable][voltage=110000] {
    51         color: yellow;
     65/* Voltages */
     66way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))<=33000]{
     67        width:1;
     68        color:#0094FF;
     69        text-halo-color:#0094FF;
     70}
     71way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>33000][to_int(get(split(";",tag(voltage)),0))<=50000]{
     72        width:1;
     73        color:#FFFFFF;
     74        text-halo-color:#FFFFFF;
     75}
     76way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>50000][to_int(get(split(";",tag(voltage)),0))<=70000]{
     77        width:2;
     78        color:#BF0054;
     79        text-halo-color:#BF0054;
     80}
     81way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>70000][to_int(get(split(";",tag(voltage)),0))<=100000]{
     82        width:2;
     83        color:#FF8000;
     84        text-halo-color:#FF8000;
     85}
     86way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>100000][to_int(get(split(";",tag(voltage)),0))<=170000]{
     87        width:3;
     88        color:#003DB0;
     89        text-halo-color:#003DB0;
     90}
     91way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>170000][to_int(get(split(";",tag(voltage)),0))<=250000]{
     92        width:4;
     93        color:#009414;
     94        text-halo-color:#009414;
     95}
     96way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>250000][to_int(get(split(";",tag(voltage)),0))<=420000]{
     97        width:5;
     98        color:#FF0000;
     99        text-halo-color:#FF0000;
     100}
     101way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>420000]{
     102        width:5;
     103        color:#01ccff;
     104        text-halo-color:#01ccff;
    52105}
    53106
    54 relation[type=route][route=power][voltage=220000] > way,
    55 way[power=line][voltage=220000],
    56 way[power=cable][voltage=220000] {
    57         color: orange;
     107way[power=~/line|cable/][cables>3], way[power=~/line|cable/][circuits>1]{
     108        left-casing-dashes:2,14;
     109        left-casing-width:5;
     110}
     111way[power=minor_line][cables>3], way[power=minor_line][circuits>1]{
     112        left-casing-dashes:2,10;
     113        left-casing-width:3;
     114}
     115way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))<=33000],
     116way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage<=33000]{
     117        left-casing-color:#FFFFFF;
     118}
     119way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>33000][to_int(get(split(";",tag(voltage)),1))<=50000],
     120way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>33000][voltage<=50000]{
     121        left-casing-color:#FFFFFF;
     122}
     123way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>50000][to_int(get(split(";",tag(voltage)),1))<=70000],
     124way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>50000][voltage<=70000]{
     125        left-casing-color:#BF0054;
     126}
     127way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>70000][to_int(get(split(";",tag(voltage)),1))<=100000],
     128way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>70000][voltage<=100000]{
     129        left-casing-color:#FF8000;
     130}
     131way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>100000][to_int(get(split(";",tag(voltage)),1))<=170000],
     132way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>100000][voltage<=170000]{
     133        left-casing-color:#003DB0;
     134}
     135way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>170000][to_int(get(split(";",tag(voltage)),1))<=250000],
     136way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>170000][voltage<=250000]{
     137        left-casing-color:#009414;
     138}
     139way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>250000][to_int(get(split(";",tag(voltage)),1))<=420000],
     140way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>250000][voltage<=420000]{
     141        left-casing-color:#FF0000;
     142}
     143way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>420000],
     144way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>420000]{
     145        left-casing-color:#01ccff;
    58146}
    59147
    60 relation[type=route][route=power][voltage=380000] > way,
    61 way[power=line][voltage=380000],
    62 way[power=cable][voltage=380000] {
    63         color: red;
    64 }
    65 
    66 
    67 /*
    68  * width by number of cables
    69  */
    70 way[cables=3] {
    71         width: 2;
    72 }
    73 
    74 way[cables=4] {
    75         width: 3;
    76 }
    77 
    78 way[cables=6] {
    79         width: 4;
    80 }
    81 
    82 way[cables=9] {
    83         width: 5;
    84 }
    85 
    86 way[cables=12] {
    87         width: 6;
    88 }
    89 
    90 /*
    91  * (underground) cables
    92  */
    93 way[power=construction][construction=cable]::cable_layer,
    94 way[power=cable]::cable_layer {
    95         width: +4;
    96         z-index: 1.0;
    97         opacity: 0.4;
    98         color: black;
    99 }
    100 
    101 /*
    102  * abandoned / removed / demolished lines
    103  */
    104 way[power=abandoned_line] {
    105         width: 1;
    106         color: gray;
    107         dashes: 8;
    108 }
    109 
    110 /*
    111  * lines under construction
    112  */
    113 way[power=construction][construction=cable],
    114 way[power=construction][construction=line] {
    115         dashes: 16;
    116 }
    117148}}}