I have to create a big polygon with the outer ring from some selected polygons that are close to each other like in the picture.


Is it somehow possible two fill the small gap between the polygons as shown in the other picture


I'm using this query:

 SELECT ST_ExteriorRing((ST_DUMP(ST_Union(the_geom))).geom) FROM parcel

to get the outer line but get 4 rows result.

What do I've to do to get only one row of the outer line without the gaps?


1 Answer 1


Install the PostGIS Addons and do something like:

SELECT ST_BufferedUnion(ST_ExteriorRing((ST_Dump(ST_Union(the_geom))).geom), 10) geom
FROM parcel

ST_BufferedUnion() will make a buffer around your polygons, union them into a single polygon and then remove the buffer. 10 is the size of the buffer. It should be a bit more than the half of width of the gap you want to remove.

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.