2

I am trying various ways to make polygons from raster data using 1 m DEMs. I am using QGIS 3.16 Hannover I have tried vectorizing my data, which does work OK, but I would like smoother boundary lines that you get with contouring.

I have experimented with three techniques, all of which have their pros and cons. Ideally, the Contour Polygon would be the tool to use, however, it takes a very long time to process...too long (a few hours or my computer crashes for areas around 1000 ha in size). Alternatively I tried contouring with polylines, then converting to polygons. This takes less time but I am having issues with unclosed polylines not creating polygons properly. My data set is so large that I can't be tracing this unclosed features to make polygons manually.

Are there anyway to make polygons from a raster file which is faster than the Contour Polygon tool? This tool would be my go to if it didn't take too long. Alternatively, if I could find a way to close my polylines then I can just convert to polygons which hopefully would take less time than using the contour polygon tool.

MrXsquared
  • 34,292
  • 21
  • 67
  • 117
Erioderma
  • 535
  • 2
  • 9
  • What are your QGIS and GDAL versions? How long time is too long? What intervals do you use for polygons, and could you provide some test data? – user30184 Nov 22 '21 at 19:44
  • I updated my original post and addressed your comments. For this exercise, I have just been making a boolian raster and contouring with interval of 1. I can provide test data shortly. – Erioderma Nov 22 '21 at 19:53
  • You can find the data here. The data I am trying to work with are the raster files. I included my Depth to Water Index and also the boolian raster of the values I want to polygonize. In this case, I am trying to make polygons out of DTW values of 0 - 0.5. https://www.dropbox.com/sh/u9l3h9kd6i9osyo/AAB4btlJPs7VM3J1IyKnhjkia?dl=0 – Erioderma Nov 22 '21 at 20:06
  • I think the generally preferred way to get smooth contours is by smoothing the raster DEM first and then creating the contours. You can search on that; here's just one stack exchange item I found: https://gis.stackexchange.com/questions/265854/qgis-raster-map-smoothing-pixels. – John Nov 22 '21 at 20:35
  • Sorry, the link requires Dropbox account. – user30184 Nov 22 '21 at 20:48

0 Answers0