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:
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 [email protected] output= generalized_RASTER method=douglas threshold=5
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.