Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Don't show under-construction plants currently
Russ Garrett71b6f25590d1
diff --git a/main.py b/main.pyindex 8467583..d63a41e 100644--- a/main.py+++ b/main.py@@ -65,6 +65,7 @@ async def country(request, country):WHERE ST_Contains((SELECT ST_Transform(geom, 3857) FROM countries.country_eez where gid = :gid),geometry)+ AND tags -> 'construction' IS NULL""",values={"gid": country["gid"]},)@@ -75,6 +76,7 @@ async def country(request, country):WHERE ST_Contains((SELECT ST_Transform(geom, 3857) FROM countries.country_eez WHERE gid = :gid),geometry)+ AND tags -> 'construction' IS NULLGROUP BY first_semi(source)ORDER BY SUM(convert_power(output)) DESC NULLS LAST""",values={"gid": country["gid"]},@@ -105,6 +107,7 @@ async def plants_country(request, country):WHERE ST_Contains((SELECT ST_Transform(geom, 3857) FROM countries.country_eez WHERE gid = :gid),geometry)+ AND tags -> 'construction' IS NULLORDER BY convert_power(output) DESC NULLS LAST, name ASC NULLS LAST """,values={"gid": gid},)