Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Add is_node substation attribute

Russ Garrett4424fc78dced
diff --git a/config.toml b/config.toml
index 4c5acd2..1d0fcff 100644
--- a/config.toml
+++ b/config.toml
@@ -114,7 +114,7 @@ sql = "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name, convert_voltag
[[providers.layers]]
name = "power_substation_point"
min_zoom = 5
-sql = "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, name, convert_voltage(voltage) / 1000 AS voltage, substation FROM substation WHERE geometry && !BBOX! AND 4 < !ZOOM! ORDER BY convert_voltage(voltage) DESC NULLS LAST"
+sql = "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, (ST_GeometryType(geometry) = 'ST_Point') AS is_node, name, convert_voltage(voltage) / 1000 AS voltage, substation FROM substation WHERE geometry && !BBOX! AND 4 < !ZOOM! ORDER BY convert_voltage(voltage) DESC NULLS LAST"
[[providers.layers]]
name = "power_plant"