Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Update water styles

Russ Garrett4b4fcd13a58c
diff --git a/web/src/icons/pumping_station.svg b/web/src/icons/pumping_station.svg
new file mode 100644
index 0000000..248a3a6
--- /dev/null
+++ b/web/src/icons/pumping_station.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 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(6.12323e-17,1,-1,6.12323e-17,100.687,-0.928587)">
+ <circle cx="50.929" cy="50.687" r="46.602" style="fill:rgb(235,235,235);stroke:black;stroke-width:4.17px;"/>
+ </g>
+ <g transform="matrix(5.85927e-17,0.956892,-1.2889,7.89221e-17,101.867,1.26687)">
+ <path d="M4.327,50L50.929,4.085L97.53,50" style="fill:rgb(235,235,235);fill-opacity:0;stroke:black;stroke-width:3.67px;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/sewage_pumping_station.svg b/web/src/icons/sewage_pumping_station.svg
new file mode 100644
index 0000000..02c9de2
--- /dev/null
+++ b/web/src/icons/sewage_pumping_station.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 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(6.12323e-17,1,-1,6.12323e-17,100.687,-0.928587)">
+ <circle cx="50.929" cy="50.687" r="46.602" style="fill:rgb(193,150,83);stroke:black;stroke-width:4.17px;"/>
+ </g>
+ <g transform="matrix(5.85927e-17,0.956892,-1.2889,7.89221e-17,101.867,1.26687)">
+ <path d="M4.327,50L50.929,4.085L97.53,50" style="fill:rgb(235,235,235);fill-opacity:0;stroke:black;stroke-width:3.67px;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/valve.svg b/web/src/icons/valve.svg
new file mode 100644
index 0000000..80d7e98
--- /dev/null
+++ b/web/src/icons/valve.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 54 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:square;stroke-linejoin:round;stroke-miterlimit:1;">
+ <g transform="matrix(4.60362e-17,0.751829,-0.756359,4.63136e-17,33.336,-6.5489)">
+ <path d="M28.662,8.377L46.729,38.897L10.595,38.897L28.662,8.377Z" style="fill:rgb(235,235,235);stroke:black;stroke-width:2.65px;"/>
+ </g>
+ <g transform="matrix(-4.60362e-17,-0.751829,0.756359,-4.63136e-17,20.664,36.5489)">
+ <path d="M28.662,8.377L46.729,38.897L10.595,38.897L28.662,8.377Z" style="fill:rgb(235,235,235);stroke:black;stroke-width:2.65px;"/>
+ </g>
+</svg>
diff --git a/web/src/icons/water_pumping_station.svg b/web/src/icons/water_pumping_station.svg
index 248a3a6..de5051c 100644
--- a/web/src/icons/water_pumping_station.svg
+++ b/web/src/icons/water_pumping_station.svg
@@ -2,7 +2,7 @@
<!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(6.12323e-17,1,-1,6.12323e-17,100.687,-0.928587)">
- <circle cx="50.929" cy="50.687" r="46.602" style="fill:rgb(235,235,235);stroke:black;stroke-width:4.17px;"/>
+ <circle cx="50.929" cy="50.687" r="46.602" style="fill:rgb(123,186,172);stroke:black;stroke-width:4.17px;"/>
</g>
<g transform="matrix(5.85927e-17,0.956892,-1.2889,7.89221e-17,101.867,1.26687)">
<path d="M4.327,50L50.929,4.085L97.53,50" style="fill:rgb(235,235,235);fill-opacity:0;stroke:black;stroke-width:3.67px;"/>
diff --git a/web/src/key/key.ts b/web/src/key/key.ts
index 1b1de7e..486e83d 100644
--- a/web/src/key/key.ts
+++ b/web/src/key/key.ts
@@ -240,8 +240,10 @@ class KeyControl implements IControl {
['Steam', svgLine(colour_steam, line_thickness)],
['Wastewater', svgLine(colour_wastewater, line_thickness)],
['Water Treatment Plant', await this.sprite('water_treatment_plant')],
+ ['Water Pumping Station', await this.sprite('water_pumping_station')],
['Sewage Treatment Plant', await this.sprite('sewage_treatment_plant')],
- ['Pumping Station', await this.sprite('water_pumping_station')]
+ ['Sewage Pumping Station', await this.sprite('sewage_pumping_station')],
+ ['Pumping Station', await this.sprite('pumping_station')]
]
const table = list('table', Tr)
table.update(rows)
diff --git a/web/src/style/style_oim_water.ts b/web/src/style/style_oim_water.ts
index 5ce727c..609cbec 100644
--- a/web/src/style/style_oim_water.ts
+++ b/web/src/style/style_oim_water.ts
@@ -47,6 +47,14 @@ const substance_colour: ExpressionSpecification = [
'#7B7CBA'
]
+const reservoir_colour: ExpressionSpecification = [
+ 'match',
+ ['get', 'type'],
+ 'reservoir_covered',
+ '#8e8e9a',
+ '#3a85d9'
+]
+
const layers: LayerSpecificationWithZIndex[] = [
{
zorder: 19,
@@ -87,6 +95,20 @@ const layers: LayerSpecificationWithZIndex[] = [
'fill-outline-color': 'rgba(0, 0, 0, 1)'
}
},
+ {
+ zorder: 20,
+ id: 'water_reservoir',
+ type: 'fill',
+ source: 'water',
+ minzoom: 4,
+ 'source-layer': 'water_reservoir',
+ paint: {
+ 'fill-color': reservoir_colour,
+ 'fill-opacity': 1,
+ 'fill-outline-color': 'rgba(0, 0, 0, 1)',
+ 'fill-antialias': true
+ }
+ },
{
zorder: 20,
id: 'water_pipeline_case',
@@ -127,6 +149,22 @@ const layers: LayerSpecificationWithZIndex[] = [
'line-width': ['interpolate', ['linear'], ['zoom'], 3, 0.3, 16, 4]
}
},
+ {
+ zorder: 518,
+ id: 'water_reservoir_label',
+ type: 'symbol',
+ source: 'water',
+ 'source-layer': 'water_reservoir_point',
+ minzoom: 11,
+ paint: text_paint,
+ layout: {
+ 'text-field': ['get', 'name'],
+ 'text-font': font,
+ 'text-size': ['interpolate', ['linear'], ['zoom'], 11, 9, 18, 17],
+ 'text-anchor': 'top',
+ 'text-offset': [0, 1]
+ }
+ },
{
zorder: 519,
id: 'water_pipeline_label',
@@ -158,8 +196,16 @@ const layers: LayerSpecificationWithZIndex[] = [
'source-layer': 'pumping_station_point',
minzoom: 9,
layout: {
- 'icon-image': 'water_pumping_station',
- 'icon-size': 0.15,
+ 'icon-image': [
+ 'match',
+ ['get', 'substance'],
+ 'water',
+ 'water_pumping_station',
+ 'sewage',
+ 'sewage_pumping_station',
+ 'pumping_station'
+ ],
+ 'icon-size': ['interpolate', ['linear'], ['zoom'], 9, 0.08, 12.5, 0.25],
'text-field': ['step', ['zoom'], '', 10, ['get', 'name']],
'text-font': font,
'text-size': ['interpolate', ['linear'], ['zoom'], 11, 10, 18, 16],
@@ -171,7 +217,7 @@ const layers: LayerSpecificationWithZIndex[] = [
paint: {
...text_paint,
// Control visibility using the opacity property...
- 'icon-opacity': ['step', ['zoom'], 1, 12, ['case', ['get', 'is_node'], 1, 0]]
+ 'icon-opacity': ['step', ['zoom'], 1, 13, ['case', ['get', 'is_node'], 1, 0]]
}
},
{