Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

New power switchgear rendering

Russ Garrettf678c43d2a85
diff --git a/web/src/icons/power_capacitor.svg b/web/src/icons/power_capacitor.svg
new file mode 100644
index 0000000..8f43be6
--- /dev/null
+++ b/web/src/icons/power_capacitor.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 80 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
+ <g>
+ <path d="M12.252,45.361L67.748,45.765" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ <path d="M12.252,54.504L67.748,54.908" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ <path d="M40,45.361L40,10.219" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ <path d="M40,54.908L40,89.781" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ </g>
+ <g>
+ <path d="M12.252,45.361L67.748,45.765" style="fill:none;stroke:rgb(25,25,25);stroke-width:5.21px;stroke-linecap:butt;"/>
+ <path d="M12.252,54.504L67.748,54.908" style="fill:none;stroke:rgb(25,25,25);stroke-width:5.21px;stroke-linecap:butt;"/>
+ <path d="M40,45.361L40,10.219" style="fill:none;stroke:rgb(25,25,25);stroke-width:3.13px;"/>
+ <path d="M40,54.908L40,89.781" style="fill:none;stroke:rgb(25,25,25);stroke-width:3.13px;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/power_capacitor_shunt.svg b/web/src/icons/power_capacitor_shunt.svg
new file mode 100644
index 0000000..9238a91
--- /dev/null
+++ b/web/src/icons/power_capacitor_shunt.svg
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 80 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
+ <g transform="matrix(1.08347,0,0,1.08347,-3.33867,0.72)">
+ <g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-0.12591)">
+ <path d="M22.944,78.4L57.056,78.4" style="fill:none;stroke:white;stroke-width:7.5px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-1.41703)">
+ <path d="M28.357,84.7L51.643,84.7" style="fill:none;stroke:white;stroke-width:7.5px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-3.05585)">
+ <path d="M33.325,90.969L46.675,90.969" style="fill:none;stroke:white;stroke-width:7.5px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M12.252,45.361L67.748,45.765" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M12.252,54.504L67.748,54.908" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M40,45.361L40,10.219" style="fill:none;stroke:white;stroke-width:14.58px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.55529,3.08146,18.5842)">
+ <path d="M40,54.908L40,89.781" style="fill:none;stroke:white;stroke-width:17.67px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M12.252,45.361L67.748,45.765" style="fill:none;stroke:rgb(25,25,25);stroke-width:5.21px;stroke-linecap:butt;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M12.252,54.504L67.748,54.908" style="fill:none;stroke:rgb(25,25,25);stroke-width:5.21px;stroke-linecap:butt;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08146,-1.60378)">
+ <path d="M40,45.361L40,10.219" style="fill:none;stroke:rgb(25,25,25);stroke-width:3.13px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.638932,3.08146,13.9916)">
+ <path d="M40,54.908L40,89.781" style="fill:none;stroke:rgb(25,25,25);stroke-width:3.63px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-0.12591)">
+ <path d="M22.944,78.4L57.056,78.4" style="fill:none;stroke:rgb(25,25,25);stroke-width:2px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-1.41703)">
+ <path d="M28.357,84.7L51.643,84.7" style="fill:none;stroke:rgb(25,25,25);stroke-width:2px;"/>
+ </g>
+ <g transform="matrix(0.92296,0,0,0.92296,3.08134,-3.05585)">
+ <path d="M33.325,90.969L46.675,90.969" style="fill:none;stroke:rgb(25,25,25);stroke-width:2px;"/>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/web/src/icons/power_filter.svg b/web/src/icons/power_filter.svg
new file mode 100644
index 0000000..30b997e
--- /dev/null
+++ b/web/src/icons/power_filter.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
+ <g transform="matrix(1.05749,0,0,1.24532,-2.0148,-12.6747)">
+ <rect x="5.946" y="13.23" width="86.482" height="74.538" style="fill:rgb(235,235,235);stroke:black;stroke-width:2.52px;"/>
+ </g>
+ <g transform="matrix(0.165807,0,0,0.327873,-23.4896,-52.2501)">
+ <path d="M229.957,316.755C231.816,315.277 233.668,313.79 235.52,312.303M235.52,312.303C248.281,302.079 261.055,291.794 274.773,282.87M274.773,282.87C286.904,274.978 299.941,268.09 314.027,264.47M314.027,264.47C326.877,261.186 340.351,260.939 353.28,263.956M353.28,263.956C367.341,267.196 380.415,273.829 392.534,281.519M392.534,281.519C406.301,290.244 419.087,300.427 431.787,310.619M431.787,310.619C444.606,320.888 457.372,331.289 471.041,340.419M471.041,340.419C483.18,348.545 496.187,355.772 510.294,359.823M510.294,359.823C523.043,363.484 536.522,364.24 549.547,361.605M549.547,361.605C563.572,358.831 576.686,352.539 588.801,345.102M588.801,345.102C602.613,336.61 615.404,326.571 628.054,316.458M628.054,316.458C637.471,308.931 646.839,301.337 656.49,294.11" style="fill:none;stroke:black;stroke-width:24.06px;stroke-linejoin:miter;stroke-miterlimit:2;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,3.24379,-0.599285)">
+ <path d="M24.251,75.003L69.261,26.62" style="fill:none;stroke:black;stroke-width:2.92px;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/power_reactor.svg b/web/src/icons/power_reactor.svg
new file mode 100644
index 0000000..923af84
--- /dev/null
+++ b/web/src/icons/power_reactor.svg
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 80 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(0.875853,0,0,0.844677,-4.12918,7.31623)">
+ <path d="M16.282,47.278C16.282,28.456 31.563,13.175 50.384,13.175C69.206,13.175 84.487,28.456 84.487,47.278C84.487,66.099 69.206,81.38 50.384,81.38M16.282,47.278L50.384,47.278L50.384,-0.912M50,81.38L50,97.163" style="fill:rgb(235,235,235);fill-opacity:0;"/>
+ <path d="M16.282,47.278C16.282,28.456 31.563,13.175 50.384,13.175C69.206,13.175 84.487,28.456 84.487,47.278C84.487,66.099 69.206,81.38 50.384,81.38M16.282,47.278L50.384,47.278L50.384,-0.912M50,81.38L50,97.163" style="fill:none;stroke:white;stroke-width:12.11px;"/>
+ <path d="M16.282,47.278C16.282,28.456 31.563,13.175 50.384,13.175C69.206,13.175 84.487,28.456 84.487,47.278C84.487,66.099 69.206,81.38 50.384,81.38M16.282,47.278L50.384,47.278L50.384,-0.912M50,81.38L50,97.163" style="fill:none;stroke:black;stroke-width:3.63px;stroke-miterlimit:1.5;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/power_reactor_shunt.svg b/web/src/icons/power_reactor_shunt.svg
new file mode 100644
index 0000000..6922c1d
--- /dev/null
+++ b/web/src/icons/power_reactor_shunt.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 80 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;">
+ <path d="M13.381,44.171C13.381,30.002 25.308,18.499 40,18.499C54.692,18.499 66.619,30.002 66.619,44.171C66.619,58.34 54.692,69.843 40,69.843M13.381,44.171L40,44.171L40,7.895M39.7,69.843L39.7,81.724M24.258,81.724L55.742,81.724M29.254,87.538L50.746,87.538M33.839,93.324L46.161,93.324" style="fill:rgb(235,235,235);fill-opacity:0;"/>
+ <path d="M13.381,44.171C13.381,30.002 25.308,18.499 40,18.499C54.692,18.499 66.619,30.002 66.619,44.171C66.619,58.34 54.692,69.843 40,69.843M13.381,44.171L40,44.171L40,7.895M39.7,69.843L39.7,81.724M24.258,81.724L55.742,81.724M29.254,87.538L50.746,87.538M33.839,93.324L46.161,93.324" style="fill:none;stroke:white;stroke-width:10.42px;"/>
+ <path d="M13.381,44.171C13.381,30.002 25.308,18.499 40,18.499C54.692,18.499 66.619,30.002 66.619,44.171C66.619,58.34 54.692,69.843 40,69.843M13.381,44.171L40,44.171L40,7.895M39.7,69.843L39.7,81.724M24.258,81.724L55.742,81.724M29.254,87.538L50.746,87.538M33.839,93.324L46.161,93.324" style="fill:none;stroke:black;stroke-width:3.13px;stroke-miterlimit:1.5;"/>
+</svg>
diff --git a/web/src/icons/power_switch.svg b/web/src/icons/power_switch.svg
index 63c918d..9cd6822 100644
--- a/web/src/icons/power_switch.svg
+++ b/web/src/icons/power_switch.svg
@@ -1,10 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="16" height="7" viewBox="0, 0, 16, 7">
- <g id="Layer_1">
- <path d="M0.5,0 L15.5,0 C15.776,0 16,0.224 16,0.5 L16,6.5 C16,6.776 15.776,7 15.5,7 L0.5,7 C0.224,7 0,6.776 0,6.5 L0,0.5 C0,0.224 0.224,0 0.5,0 z" fill="#FFFFFF"/>
- <path d="M10.288,2.188" fill-opacity="0" stroke="#3B3B3B" stroke-width="1"/>
- <path d="M1,5.359 L5.116,5.359 L8.821,1.641" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>
- <path d="M9.665,5.359 L14.853,5.359" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>
- </g>
+<svg width="100%" height="100%" viewBox="0 0 60 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g id="Layer_1" transform="matrix(3.125,0,0,2.85714,5,2)">
+ <path d="M1,5.359L5.116,5.359L8.821,1.641" style="fill:none;fill-rule:nonzero;stroke:white;stroke-width:3.48px;"/>
+ <g transform="matrix(1,0,0,1,0.47414,0)">
+ <path d="M9.665,5.359L14.853,5.359" style="fill:none;fill-rule:nonzero;stroke:white;stroke-width:3.48px;"/>
+ </g>
+ <path d="M1,5.359L5.116,5.359L8.821,1.641" style="fill:none;fill-rule:nonzero;stroke:rgb(25,25,25);stroke-width:1.04px;stroke-miterlimit:1.5;"/>
+ <g transform="matrix(1,0,0,1,0.47414,0)">
+ <path d="M9.665,5.359L14.853,5.359" style="fill:none;fill-rule:nonzero;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,0.47414,0)">
+ <path d="M9.665,5.359L14.853,5.359" style="fill:none;fill-rule:nonzero;stroke:rgb(25,25,25);stroke-width:1.04px;stroke-miterlimit:1.5;"/>
+ </g>
+ </g>
</svg>
diff --git a/web/src/icons/power_switch_circuit_breaker.svg b/web/src/icons/power_switch_circuit_breaker.svg
new file mode 100644
index 0000000..aef6817
--- /dev/null
+++ b/web/src/icons/power_switch_circuit_breaker.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 60 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g id="Layer_1" transform="matrix(3.125,0,0,2.85714,5,5)">
+ <g transform="matrix(0.415325,0,0,0.391426,-4.74849,-2.57837)">
+ <ellipse cx="34.496" cy="18.456" rx="6.455" ry="7.076" style="fill:white;"/>
+ </g>
+ <g transform="matrix(0.32,0,0,0.35,-1.6,-1.75)">
+ <path d="M7.981,18.274L20.843,18.274L32.421,7.651" style="fill:rgb(235,235,235);fill-opacity:0;fill-rule:nonzero;"/>
+ <path d="M7.981,18.274L20.843,18.274L32.421,7.651" style="fill:none;fill-rule:nonzero;stroke:white;stroke-width:10.42px;"/>
+ <path d="M7.981,18.274L20.843,18.274L32.421,7.651" style="fill:none;fill-rule:nonzero;stroke:rgb(25,25,25);stroke-width:3.13px;stroke-miterlimit:1.5;"/>
+ </g>
+ <g transform="matrix(0.310226,0,0,0.35,-1.09155,-1.75)">
+ <path d="M35.807,18.274L52.019,18.274" style="fill:none;fill-rule:nonzero;"/>
+ <path d="M35.807,18.274L52.019,18.274" style="fill:none;fill-rule:nonzero;stroke:white;stroke-width:10.58px;"/>
+ <path d="M35.807,18.274L52.019,18.274" style="fill:none;fill-rule:nonzero;stroke:rgb(25,25,25);stroke-width:3.17px;stroke-miterlimit:1.5;"/>
+ </g>
+ <g transform="matrix(0.412053,0,0,0.450683,-9.87793,2.05248)">
+ <path d="M49.559,2.572L43.913,8.937M43.913,2.572L49.559,8.937" style="fill:none;stroke:rgb(25,25,25);stroke-width:1.55px;stroke-miterlimit:1.5;"/>
+ </g>
+ </g>
+</svg>
diff --git a/web/src/icons/power_switch_disconnector.svg b/web/src/icons/power_switch_disconnector.svg
new file mode 100644
index 0000000..4744544
--- /dev/null
+++ b/web/src/icons/power_switch_disconnector.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 60 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(1,0,0,1,-0.144149,0.96274)">
+ <g id="Layer_1">
+ <path d="M8.125,17.311L20.987,17.311L32.566,6.689M35.951,17.311L52.163,17.311M35.951,13.237L35.951,21.386" style="fill:none;fill-rule:nonzero;stroke:white;stroke-width:10.42px;"/>
+ <path d="M8.125,17.311L20.987,17.311L32.566,6.689M35.951,17.311L52.163,17.311M35.951,13.237L35.951,21.386" style="fill:none;fill-rule:nonzero;stroke:rgb(25,25,25);stroke-width:3.13px;stroke-miterlimit:1.5;"/>
+ </g>
+ </g>
+</svg>
diff --git a/web/src/infopopup.ts b/web/src/infopopup.ts
index 9095d65..d84992b 100644
--- a/web/src/infopopup.ts
+++ b/web/src/infopopup.ts
@@ -20,7 +20,8 @@ const hidden_keys = [
'area',
'gid',
'ref_len',
- 'frequency'
+ 'frequency',
+ 'angle'
]
function formatVoltage(value: number | number[]): string {
diff --git a/web/src/style/style_oim_power.ts b/web/src/style/style_oim_power.ts
index 1dcf914..33ef76e 100644
--- a/web/src/style/style_oim_power.ts
+++ b/web/src/style/style_oim_power.ts
@@ -622,12 +622,26 @@ const layers: LayerSpecificationWithZIndex[] = [
minzoom: 14,
paint: text_paint,
layout: {
- 'icon-image': 'power_compensator',
+ 'icon-image': match(
+ get('type'),
+ [
+ ['series_reactor', 'power_reactor'],
+ ['shunt_reactor', 'power_reactor_shunt'],
+ ['series_capacitor', 'power_capacitor'],
+ ['shunt_capacitor', 'power_capacitor_shunt'],
+ ['filter', 'power_filter']
+ ],
+ 'power_compensator'
+ ),
'icon-allow-overlap': true,
- 'icon-size': interpolate(zoom, [
- [14, 0.3],
- [21, 2]
- ])
+ 'icon-size': interpolate(
+ zoom,
+ [
+ [14, 0.05],
+ [21, 1]
+ ],
+ 1.2
+ )
}
},
{
@@ -639,11 +653,23 @@ const layers: LayerSpecificationWithZIndex[] = [
minzoom: 14,
paint: text_paint,
layout: {
- 'icon-image': 'power_switch',
- 'icon-size': interpolate(zoom, [
- [14, 0.3],
- [21, 2.5]
- ]),
+ 'icon-image': match(
+ get('type'),
+ [
+ ['disconnector', 'power_switch_disconnector'],
+ ['circuit_breaker', 'power_switch_circuit_breaker']
+ ],
+ 'power_switch'
+ ),
+ 'icon-rotate': ['-', ['get', 'angle'], 90],
+ 'icon-size': interpolate(
+ zoom,
+ [
+ [14, 0.2],
+ [21, 1]
+ ],
+ 1.2
+ ),
'icon-allow-overlap': true
}
},