2

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.

Polygon1

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

Polygon2

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

1 Answer 1

2

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 that you have read and understand our privacy policy and code of conduct.

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