meta { title: "transmission-grid-mapping-style"; description: "A style for fast electrical grid mapping of wide-area transmission networks. Adapted from the "detailed power grid style" by FLacombe."; version: "0.1"; } /* mapcss colors https://www.w3schools.com/cssref/css_colors.php */ node[power=portal] { symbol-shape: square; symbol-fill-color: teal; symbol-size: 7; /* Adjust size as needed */ } node[power=tower] { symbol-shape: square; symbol-fill-color: blue; symbol-size: 10; /* Adjust size as needed */ symbol-fill-opacity:0.7; major-z-index:1.0; } /* Substations */ area[power=substation]{ width:15; symbol-size:5; color:white; fill-opacity:0.05; } area[power=substation][substation=transmission]{ width:20; symbol-size:5; color:#DC143C; fill-color:#DC143C; fill-opacity:0.05; } area[power=substation][substation=distribution]{ width:15; symbol-size:5; color:#008F11; fill-opacity:0.05; } /* Power lines */ way[power=line]{ text:cables; font-size:1px; text-halo-radius:2; } way[power=cable]{ dashes:2,2; text:cables; font-size:40px; text-halo-radius:2; } way[power=line][line=busbar]{ casing-color:#FFD800; casing-width:1; width:3; } way[power=line][line=bay]{ casing-color:lightgray; casing-width:2; width:3; } way[power=plant]{ width:15; symbol-size:5; color:black; fill-color:magenta; fill-opacity:0.05; } node[power=generator] { symbol-shape: square; symbol-fill-color: yellow; symbol-size: 10; /* Adjust size as needed */ symbol-fill-opacity:0.7; } /* Power line */ node[item=7040] { symbol-shape: triangle; symbol-fill-color: brown; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } node[power=transformer], way[power=transformer] { icon-size: 14; text: name; text-size: 12; text-position: center; color:cyan; fill-color: cyan; width: 3; } /* Voltages */ way[power=line][!voltage], way[power=line][voltage=0] { color: white; width: 5; /* Adjust line width as needed */ } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))<132000]{ width:5; color: BurlyWood; text-halo-color:#E0E1DD; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>=132000][to_int(get(split(";",tag(voltage)),0))<=220000]{ width:5; color: Coral; text-halo-color:#9D00FF; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>=220000][to_int(get(split(";",tag(voltage)),0))<=310000]{ width:5; color: IndianRed; text-halo-color:#FF1493; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>=310000][to_int(get(split(";",tag(voltage)),0))<=550000]{ width:5; color: DarkViolet; text-halo-color:#E0E1DD; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),0))>=550000]{ width:5; color: DarkTurquoise; text-halo-color:#E0E1DD; z-index: 5; } way[power=~/line|cable/][cables>3], way[power=~/line|cable/][circuits>1]{ left-casing-dashes:2,14; left-casing-width:5; z-index: 5; } way[power=minor_line][cables>3], way[power=minor_line][circuits>1]{ left-casing-dashes:2,10; left-casing-width:3; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))<=33000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage<=33000]{ left-casing-color:#FF2E2E; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>33000][to_int(get(split(";",tag(voltage)),1))<=50000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>33000][voltage<=50000]{ left-casing-color:#FF7F11; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>50000][to_int(get(split(";",tag(voltage)),1))<=70000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>50000][voltage<=70000]{ left-casing-color:#FFD700; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>70000][to_int(get(split(";",tag(voltage)),1))<=100000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>70000][voltage<=100000]{ left-casing-color:#39FF14; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>100000][to_int(get(split(";",tag(voltage)),1))<=170000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>100000][voltage<=170000]{ left-casing-color:#9D00FF; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>170000][to_int(get(split(";",tag(voltage)),1))<=250000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>170000][voltage<=250000]{ left-casing-color:#FF1493; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>250000][to_int(get(split(";",tag(voltage)),1))<=420000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>250000][voltage<=420000]{ left-casing-color:#E0E1DD; z-index: 5; } way[power=~/line|minor_line|cable/][to_int(get(split(";",tag(voltage)),1))>420000], way[power=~/line|minor_line|cable/][circuits>1][count(split(";",tag(voltage)))=1][voltage>420000]{ left-casing-color:#FFB7C5; } /* Style for proposed power lines and constructed lines */ way[power=line][proposed=yes] { width: 3; dashes: 8, 4; /* Dashed pattern (8px dash, 4px gap) */ opacity: 0.8; } /* Style for proposed power lines and constructed lines */ way[power=line][construction=yes] { width: 3; dashes: 8, 4; /* Dashed pattern (8px dash, 4px gap) */ opacity: 0.8; } /* Colors for osmose issues start here*/ /* Power Substation */ node[item=7190] { symbol-shape: square; symbol-fill-color: #06470C; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } node[item=8280] { symbol-shape: square; symbol-fill-color: #0B6623; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } node[item=8282] { symbol-shape: square; symbol-fill-color: #008F11; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } /* Power Plant */ node[item=8270] { symbol-shape: rectangle; symbol-fill-color: #FF00FF; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } /* Power transformer */ node[item=9100] { symbol-shape: hexagon; symbol-fill-color: #FFFF00; symbol-size: 15; /* Adjust size as needed */ symbol-fill-opacity:1.0; } /* Colors for osmose issues stop here*/