5

Hoping this is fairly simple but haven't been able to find much online. I am trying to create some elevation polygons from a DEM model.

Right now I am getting this after getting the contours, converting to multipart, then polygons. But you can see its messing up some of the unbounded contours

enter image description here

Is there any way I can merge a boundary box and then get the polygons to show up correctly? Based on elevation

enter image description here

cbrunner9
  • 61
  • 3
  • I'm not seeing the contour polygons option in the toolbox, just the contour option. Has it moved I'm using version 3.10.13 – cbrunner9 Dec 25 '20 at 14:39
  • Hmm. I have 3.1.4 but definitely dont see another option below contour. Maybe I will try reinstalling. I just upgraded to QGIS 3.10.13 so maybe something weird is going on – cbrunner9 Dec 25 '20 at 14:56
  • That worked! Is there a way to only display the polygons and not the contour lines? – cbrunner9 Dec 25 '20 at 15:29

1 Answers1

4

You can directly use the GDAL contour polygons tool. It is available from GDAL version 2.4.0. To see which GDAL version your QGIS installation uses go to Menu Help / About, see screenshot. If installed, it looks like this:

enter image description here

If you have GDAL >= 2.4.0, but the entry contour polygons does not appear in the QGIS processing toolbox, you can use the "normal" contour tool and simply add the parameter -p (as described in the documentation), see: enter image description here

Be aware, it can take some time. I used a DEM that took 27 minutes (50.7 KB GeoTiff, 3600*3600 pixels, Float32).

To get rid of the contours, simply change the stroke style to no No Pen, see:

enter image description here

Click to symbol bar to reach the settings above: enter image description here

Babel
  • 71,072
  • 14
  • 78
  • 208