wiki:Styles/Power

This style is intended for everyone who is mapping power=* features.

It extends the default style by distinguishing power lines by voltage (displayed as color) and number of cables (displayed as width). Relations, abandoned lines and underground cables are supported as well.

Comments, patches and additions are welcome, please contact me.

meta {
        title: "Power";
        description: "A more detailed style for various power facilities and features";
        version: "0.3.3_2014-04-01";
        author: "Cobra";
}

meta[lang=de] {
        title: "Stromversorgung";
        description: "Ein detaillierterer Stil für verschiedene Anlagen zur Stromversorgung";
}

/*
 * facilities
 */
way[power=cable] {
        width: 1;
        color: #eeeeee;
}

/*
 * color by voltage
 */
relation[type=route][route=power][voltage>=100][voltage<=400] > way,
way[power=line][voltage>=100][voltage<=400],
way[power=minor_line][voltage>=100][voltage<=400],
way[power=cable][voltage>=100][voltage<=400] {
        color: blue;
}

relation[type=route][route=power][voltage>=1000][voltage<=20000] > way,
way[power=line][voltage>=1000][voltage<=20000],
way[power=minor_line][voltage>=1000][voltage<=20000],
way[power=cable][voltage>=1000][voltage<=20000] {
        color: green;
}

relation[type=route][route=power][voltage=110000] > way,
way[power=line][voltage=110000],
way[power=cable][voltage=110000] {
        color: yellow;
}

relation[type=route][route=power][voltage=220000] > way,
way[power=line][voltage=220000],
way[power=cable][voltage=220000] {
        color: orange;
}

relation[type=route][route=power][voltage=380000] > way,
way[power=line][voltage=380000],
way[power=cable][voltage=380000] {
        color: red;
}


/*
 * width by number of cables
 */
way[cables=3] {
        width: 2;
}

way[cables=4] {
        width: 3;
}

way[cables=6] {
        width: 4;
}

way[cables=9] {
        width: 5;
}

way[cables=12] {
        width: 6;
}

/*
 * (underground) cables
 */
way[power=construction][construction=cable]::cable_layer,
way[power=cable]::cable_layer {
        width: +4;
        z-index: 1.0;
        opacity: 0.4;
        color: black;
}

/*
 * abandoned / removed / demolished lines
 */
way[power=abandoned_line] {
        width: 1;
        color: gray;
        dashes: 8;
}

/*
 * lines under construction
 */
way[power=construction][construction=cable],
way[power=construction][construction=line] {
        dashes: 16;
}

Styles_Power-style.mapcss, Styles_Power.zip

Last modified 5 years ago Last modified on 2014-04-01T16:48:10+02:00