I got some issues with v.clean in QGIS. I try to get rid of small polygons in a vectoriced raster layer. The Layer got one column with integers with value 0 or 1. I use:

{ '-b' : True, '-c' : False, 'GRASS_MIN_AREA_PARAMETER' : 10, 'GRASS_OUTPUT_TYPE_PARAMETER' : 0, 'GRASS_SNAP_TOLERANCE_PARAMETER' : 1, 'threshold' : '20', 'tool' : [10], 'type' : [0,1,2,3,4,5,6] }

This is resulting in an empty layer.

I get some warnings:

WARNING: Number of centroids exceeds number of areas: 659 > 481
WARNING: Number incorrect boundries: 793
WARNING: Number of Zentroide outside area: 69
WARNING: number dulicated centroids: 312

I also get:

WARNING: Unable to open vector map <errorcc4d6446b5744b57b305484cedcc56c4@PERMANENT> on level 2. Try to rebuild vector topology with v.build.

I already used fix geometries, delete duplicate geometries and v.build with no errors shown. I tried with an fid and without one. When I use default values of v.clean without a threshold and only change 'tool' to [10]. I get a result but it is just random, some small polygons are deleted but also the values of the most polygons are altered.

  • 1
    What coordinate system are you using? I'd convert any geographic to projected for the tool. You might try breaking your polys first limiting your input parameters to line, boundary & area, and your tools to break, snap and bpol, and select an acceptable tolerance and run the tool. Then on the result of that run, run the v.clean again this time first with rmdupl (if the log says there are dupes) then with the rmarea selected. Or you could run the QGIS remove duplicates and eliminate tools. For the latter calculate an area field, select those that are too small and a method.
    – John
    Jun 7, 2022 at 0:48
  • Thanks for the help. None of this resulted in a successful processing. So I tried GRASS itself without QGIS, there it worked like a glove. Think the implementation of GRASS in QGis is a bit tricky.
    – sfetan
    Jun 10, 2022 at 17:45

1 Answer 1


Using GRASS directly without QGIS solved the problem.

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.