## NAME

i.hyper.export.py - Export 3D hyperspectral 3D raster map (for now, only available compressed multi-band GeoTIFF)

## KEYWORDS

raster3d, export

## SYNOPSIS

i.hyper.export.py
i.hyper.export.py --help
i.hyper.export.py input=name output=name [--overwrite] [--help] [--verbose] [--quiet] [--ui]

### Flags:

--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 3D raster map
output=name [required]
  Output file name

## DESCRIPTION

i.hyper.export exports a hyperspectral 3D raster map (`raster_3d`) from GRASS to an external file. At present, the module supports export to a compressed multi-band GeoTIFF only.

The export process converts the 3D raster map into 2D raster slices using `r3.to.rast`, creates a temporary imagery group, and writes all bands into a single multi-band GeoTIFF file with `r.out.gdal`. All temporary rasters and groups are automatically removed after export.

## FUNCTIONALITY

- Exports the complete hyperspectral 3D raster map as a single multi-band GeoTIFF.
- Preserves the spectral band order and spatial alignment of the input map.
- Uses DEFLATE compression with PREDICTOR=3 for efficient floating-point storage.
- Handles null values as `-9999`.
- Automatically sets the computational region to match the input 3D raster map.

## NOTES

- Currently, only multi-band GeoTIFF export is supported.
- All intermediate rasters and imagery groups are temporary and removed automatically after export.
- The exported GeoTIFF contains spectral data only; wavelength and other metadata remain inside GRASS.
- The output file can be opened in software such as QGIS, ENVI, or Python libraries (`rasterio`, `gdal`).

## OPTIONS

- `input` â€“ Input 3D raster map (required).
- `output` â€“ Output file name (required). Example: `output=prisma_3d.tif`.

## EXAMPLES

    # Example 1: Export PRISMA 3D raster map to compressed GeoTIFF
    i.hyper.export input=prisma@PERMANENT \
                   output=/data/prisma_3d.tif

## OUTPUT

The output is a multi-band GeoTIFF file containing one band per spectral layer of the 3D raster map. Compression (DEFLATE + PREDICTOR=3) ensures compact and precise floating-point storage. Large files are automatically written as BigTIFF when necessary.

## AUTHORS

Alen MangafiÄ‡ and TomaÅ¾ Å½agar, Geodetic Institute of Slovenia

## SOURCE CODE

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

Latest change: Tue Jan 6 21:39:11 2026 in commit: 22f101f1686a37f902e9631c79a905d905c66bf2

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

© 2003-2022 GRASS Development Team, GRASS GIS 8.0.2 Reference Manual