[postgis-users] Need help to create an help table

Luca Bertoncello lucabert at lucabert.de
Sat Jan 30 04:21:24 PST 2021


Am 30.01.2021 um 13:00 schrieb Darafei "Komяpa" Praliaskouski:

Hi

> for one-offs, there can be done on huge computer in Google Colab:
> https://colab.research.google.com/gist/Komzpa/fb24368a746854e53ebf79481dc24f18/postgis-on-colab.ipynb

This could be interesting...
But I can't understand how I can do that and how much it costs (if it
costs)...

> Another thing to check is that if it is really a memory issue: you can't
> have intermediate results more that 1GB per value in Postgres, and if
> you, say, aggregate 130 MB and then take a buffer (x4x8 points = 4.1 GB)
> that may just not be calculable without splitting it upfront and writing
> a fancier query that does not hold it all in one value. Then your
> computer should be fine.

The problem is not to select the rows, the problem are the GIS function
I have to call:

UPDATE city_boundaries SET wayn2 = ST_Multi(ST_Buffer(wayn1, 300,
'join=miter'));
UPDATE city_boundaries SET wayn3 = ST_Multi(ST_Buffer(wayn2, -300,
'join=miter'));
UPDATE city_boundaries SET wayn4 = ST_Makevalid(wayn3);

Specially the first seems to need a huge amount of RAM and a fast CPU...
Some polygon are very complex...

Regards
Luca Bertoncello
(lucabert at lucabert.de)


More information about the postgis-users mailing list