I have one polygon layer with many holes. I would like to generalize it. I used v.generalize of grass. With it, I used chaiken algorithm. But, only the borders of polygons were generalized, the holes in them haven't smoothed their edges.

What can I do to smooth all edges (adding hole edges) of polygon?

Holes with serrated edges

  • 1
    I would explode polygons in outer shell and holes, generalize them, and again build donut polygons. Cannot check which commands to use for this at the moment. – Detlev Mar 15 '16 at 21:34
  • Does this problem also happen in GRASS GIS 7? – markusN Mar 22 '16 at 19:59

I recommend you to use the brand new geoalgorithm from QGIS 2.14.1, named Smooth.py

With Smooth Geometry it's possible to smooth the entire polygon, not only the boundaries, as in Chaiken method from v.generalize

  • Interesting, will have to try out QGIS 2.14 sometime soon! – Joseph Apr 4 '16 at 14:11

I'm guessing you are using GRASS 6.4.x as there were issues regarding generalizing polygons with holes. This has been fixed in GRASS 7, although I do not have this version so cannot confirm it.

A workaround would be to use the Fill holes tool from the Processing Toolbox on your original layer:

Example polygon

Filled holes

Use the Difference tool on both the original and filled layers:


Use the v.generalize tool on both the filled and the difference layers:

Filled generalized

Difference generalized

Finally, run the Difference tool again on both the generalized layers:

Final result

  • 1
    I think to do as you advice me. Even solve the problem of my question, your solution seem a little hard. I will check what the version which I do my work. You are rigth, the grass version is 6.4.x. I will do in 7.0 version and tell you what happen. Thanks – Diogo Caribé Mar 16 '16 at 11:29
  • @DiogoCaribé - Perhaps you could share your shapefile so that others could test it using other methods? – Joseph Mar 16 '16 at 11:33

I believe the best generalization tool out there is http://www.mapshaper.org/ and it seems to handle holes just fine. Super easy to use/much shorter workaround. I usually use the visvalingam algorithm.

enter image description here

  • I don't like this tool. Better, I dislike the its algorithm. The result is so rude. There are others algorithm that smooth polygons continuous. – Diogo Caribé Mar 21 '16 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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