3

I'm looking for strategies to replicate the functionality available via ArcGIS' "Aggregate Polygons" tool. This is different from a straight dissolve on the polygons - the operation has to fill in gaps within a certain tolerance.

I'd be happy with a solution in either QGIS or PostGIS. I tried to work something out already with a convex hull but it doesn't quite get what I'm after so I'm at a loss. Any strategies you've come across?

1 Answer 1

2

You can try something using either ST_ConvexHull or ST_ConcaveHull. Obviously, this is just a quick hack, but it might work in your circumstances.

Here's my original polygons:

enter image description here

Here's a union of the pairwise convex hulls for polys <= 500m apart:

enter image description here

select st_union(geom) as geom 
from (
  select st_convexhull(st_collect(a.geom, b.geom)) as geom 
  from polys a, polys b
  where st_dwithin(a.geom, b.geom, 500) and a.gid<b.gid
) t;

Here's a union of the pairwise concave hulls with 0.5 for the argument:

enter image description here

select st_union(geom) as geom 
from (
  select st_concavehull(st_collect(a.geom, b.geom), 0.5) as geom 
  from polys a, polys b 
  where st_dwithin(a.geom, b.geom, 500) and a.gid<b.gid
) t;

Things get weird if you enable holes in ST_ConcaveHull:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.