I'm using QGIS to work with a contour line shapefile with contour lines that are not spaced evenly (e.g. not just 100 meter elevation increase between each line). The increase ranges from a 100 meter increase to a 5000 meter increase. Is there anyway to create a DEM from this data, or do I need to find a way to regularly space the elevation data?
1 Answer
I'd suggest r.surf.contour
tool, which is found in the Processing Toolbox > GRASS > Raster(r.*)
.
Note 1) This GRASS tool can be run only when you use "QGIS Desktop 3.xx.x with GRASS 7.8.x".
Note 2) This tool requires a raster as input.
- A small example of uneven contours (100, 200, 300, ..., 1000, 1500) was rasterized by
Rasterize (Vector to Raster)
in theProcessing Toolbox > GDAL > Vector Conversion
. This tool produces a Rasterized layer.
Start r.surf.contour tool.
Select
Rasterized
layer as the input raster layer, and make sure to calculate the region extent of this layer (even though it says optional).Final output layer is called DTM from contours. The quality of the image depends on how you set the pixel size. Please note I have rasterized the contour to 300 x 400 pixels (the above image).
-
-
Hmm, when I try this, I get a layer output that only has two sub layers instead of the 5 that you show. One is negative and one is positive, and both are the same magnitude. Not real sure where the values come from as neither of them are elevations that are represented in the contours. I also note that your contour layer has 5 sub layers, where did those come from? My contour does not have those. Feb 2, 2021 at 1:00
-
1@ScottCasey My contour (vector - lines) was one layer without sub-zones. What you are seeing is the gradient color scheme, and it (the class) can be any number.– KazuhitoFeb 2, 2021 at 1:05