GRASS logo

NAME

i.hyper.composite - Create RGB/CIR/SWIR and custom false color composites from a hyperspectral 3D raster map.

KEYWORDS

imagery, hyperspectral, composite

SYNOPSIS

i.hyper.composite
i.hyper.composite --help
i.hyper.composite map=name output=string [composites=string[,string,...]] [composites_custom=string] [strength=integer] [--help] [--verbose] [--quiet] [--ui]

Flags:

--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

map=name [required]
Input hyperspectral 3D raster map
output=string [required]
Output name prefix for composites
composites=string[,string,...]
Which composites to generate
Options: rgb, cir, swir_agriculture, swir_geology
composites_custom=string
Custom wavelengths (nm) as R,G,B (e.g., 2200,848,572)
strength=integer
i.colors.enhance 'strength' (0-100). RGB uses -p; others no -p.
Default: 96

Table of contents

DESCRIPTION

i.hyper.composite creates RGB, CIR, SWIR and custom false-color composites from a hyperspectral 3D raster map (raster_3d). The module reads per-band wavelength metadata from the 3D raster (as written by i.hyper.import / i.hyper.preproc), selects the nearest available bands to requested wavelengths, enhances contrast, and composes a 2D color raster.

Internally, the cube is temporarily exploded into 2D rasters (one per band) using r3.to.rast. For each composite, the nearest bands to target wavelengths are chosen, optional color enhancement is applied with i.colors.enhance, and the final composite is produced with r.composite. Temporary rasters and the temporary region are automatically cleaned up.

Predefined composites are provided for common use-cases; custom triplets (R,G,B in nm) are supported for sensor-agnostic workflows.

FUNCTIONALITY

Built-in composites (target wavelengths in nm):

Custom composite: specify composites_custom=R,G,B (wavelengths in nm), e.g. 2200,848,572 or 560,860,1640. The module selects the nearest available band to each requested wavelength; it does not resample spectrally.

NOTES

OPTIONS

EXAMPLES

# Set the region
g.region raster_3d=prisma

# Example 1: True color (RGB) and CIR from PRISMA
i.hyper.composite map=prisma output=prisma \
                  composites=rgb,cir

# Console output:
Generated composite raster: prisma_rgb
Generated composite raster: prisma_cir
# Example 2: SWIR geology composite from EnMAP

# Set the region
g.region raster_3d=enmap

i.hyper.composite map=enmap output=enmap \
                  composites=swir_geology strength=90

# Console output:
Generated composite raster: enmap_swir_geology
# Example 3: Custom Snow/Ice composite (Green–NIR–SWIR)

# Set the region
g.region raster_3d=tanager

# Uses nearest bands to 560, 860, and 1640 nm
i.hyper.composite map=tanager output=snowice \
                  composites_custom=560,860,1640 strength=92

# Console output:
Generated composite raster: snowice_custom

SEE ALSO

i.hyper.import, i.hyper.preproc, i.hyper.explore, i.hyper.export, r3.to.rast, r.composite, i.colors.enhance, g.region, r3.info

AUTHORS

Alen Mangafić and Tomaž Žagar, Geodetic Institute of Slovenia

SOURCE CODE

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

Latest change: Monday Nov 17 15:45:17 2025 in commit: 615887d217deac99a8f08bcf940384863fd47f2b


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

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2dev Reference Manual