Note: A new GRASS GIS stable version has been released: GRASS GIS 7.8, available here.
Updated manual page: here
r.surf.contour works in a similar way. Initially, a vector map of the contour lines is made with the elevation of each line as an attribute. When the program v.to.rast is run on the vector map, continuous "lines" of rasters containing the contour line values will be the input for r.surf.contour. For each cell in the input map, either the cell is a contour line cell (which is given that value), or a flood fill is generated from that spot until the fill comes to two unique values. So the r.surf.contour algorithm linearly interpolates between contour lines. The flood fill is not allowed to cross over the rasterized contour lines, thus ensuring that an uphill and downhill contour value will be the two values chosen. r.surf.contour interpolates from the uphill and downhill values by the true distance.
An existing MASK raster map is respected for both reading input and writing output.
The running of r.surf.contour is very sensitive to the resolution of rasterized vector map. If multiple contour lines go through the same raster, slight anomalies may occur. The speed of r.surf.contour is dependent on how far "apart" the contour lines are from each other (as measured in raster cells). Since a flood fill algorithm is used, the program's running time will grow exponentially with the distance between contour lines.
g.region raster=elevation -p # get minimum elevation value r.univar elevation # generate vector contour lines r.contour input=elevation output=contours_5m step=5 minlevel=50 # rasterize contour lines v.info -c contours_5m v.to.rast input=contours_5m output=contours_5m use=attr attribute_column=level # generate DEM from rasterized contour lines r.surf.contour input=contours_5m output=elevation_from_cont5m # calculate difference map r.mapcalc "diff = elevation - elevation_from_cont5m" r.colors diff color=differences # analyze differences statistically r.univar diff
Overview: Interpolation and Resampling in GRASS GIS
Last changed: $Date$
Available at: r.surf.contour source code (history)
Note: A new GRASS GIS stable version has been released: GRASS GIS 7.8, available here.
Updated manual page: here
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2020 GRASS Development Team, GRASS GIS 7.6.2dev Reference Manual