GRASS logo

NAME

i.hyper.specresamp - Spectral resampling of hyperspectral imagery.

KEYWORDS

imagery, hyperspectral, resampling

SYNOPSIS

i.hyper.specresamp
i.hyper.specresamp --help
i.hyper.specresamp [-iv] input=name [reference=name] output=name [method=string] [wavelengths=string] [fwhm=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-i
Print resampling plan and exit (info mode)
-v
Use only valid bands from input metadata
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

input=name [required]
Input hyperspectral 3D raster map
reference=name
Reference 3D raster map (reads target wavelengths from its metadata)
output=name [required]
Output resampled 3D raster map
method=string
Resampling method
Options: gaussian, linear, nearest
Default: gaussian
wavelengths=string
Output wavelength ranges (e.g. 400-700,700-2500) or explicit comma-separated values
fwhm=string
FWHM (nm) per range for Gaussian (e.g. 8.3,11.5). Also sets band spacing within range.

Table of contents

DESCRIPTION

i.hyper.specresamp performs spectral resampling of a hyperspectral 3D raster map (raster_3d). The module takes a hyperspectral cube imported with i.hyper.import and produces a new 3D raster whose spectral bands are arranged on a user-defined wavelength grid.

This is useful when harmonizing data from different sensors with different spectral sampling, or when simulating a multispectral sensor from hyperspectral data.

METHODS

Three resampling methods are available:

Gaussian convolution (default)

Each output band is computed as a weighted average of input bands based on a Gaussian spectral response function (SRF) centered on the target wavelength. The width of the Gaussian is controlled by the FWHM parameter (Schlapfer et al. 1999). This approach is physically motivated and best suited for sensor simulation or when spectral response fidelity is important.

Linear interpolation

A fast method where each output band is linearly interpolated between the two nearest input bands. This produces a smooth spectral curve and is appropriate when speed is preferred over exact response function matching.

Nearest neighbour

Each output band takes the value of the input band whose center wavelength is closest to the target. Useful for quick band thinning or band selection without any spectral mixing.

NOTES

EXAMPLES

Resample PRISMA to EnMAP spectral configuration using a reference raster

i.hyper.specresamp input=prisma@PERMANENT reference=enmap@PERMANENT \
    output=prisma_enmap_gauss method=gaussian -v

Resample using custom uniform wavelength ranges

i.hyper.specresamp input=prisma output=prisma_resampled \
    wavelengths=400-700,700-2500 fwhm=8.3,11.5 method=gaussian

This generates bands on a uniform grid with step = FWHM per range (e.g., 400-700 nm with 8.3 nm spacing, 700-2500 nm with 11.5 nm spacing). These FWHM values are typical of the EnMAP sensor (VNIR ~8.3 nm, SWIR ~11.5 nm).

Print resampling plan without executing

i.hyper.specresamp input=prisma reference=enmap -i -v

Linear interpolation

i.hyper.specresamp input=prisma reference=enmap \
    output=prisma_enmap_linear method=linear

Nearest neighbour

i.hyper.specresamp input=prisma reference=enmap \
    output=prisma_enmap_near method=nearest

SOURCE CODE

Available at: i.hyper.specresamp source code (history)

Accessed: Sunday Nov 15 10:56:55 2026


Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual