I have a raster layer from which I extracted only zones with a certain color, then polygonized it with QGis. I just generalized the new vector layer in GRASS to smooth things a bit. There are many holes, "gulfs", "inlets" and cuts because the color zone in the raster overlays a black and white cartographic map. I would like to fill this spots, but I can't find a easy way. I already closed valid holes, but with "gulfs" and "inlets" I cannot use the same command. expample of cuts and inlets

In that image, only the hole on the right is suposed to exist. Is there a easy way to solve this?

1 Answer 1


One what that works fairly well is to buffer the feature(s) by distance x (approximately half of the largest 'inlet' you wish to fill) then inverse buffer the result to get back to the initial boundary.

Another option would be to use something like a 'grow' command on the raster before you convert to vector.

  • thanks! I didn't think of that, simple and effective solution! Nov 23, 2012 at 16:26

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.