I’m trying to interpolate elevations from contour lines (~70000 at 1m intervals, spanning ~20km^2) in QGIS.
When I interpolate using
Inverse Distance Weighting (IDW) in the
Interpolation plugin it uses all contour lines rather than just the adjacent contours?
GDAL Raster plugin (inverse distance to a power) also appears to use all contours and treat the contour lines not as lines but as points?
I also tried
Triangular interpolation (TIN), treating the contour lines as structure lines, but it crashes QGIS, probably because of the number and density of contour lines.
For powers below 5, using the GDAL raster plugin, the resulting DEM is very noisy, and the contour points tend to become local maxima or minima
i.e. for grid cells that have a contour line running through them, but do not contain the points that define the contour line, the interpolated elevations are shifted towards the average elevation of all contour data, rather than being assigned the elevation of the contour line running through them; this is because the interpolation is unnecessarily accounting for the elevations of every single contour point (though weighted by inverse distance).
While this problem is reduced when I use IDW with higher powers, relatively flat regions start to look like nearest neighbor interpolations - like steps, rather than like a large region with a small incline.
From other posts, it sounds like the GRASS
r.surf.contour algorithm has similar problems.
Using a search radius is better, but it still smooths out features smaller than the search radius, and still allows contours not relevant to a grid cell to impact its interpolated elevation.
Is there a way in QGIS to interpolate using only the contour lines immediately adjacent in all directions?
What’s the best practice for interpolating from contour data in QGIS such that contour data is in fact treated as contours, rather than as one large set of points or lines?