i.band.library(1grass)
i.band.library πβ¨
okay bestie, this is the GRASS manual page for i.band.library, straight out of the GRASS User's Manual. It's a little tool that prints the semantic label info used for multispectral data. Sensor lore, band lore, registry files β the whole vibe. Let's get into it π¦
Keywords: general, imagery, semantic label, image collections π
β¨ SYNOPSIS β¨
i.band.library
i.band.library --help
i.band.library [-e] [pattern=string] [operation=string] [--help]
[--verbose] [--quiet] [--ui]
π Flags
-eβ print extended metadata information π--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output π€«--uiβ force launching GUI dialog
πΈ Parameters
pattern=stringβ semantic label search pattern (examples:L,S2,.*_2,S2_1)operation=stringβ operation to be performed. Options:print. Default:print
π DESCRIPTION
So, i.band.library prints the available band information for the multispectral data that GRASS has defined. By default these multispectral sensors are the ones supported β and heads up, other band reference registry files can totally be added, more on that below π«Ά
Generic multispectral system:
gen_rVisible redgen_gVisible greengen_bVisible bluegen_panVisible panchromaticgen_nirNear infrared
Landsat-5:
L5_1Visible (Blue)L5_2Visible (Green)L5_3Visible (Red)L5_4Near-InfraredL5_5Short-wave infraredL5_6ThermalL5_7Short-wave infrared
Landsat-7:
L7_1Visible (Blue)L7_2Visible (Green)L7_3Visible (Red)L7_4Near-InfraredL7_5Near-InfraredL7_6ThermalL7_7Mid-InfraredL7_8Panchromatic
Landsat-8:
L8_1Visible (Coastal/Aerosol)L8_2Visible (Blue)L8_3Visible (Green)L8_4Visible (Red)L8_5Near-InfraredL8_6SWIR 1L8_7SWIR 2L8_8PanchromaticL8_9CirrusL8_10TIRS 1L8_11TIRS 1
Sentinel-2:
S2_1Visible (Coastal/Aerosol)S2_2Visible (Blue)S2_3Visible (Green)S2_4Visible (Red)S2_5Vegetation Red Edge 1S2_6Vegetation Red Edge 2S2_7Vegetation Red Edge 3S2_8Near-InfraredS2_8ANarrow Near-InfraredS2_9Water vapourS2_10SWIR - CirrusS2_11SWIR 1S2_12SWIR 2
The band references that get printed can be filtered by a search pattern β or by a fully defined band reference identifier β which you hand over with the pattern option. For the pattern syntax, go peek at the Python regular expression operations documentation. And by default? i.band.library prints all the available band references. No filtering, all vibes π¦
Extended metadata (think central wavelength, spatial resolution, etc.) only shows up when you pass the -e flag. Periodt.
π§ Band reference and semantic label relation
Band references are a special case β a subset, if you will β of semantic labels. Any string can be a semantic label, but strings that identify specific remote sensing platform bands (= band references) can have extra metadata managed by i.band.library. And a specific band reference can be assigned to a raster map as a semantic label by the r.semantic.label or r.support modules π
π NOTES
The whole semantic label concept is supported by temporal GRASS modules β go look at t.register, t.rast.list, t.info and t.rast.mapcalc for examples, iykyk.
π Image collections
Image collections are the common data type for referencing time series of multi band data. It's used in so many frameworks (Google Earth Engine API, for example) to address multi spectral satellite image series. GRASS basically supports a multi-band raster layer approach with the imagery group concept (i.group). And a new semantic label concept is designed specifically to support image collections in GRASS π«
π Band reference registry files
Band reference information lives in JSON files with a pre-defined internal data structure. Here's a minimalistic example:
{
"Sentinel2": {
"description": "The Sentinel-2 A/B bands",
"shortcut": "S2",
"instruments": "MultiSpectral Instrument (MSI) optical and infrared",
"launched": "23 June 2015 (A); 07 March 2017 (B)",
"source": "https://sentinel.esa.int/web/sentinel/missions/sentinel-2",
"bands": {
"1": {
"Sentinel 2A" : {
"central wavelength (nm)": 443.9,
"bandwidth (nm)": 27
},
"Sentinel 2B" : {
"central wavelength (nm)": 442.3,
"bandwidth (nm)": 45
},
"spatial resolution (meters)": 60,
"tag": "Visible (Coastal/Aerosol)"
},
"2": {
"Sentinel 2A" : {
"central wavelength (nm)": 496.6,
"bandwidth (nm)": 98
},
"Sentinel 2B" : {
"central wavelength (nm)": 492.1,
"bandwidth (nm)": 98
},
"spatial resolution (meters)": 10,
"tag": "Visible (Blue)"
}
}
}
}
Each series starts with a unique identifier ("Sentinel2" in the example above). Only two attributes are required: a shortcut and bands. And note β a shortcut must be unique across all band reference registry files, no duplicates allowed bestie π
The number of other attributes isn't defined or even limited (in that example above, only the description and instruments attributes are defined). The list of bands is defined by a bands attribute, and each band is defined by an identifier ("1", "2" in the example above). The list of attributes describing each band isn't pre-defined or limited either. In the example, each band is described by a central wavelength (nm), bandwidth (nm), and a tag β¨
A band reference identifier defined by the pattern option is given by a shortcut β that's how you print band reference information for the whole series β or by a specific shortcut_band identifier.
System-defined registry files live in the GRASS installation directory ($GISBASE/etc/i.band.library). And note: currently i.band.library only allows managing system-defined registry files. Support for user-defined registry files is planned to be implemented β check the KNOWN ISSUES section for details π
π₯ EXAMPLES π₯
β¨ Print all available band references
i.band.library
S2_1 Visible (Coastal/Aerosol)
S2_2 Visible (Blue)
...
L7_1 Visible (Blue)
L7_2 Visible (Green)
...
L8_1 Visible (Coastal/Aerosol)
L8_2 Visible (Blue)
...
The module prints band reference and related tag if defined π
β¨ Filter band references by a shortcut
Only band identifiers related to the Sentinel-2 satellite will be printed:
i.band.library pattern=S2
S2_1 Visible (Coastal/Aerosol)
...
S2_12 SWIR 2
β¨ Filter band references by a regular expression
Print all available 2nd bands:
i.band.library pattern=.*_2
S2_2 Visible (Blue)
L7_2 Visible (Green)
L8_2 Visible (Blue)
...
β¨ Print extended metadata for specified band identifier
Extended metadata related to the first band of the Sentinel-2 satellite will be printed:
i.band.library -e pattern=S2_1
description: The Sentinel-2 A/B bands
shortcut: S2
instruments: MultiSpectral Instrument (MSI) optical and infrared
launched: 23 June 2015 (A); 07 March 2017 (B)
source: https://sentinel.esa.int/web/sentinel/missions/sentinel-2
band: 1
Sentinel 2A:
central wavelength (nm): 443.9
bandwidth (nm): 27
Sentinel 2B:
central wavelength (nm): 442.3
bandwidth (nm): 45
spatial resolution (meters): 60
tag: Visible (Coastal/Aerosol)
π KNOWN ISSUES
ngl, i.band.library currently has very limited functionality. Only system-defined band references are supported. The final implementation will support managing (add, modify, delete) user-defined band references. It's giving "coming soon" π
Also, only a very limited number of band references is currently defined β namely Sentinel-2, Landsat7, and Landsat8 satellites. This will be improved in the near future π
π REFERENCES
- Google Earth Engine API
π«Ά SEE ALSO
r.semantic.label, r.info
π AUTHORS
Martin Landa
Development sponsored by mundialis GmbH & Co. KG (for the openEO EU H2020 grant 776242) π
πΈ SOURCE CODE
Available at: i.band.library source code (history)
Latest change: Friday Aug 08 09:39:19 2025 in commit: ed72c71d8580e872cd6fd345c84a15c324764465
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie, no cap π ok so the sign-off: this whole thing is Β© 2003-2026 GRASS Development Team, straight from the GRASS 8.5.0 Reference Manual, and yeah the footer says GRASS 8.5.0 too β slay, go filter some bands π¦β¨π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms