Am 18.01.2021 10:21, schrieb Tomas Straupis:

Hi Tomas,

  In order to do aggregation/dissolving, you can try using st_buffer
on grouped (clustered) geometries.
  Something like this:

  st_buffer(st_buffer(your_clustered_aggregated_geometry, 1000), -1000)

  Depending on details you can add an option to use quad_segs=1 to
avoid having round corners when doing positive buffer.
  Something like this:

  st_buffer(st_buffer(you_clustered_aggregated_geometry, 1000,
'quad_segs=1'), -1000, 'quad_segs=1')

Do you mean something like that?

SELECT ST_Buffer(ST_Buffer(way, 1000'quad_segs=1'), -1000, 'quad_segs=1')
      FROM
(SELECT way, ST_ClusterDBSCAN(way, eps := 50, minpoints := 2) OVER () AS cid
         FROM planet_osm_polygon
WHERE landuse IN ('residential', 'retail', 'retail;residential')
        ) a

Thanks
Luca Bertoncello
(lucab...@lucabert.de)
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to