I.hyper: toolset for hyperspectral data processing in GRASS

The purpose of this topic is to discuss, posts updates about and build together i.hyper.

The purpose of i.hyper is to provide a complete toolset for hyperspectral data processing in GRASS. It enables importing, preprocessing, visualization and exporting of hyperspectral datasets (raster_3d).

We (@ychemin and @tomazz Tomaž Žagar) are planning to push this Addon and this post is meant to update you with the latest work we do on this addon and to invite new contributors.

Modules in the i.hyper suite operate together to handle hyperspectral workflows. They include tools for data import, spectral preprocessing, visualization, and export, fully integrated with the GRASS 3D raster environment.

POSSIBLE ROAD MAP

  • Smarter metadata handling (top priority)

  • Hyperspectral should be a submenu of the imagery, loaded by default by i.spectral and any i.hyper addon installed

  • Wavelenght units should be integrated in the default 3D raster map metadata (nm, micrometers, unitless radiance, cm-1, etc.)

  • Atmospheric correction from radiance to reflectance (this is already started as i.hyper.smac by @ychemin )

  • Standardized export formats (Zarr, HDF5) (metadata in headers or separate files)

  • Refactoring Python components to native GRASS where possible

  • Integration of field spectrometry data

  • Support for regression and classification tasks (integrating hypnagogic)

  • Improved read and write performance (including faster 3D garray access)

  • 3D hyperspectral cube visualization

  • Importers for additional data (OCI, HySIS, EMIT, DESIS, Hyperion)

  • Additional preprocessing modules (e.g., wavelet transform)

  • Aerial imagery module with multi-sensor harmonization

Go!

1 Like

Hi Alen, thanks for opening this, we can work with that!

First draft of i.hyper.smac

1 Like

tagging @ztomaz

and adding the link to the i.hyper documentation (:sweat_smile: )

1 Like

I am able to import these tanager products:

- basic_sr (surface reflectance)

- basic_radiance (TOA radiance)

But those I cannot:

  • ortho_sr (orthorectified surface reflectance)
  • ortho_radiance (orthorectified TOA radiance)

i.hyper.import does not recognize the keywords for those (not toa_radiance nor reflectance)

Hi Yann,

currently only Tanager Basic Scene products are supported - orthorectified files store the data in different h5 folder (GRIDS instead of SWATHS) - therefore the importer cannot find the datasets, and even if it would be able to find the datasets it would fail as with basic product we are using HYP/Geolocation_Fields which are not present (nor needed) in orthorectified product … will try to add support also for orthorectified files ASAP …

1 Like

Thanks Tomaz, I am able to use the radiance maps from basic_radiance for the time being. Will move on to debug the atmospheric correction.

R3.mask does not have -r flag

Yes, for now the option is g.remove -f type=raster_3d name=MASK

On Thu, Dec 11, 2025 at 6:36 AM ychemin via OSGeo Discourse <noreply@discourse.osgeo.org> wrote:

| | ycheminDecember 11 |
|----|----|
| |

R3.mask does not have -r flag


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi,

so there is no metadata transferred from basic_radiance pertaining to atmospheric correction requirements:

1 - Sun Zenith Angle

2 - Sun Azimuth Angle

3 - Satellite Zenith Angle

4 - Satellite Azimuth Angle

Could you look into making them available as metadata, so atmospheric correction Algorithms can work? Number 3 might be an array 1D or 2D, or just an average, to check.

OK noted thanks

It might be RASTER3D_MASK actually?

1 Like

Yes, without this we cannot continue and we go back to the fact, that a smarter metadata handling is top priority.

@annakrat what would you suggest? beside wavelength and other band wise metadata we must add additional one to make processing possible. For now all the metadata has a dummy scheme, as it is simply written in comments and then parsed. We should update this somehow in a better way, then refactor all the i.hyper tools to follow it, then build other tools based on that. That metadata scheme should also be extendable. Any hints?

1 Like

I.spectral does not allow more than 400 bands ! Tanager has 426….

i.spectral does not load from rast3d, I need to output to separate bands and then load the spectrum from i.spectral through a group…

1 Like

I am a bit stuck with the atmospheric addon, too many work arounds….

1 - r3.mask should have -r for removing

2 - i.spectral should have a max loading band > 5000, and display inside a window of the main GUI using matplotlib library, it should be able to load rast3d directly

3 - I should get a full grasp at how natively inside rast3d dataset and process a single layer.

i.hyper.explore works for any number of bands: i.hyper.explore - GRASS GIS manual

1 Like

Is it possible to degrade it to a generic r3.spectral or r3…, or something. Well, GRASS should have a generic option for raster, raster3d, imagery and temporal. Maybe based on i.hyper.explore and it should be available in the main GUI somehow.

I agree with that, but for now it is probably better to add new i.hyper functionalities and at one point, if/when such modules are added to GRASS, adapt the tools.

I am not confident in building core GRASS components (that’s why i started with the addon)- probably the best we can do in this context is to recognize such things, add issues/enhancement request to Github and continue with what we have.

There are not many r3 modules in general and by accounting the roadmap (integration into data science pipelines roadmap) I suppose they should/could be there at some point.

1 Like

Getting there for atmo corr

r3.mapcalc expression=output=if(z)==band, (do_calculation, output)

It will take 5 hours for a Tanager rast3d

This is agonisingly slow, any other faster trick?

1 Like