[postgis-users] Need help to create an help table
Luca Bertoncello
lucabert at lucabert.de
Sat Jan 30 05:56:36 PST 2021
Am 30.01.2021 um 14:50 schrieb Tomas Straupis:
Hi Tomas,
> If a polygon is too complex (which means it has too many vertexes),
> then you have several directions of actions:
> 1. Reduce the number of vertexes in a polygon (say use st_simplify,
> st_snaptogrid or other functions which reduce number of vertexes)
I already did that with a query you suggest me:
UPDATE city_boundaries SET way =
ST_Multi(ST_SimplifyPreserveTopology(way, 100));
> 2. Split the initial polygon (thus making more polygons but with
> fewer vertexes), process the parts and then reassemble the polygon.
How can I do that?
> 3. Split the process into parts. Process "smaller" aggregation say
> with distance of 10m and simplification of 10m. Then repeat the same
> steps on the result with larger aggregation of say 40m, then with 160m
> etc.
Do you mean something like that?
UPDATE city_boundaries SET way =
ST_Multi(ST_SimplifyPreserveTopology(way, 100));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
50, 'join=miter'), -50, 'join=miter'));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
100, 'join=miter'), -100, 'join=miter'));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
150, 'join=miter'), -150, 'join=miter'));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
200, 'join=miter'), -200, 'join=miter'));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
250, 'join=miter'), -250, 'join=miter'));
UPDATE city_boundaries SET way = ST_Makevalid(ST_Buffer(ST_Buffer(wayn1,
300, 'join=miter'), -300, 'join=miter'));
> You can also debug the geometries you get (by looking at them in
> QGIS) to check if parameters of the steps leading to buffer+- are ok
> and you are buffering the correct geometries.
I don't know this program... What is it? Can I run it on my PC using the
database on another PC?
Thank you very much
Luca Bertoncello
(lucabert at lucabert.de)
More information about the postgis-users
mailing list