Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Wikidata etc for substations too
Russ Garrett8f26123a3bf8
diff --git a/config.toml b/config.tomlindex 84144ea..34d89c0 100644--- a/config.toml+++ b/config.toml@@ -120,12 +120,12 @@ sql = "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, type, tags -> 'name'[[providers.layers]]name = "power_substation"geometry_type = "Polygon"-sql = "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name, first_semi(tags -> 'frequency') AS frequency, convert_voltage(voltage) / 1000 AS voltage, convert_voltage(nth_semi(voltage, 2)) / 1000 AS voltage_2, convert_voltage(nth_semi(voltage, 3)) / 1000 AS voltage_3, substation, tags -> 'operator' AS operator, tags -> 'ref' AS ref, construction != '' AS construction FROM substation WHERE geometry && !BBOX! AND !ZOOM! >= 13 ORDER BY convert_voltage(voltage) ASC NULLS FIRST"+sql = "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name, first_semi(tags -> 'frequency') AS frequency, convert_voltage(voltage) / 1000 AS voltage, convert_voltage(nth_semi(voltage, 2)) / 1000 AS voltage_2, convert_voltage(nth_semi(voltage, 3)) / 1000 AS voltage_3, substation, tags -> 'operator' AS operator, tags -> 'ref' AS ref, construction != '' AS construction, tags -> 'wikidata' AS wikidata, tags -> 'wikipedia' AS wikipedia, osm_url(tags) AS url FROM substation WHERE geometry && !BBOX! AND !ZOOM! >= 13 ORDER BY convert_voltage(voltage) ASC NULLS FIRST"[[providers.layers]]name = "power_substation_point"geometry_type = "Point"-sql = "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, (ST_GeometryType(geometry) = 'ST_Point') AS is_node, round(ST_Area(geometry)) AS area, name, first_semi(tags -> 'frequency') AS frequency, convert_voltage(voltage) / 1000 AS voltage, convert_voltage(nth_semi(voltage, 2)) / 1000 AS voltage_2, convert_voltage(nth_semi(voltage, 3)) / 1000 AS voltage_3, substation, tags -> 'ref' AS ref, construction != '' AS construction FROM substation WHERE geometry && !BBOX! AND !ZOOM! >= 5 ORDER BY convert_voltage(voltage) ASC NULLS FIRST"+sql = "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, (ST_GeometryType(geometry) = 'ST_Point') AS is_node, round(ST_Area(geometry)) AS area, name, first_semi(tags -> 'frequency') AS frequency, convert_voltage(voltage) / 1000 AS voltage, convert_voltage(nth_semi(voltage, 2)) / 1000 AS voltage_2, convert_voltage(nth_semi(voltage, 3)) / 1000 AS voltage_3, substation, tags -> 'ref' AS ref, construction != '' AS construction, tags -> 'wikidata' AS wikidata, tags -> 'wikipedia' AS wikipedia, osm_url(tags) AS url FROM substation WHERE geometry && !BBOX! AND !ZOOM! >= 5 ORDER BY convert_voltage(voltage) ASC NULLS FIRST"[[providers.layers]]name = "power_plant"