r.surf.idw(1grass)
π r.surf.idw π
okay bestie, welcome to r.surf.idw, a lil module from the GRASS User's Manual family that literally just does surface interpolation from raster point data by Inverse Distance Squared Weighting. that's the whole vibe. she interpolates. she slays. β¨
πΈ KEYWORDS πΈ
raster, surface, interpolation, IDW
β¨ SYNOPSIS β¨
r.surf.idw
r.surf.idw --help
r.surf.idw [-e] input=name output=name [npoints=integer]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags:
-eβ the output is the interpolation error (yes, the whole point of this flag is being messy and showing you the tea β)--overwriteβ lets output files overwrite existing files. she said out with the old π«Ά--helpβ prints the usage summary--verboseβ verbose module output (she talks a lot, we love her for it)--quietβ quiet module output (she's giving silent treatment π )--uiβ force launching GUI dialog
π Parameters:
input=name[required] β name of input raster mapoutput=name[required] β name for output raster mapnpoints=integerβ number of interpolation points- Default:
12
- Default:
π DESCRIPTION π
so like, r.surf.idw fills a grid cell (raster) matrix with interpolated values that get generated from input raster data points. it uses a numerical approximation technique based on distance squared weighting of the values of nearest data points. the number of nearest data points used to determine the interpolated value of a cell can be specified by the user (default: 12 nearest data points). iconic behavior, honestly.
if there's a current working mask, it applies to the output raster map. only those cells falling within the mask will be assigned interpolated values. the search procedure for the selection of nearest neighboring points will consider all input data, without regard to the mask. the -e flag is the error analysis option that interpolates values only for those cells of the input raster map which have non-zero values and outputs the difference (peep the NOTES below, bestie).
the npoints parameter defines the number of nearest data points used to determine the interpolated value of an output raster cell.
π¦ NOTES π¦
r.surf.idw is a surface generation utility which uses inverse distance squared weighting (as described in Applied Geostatistics by E. H. Isaaks and R. M. Srivastava, Oxford University Press, 1989) to assign interpolated values. the implementation includes a customized data structure somewhat akin to a sparse matrix which enhances the efficiency with which nearest data points are selected. for latitude/longitude projections, distances are calculated from point to point along a geodesic. no cap. π
unlike r.surf.idw2 (addon), which processes all input data points in each interpolation cycle, r.surf.idw attempts to minimize the number of input data for which distances must be calculated. execution speed is therefore a function of the search effort, and does not increase appreciably with the number of input data points.
r.surf.idw will generally outperform r.surf.idw2 except when the input data layer contains few non-zero data, i.e. when the cost of the search exceeds the cost of the additional distance calculations performed by r.surf.idw2. the relative performance of these utilities will depend on the comparative speed of boolean, integer and floating point operations on a particular platform.
worst case search performance by r.surf.idw occurs when the interpolated cell is located outside of the region in which input data are distributed. it therefore behooves the user to employ a mask when geographic region boundaries include large areas outside the general extent of the input data. π (translation: mask it, bestie, or she WILL struggle)
the degree of smoothing produced by the interpolation will increase relative to the number of nearest data points considered. the utility may be used with regularly or irregularly spaced input data. however, the output result for the former may include unacceptable nonconformities in the surface pattern. π not the nonconformities!!
β Surface-generation error analysis β
the -e flag option provides a standard surface-generation error analysis facility. it produces an output raster map of the difference of interpolated values minus input values for those cells whose input data are non-zero. for each interpolation cycle, the known value of the cell under consideration is ignored, and the remaining input values are used to interpolate a result. the output raster map may be compared to the input raster map to analyze the distribution of interpolation error. this procedure may be helpful in choosing the number of nearest neighbors considered for surface generation. like a lil self-check era, we love growth π
π KNOWN ISSUES π
module r.surf.idw works only for integer (CELL) raster maps. that's it. that's the limit. read it and weep π
πΈ SEE ALSO πΈ
r.surf.contour, r.surf.gauss, r.surf.fractal, r.surf.random, v.surf.idw, v.surf.rst
Overview: Interpolation and Resampling in GRASS
π AUTHOR π
Greg Koerper Global Climate Research Project U.S. EPA Environmental Research Laboratory 200 S.W. 35th Street, JSB Corvallis, OR 97333
π§ SOURCE CODE π§
Available at: r.surf.idw source code (history)
Latest change: Tuesday Dec 23 23:30:51 2025 in commit: 2550be39b3524cf105ce856cb27ac8efaeef1bfb
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
and that's the whole manual, bestie!! this was r.surf.idw(1grass) from the GRASS 8.5.0 Reference Manual β Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual π
β¨ go interpolate something cute, and remember: mask your regions, pick your npoints, and stay iconic π«ΆπΈ
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms