Changes between Initial Version and Version 1 of Styles/Power


Ignore:
Timestamp:
2011-12-06T14:39:33+01:00 (11 years ago)
Author:
Cobra
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Power

    v1 v1  
     1This style is intended for everyone who is mapping power=* features.
     2
     3It extends the default style by distinguishing power lines by voltage (displayed as color) and number of cables (displayed as width).
     4Relations, abandoned lines and underground cables are supported as well.
     5
     6Comments, patches and additions are welcome, please [http://www.openstreetmap.org/message/new/Cobra contact me].
     7
     8{{{
     9#!style type="mapcss"
     10
     11meta {
     12        title: "Power";
     13        description: "A more detailed style for various power facilities and features";
     14        version: "0.2.[[revision]]_[[date]]";
     15        author: "Cobra";
     16}
     17
     18meta[lang=de] {
     19        title: "Stromversorgung";
     20        description: "Ein detaillierterer Stil für verschiedene Anlagen zur Stromversorgung";
     21}
     22
     23/*
     24 * color by voltage
     25 */
     26relation[type=route][route=power][voltage>=100][voltage<=400] > way,
     27way[power=line][voltage>=100][voltage<=400],
     28way[power=minor_line][voltage>=100][voltage<=400],
     29way[power=cable][voltage>=100][voltage<=400] {
     30        color: blue;
     31}
     32
     33relation[type=route][route=power][voltage>=1000][voltage<=20000] > way,
     34way[power=line][voltage>=1000][voltage<=20000],
     35way[power=minor_line][voltage>=1000][voltage<=20000],
     36way[power=cable][voltage>=1000][voltage<=20000] {
     37        color: green;
     38}
     39
     40relation[type=route][route=power][voltage=110000] > way,
     41way[power=line][voltage=110000],
     42way[power=cable][voltage=110000] {
     43        color: yellow;
     44}
     45
     46relation[type=route][route=power][voltage=220000] > way,
     47way[power=line][voltage=220000],
     48way[power=cable][voltage=220000] {
     49        color: orange;
     50}
     51
     52relation[type=route][route=power][voltage=380000] > way,
     53way[power=line][voltage=380000],
     54way[power=cable][voltage=380000] {
     55        color: red;
     56}
     57
     58
     59/*
     60 * width by number of cables
     61 */
     62way[cables=3] {
     63        width: 2;
     64}
     65
     66way[cables=4] {
     67        width: 3;
     68}
     69
     70way[cables=6] {
     71        width: 4;
     72}
     73
     74way[cables=9] {
     75        width: 5;
     76}
     77
     78way[cables=12] {
     79        width: 6;
     80}
     81
     82/*
     83 * (underground) cables
     84 */
     85way[power=construction][construction=cable]::cable_layer,
     86way[power=cable]::cable_layer {
     87        width: +4;
     88        z-index: 1.0;
     89        opacity: 0.3;
     90        color: black;
     91}
     92
     93/*
     94 * abandoned / removed / demolished lines
     95 */
     96way[power=abandoned_line] {
     97        width: 1;
     98        color: gray;
     99        dashes: 8;
     100}
     101
     102/*
     103 * lines under construction
     104 */
     105way[power=construction][construction=cable],
     106way[power=construction][construction=line] {
     107        dashes: 16;
     108}
     109}}}