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 this
  • output=name [required] β€” name for the output raster map, also mandatory bestie
  • method=string β€” sampling interpolation method
    • Options: nearest, bilinear, bicubic, lanczos
    • Default: bilinear
    • nearest: Nearest-neighbor interpolation
    • bilinear: Bilinear interpolation
    • bicubic: Bicubic interpolation
  • nprocs=integer β€” number of threads for parallel computing
    • Default: 1
  • 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: for bilinear, bicubic and lanczos interpolation, 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