Using QGIS, I started with LIDAR points (every 5 m) on a 90’000 ha area and then converted it in a raster of elevation (interpolating to fill some holes in LIDAR data). Now, I want to get a polygon representing the surface for which the cell value is equal or below a given threshold value.

I tried two methods:

  1. Creating contours at the threshold value from the raster and converting these contours to polygons.
  2. Polygonizing the raster reclassified as zeros (cell > x) and ones (cell =< x) and then simplifying it to a more contour-like shape.

Using method 1, the result is really close to what I want. Polygons are created but polygons that should be holes within a polygon, or islands within a hole, are created as separate polygons. Is there a way to convert contour lines into polygons while keeping holes and islands? If not, is there a way to correct this afterwards?

Method 2 seems a good approach in theory although very time consuming (in processing time). I found instructions proposed previously by « Lars » using GRASS (GRASS v.generalize method=douglas not working as expected). I’m satisfied with the result I got using a sampled polygon, but it doesn’t seem to work when using complete dataset : the processing of « v.generalize » seems to either crash or stop, and it happens when topology is building. I wonder if it’s only a matter of file size and computing limitations or if it’s a little more complicated than that.

v.generalize -c input=Vectorised_RASTER@username output= generalized_RASTER method=douglas threshold=5

1 Answer 1


It seems I found an answer to my question. Before converting the contour lines of a given elevation value in polygons, I used the following function in QGIS: Vector -> Geometry Tools -> Single parts to multipart.

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.