[postgis-users] Creating a boundary of an aggregate of buildings
Luca Bertoncello
lucabert at lucabert.de
Fri Jan 29 06:13:10 PST 2021
Am 27.01.2021 22:07, schrieb Luca Bertoncello:
Hi list
> 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.
I found what uses the huge amount of RAM:
gis=# select char_length(way) from city_boundaries where id = 25822;
char_length
-------------
2252882
So a very huge polygon...
And if I check the other polygons for Europe, I see:
gis=# select count(*) from city_boundaries where char_length(way) >
100000;
count
-------
675
(1 Zeile)
gis=# select count(*) from city_boundaries where char_length(way) >
1000000;
count
-------
45
(1 Zeile)
Maybe is there any other possibility to aggregate the huge polygons
reducing the used RAM?
Thanks
Luca Bertoncello
(lucabert at lucabert.de)
More information about the postgis-users
mailing list