r.resamp.interp(1)
π r.resamp.interp π
okay bestie, so this is r.resamp.interp from the GRASS GIS User's Manual (that's GRASS GIS, the mapping queen π), and she is literally the glow-up tool for your raster maps. Let's get into it β¨
πΈ NAME πΈ
r.resamp.interp β resamples a raster map to a finer grid using interpolation. it's giving makeover, it's giving more pixels, same data, periodt π
π KEYWORDS π
raster, resample, interpolation, nearest neighbor, bilinear, bicubic, lanczos, parallel
β¨ SYNOPSIS β¨
r.resamp.interp
r.resamp.interp --help
r.resamp.interp input=name output=name [method=string]
[nprocs=integer] [memory=memory in MB] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π Flags
--overwriteβ lets the output files just bulldoze over existing files. no cap, they will be replaced π--helpβ prints the usage summary, aka the cheat sheet--verboseβ verbose module output, she's chatty now π£οΈ--quietβ quiet module output, she's giving mysterious and silent π€«--uiβ force-launches the GUI dialog, main character energy only
π¦ Parameters
input=name[required]β name of the input raster map, you MUST give her thisoutput=name[required]β name for the output raster map, also mandatory bestiemethod=stringβ sampling interpolation method- Options:
nearest,bilinear,bicubic,lanczos - Default:
bilinear nearest: Nearest-neighbor interpolationbilinear: Bilinear interpolationbicubic: Bicubic interpolation
- Options:
nprocs=integerβ number of threads for parallel computing- Default:
1
- Default:
memory=memory in MBβ maximum memory to be used (in MB)- Cache size for raster rows
- Default:
300
π DESCRIPTION π
So r.resamp.interp resamples an input raster map by interpolating between the neighboring cells via a selectable resampling algorithm. Obsessed. π
okay important part, listen up: all cells present in the neighborhood of the input raster cell must be non-null to generate a non-null cell in the output raster map. so if the squad isn't complete, the output cell is a no-show.
You get a choice of four interpolation methods, and each one uses the weighted values of a different number of adjacent cells in the input map to figure out the value of each cell in the output map. like this:
- nearest neighbour (1 cell) π§
- bilinear (4 cells)
- bicubic (16 cells)
- lanczos (25 cells) π
This module is intended for reinterpolation of continuous data to a different resolution, not for interpolation from scattered data β if that's what you want, use the v.surf.* modules instead. different tool, different vibe, iykyk π
π NOTES π
Resampling modules (r.resample, r.resamp.stats, r.resamp.interp, r.resamp.rst) resample the map to match the current region settings. so like, check your region, bestie.
heads up: forbilinear,bicubicandlanczosinterpolation, cells of the output raster that cannot be bounded by the appropriate number of input cell centers are set to NULL (that's NULL propagation). this could happen because the input cells are outside the current region, are NULL, or are MASKed. so the nulls spread, unfortunately π
For longitude-latitude coordinate reference systems, the interpolation algorithm is based on degree fractions, not on the absolute distances between cell centers. Any attempt to implement the latter would violate the integrity of the interpolation method. so don't try it. she said what she said π
π₯ PERFORMANCE π₯
By specifying the number of parallel processes with the nprocs option, r.resamp.interp can run significantly faster β see the benchmarks below. π₯
Figure: Benchmark shows execution time for different number of cells. See benchmark scripts in source code.
To reduce the memory requirements to the minimum, set option memory to zero. And to take advantage of the parallelization, GRASS GIS needs to be compiled with OpenMP enabled β no OpenMP, no speed-up, sorry babe π«Ά
π EXAMPLE π
Resample elevation raster map to a higher resolution (from 500m to 250m; North Carolina sample dataset):
g.region raster=elev_state_500m -p
g.region res=250 -ap
r.resamp.interp input=elev_state_500m output=elev_state_250m \
method=bilinear
Original 500m resolution elevation map
Resampled (bilinear) 250m resolution elevation map
she ate that π β¨
π SEE ALSO π
g.region, r.resample, r.resamp.filter, r.resamp.rst, r.resamp.stats
Overview: Interpolation and Resampling in GRASS GIS
π« AUTHOR π«
Glynn Clements β iconic, legendary, we stan π«Ά
π SOURCE CODE π
Available at: r.resamp.interp source code (history)
Accessed: Saturday Jan 17 05:40:57 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay that's the whole page bestie, and just so you know β this beauty shipped with GRASS 8.4.2, accessed on Saturday Jan 17 05:40:57 2026, brought to you by the GRASS Development Team and the 8.4.2 Reference Manual π mwah, go resample something gorgeous β¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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