From 542fe6634be57bc731f8dd0aa32897c414e8dc99 Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Thu, 11 Mar 2021 19:16:37 +0000 Subject: [PATCH] Add simple dynamics map definition --- app/map_styles/polygon.xml | 30 ++++++++++++++++++++++++++++++ app/src/tiles/dataDefinition.ts | 7 +++++++ 2 files changed, 37 insertions(+) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index d122482d..1debdc17 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -507,4 +507,34 @@ + diff --git a/app/src/tiles/dataDefinition.ts b/app/src/tiles/dataDefinition.ts index fa3913b6..45227491 100644 --- a/app/src/tiles/dataDefinition.ts +++ b/app/src/tiles/dataDefinition.ts @@ -133,6 +133,13 @@ const LAYER_QUERIES = { buildings WHERE current_landuse_order IS NOT NULL`, + dynamics_demolished_count: ` + SELECT + geometry_id, + jsonb_array_length(demolished_buildings) as demolished_buildings_count + FROM + buildings + WHERE jsonb_array_length(demolished_buildings) > 0`, }; const GEOMETRY_FIELD = 'geometry_geom';