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