Building aggregation fix (#1044)

This PR solving the speed and memory issue with buildings aggregation on zoom level 13. The problem was to create ST_ClusterDBScan which failed after try to cluster a larger area. Now it will make cluster only in "small" polygon using 'country_osm_grid` which covers the world's lands. 

This PR solving #1022 and #974
This commit is contained in:
Tomas Pohanka
2020-11-24 11:27:06 +01:00
committed by GitHub
parent 24b9328a5f
commit 0c6fe2d9ba
3 changed files with 107 additions and 51 deletions

View File

@@ -82,7 +82,7 @@ SELECT geometry,
CASE WHEN hide_3d THEN TRUE END AS hide_3d
FROM (
SELECT
-- etldoc: osm_building_block_gen1 -> layer_building:z13
-- etldoc: osm_building_block_gen_z13 -> layer_building:z13
osm_id,
geometry,
NULL::int AS render_height,
@@ -90,7 +90,7 @@ FROM (
NULL::text AS material,
NULL::text AS colour,
FALSE AS hide_3d
FROM osm_building_block_gen1
FROM osm_building_block_gen_z13
WHERE zoom_level = 13
AND geometry && bbox
UNION ALL