[postgis-users] Creating a boundary of an aggregate of buildings

Luca Bertoncello lucabert at lucabert.de
Wed Jan 27 13:07:17 PST 2021


Am 18.01.2021 um 15:09 schrieb Tomas Straupis:

Hi Tomas and all,

I finally imported all Europe data from OSM in my PostGIS and I created
the table city_boundary as you suggested, with JOIN to another help
table in order to restrict the search.

My Table city_boundary has about 108.000 rows (and only two fields: id
and way) and the aggretation query:

UPDATE city_boundaries SET way =
ST_Makevalid(ST_Multi(ST_Buffer(ST_Buffer(way, 300, 'join=miter'), -300,
'join=miter')));

derived from what you suggested

> -- Aggregates all clustered polygons by adding 120m and then removing
> 120m from all sides
> UPDATE city_boundaries SET way =
> ST_Makevalid(ST_Multi(ST_Buffer(ST_Buffer(way, 120, 'join=miter'),
> -120, 'join=miter'))) WHERE res = 10;

runs since today ~13:30 (8,5 hours).
Do you/do someone have an idea how to speed it up? The PC has 4 cores
and 16 GB RAM and currently I cannot add more RAM.

Thanks a lot
Luca Bertoncello
(lucabert at lucabert.de)


More information about the postgis-users mailing list