i.band.library(1)
πΈ NAME πΈ
i.band.library β bestie, this one prints out all the available semantic label info that gets used for multispectral data. It's a GRASS GIS User's Manual page, and it's lowkey iconic. π
π 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β prints out the extended metadata info. the extra lore, basically β¨--helpβ shows you the usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ forces the GUI dialog to launch
π Parameters:
pattern=stringβ your semantic label search pattern. examples:L,S2,.*_2,S2_1operation=stringβ the operation to be performed. Options:print. Default:print
π DESCRIPTION π
i.band.library prints all the available band information for multispectral data as defined by GRASS GIS. These multispectral sensors are supported by default (and yes, you can add other band reference registry files too, 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 with a search pattern (or a fully defined band reference identifier), and you pass that with the pattern option. For the pattern syntax, go peek at the Python regular expression operations documentation. By default? i.band.library prints every single available band reference. no filter, all vibes. π
The extended metadata (central wavelength, spatial resolution, etc.) only shows up when you give it the -e flag. that's the secret handshake π€«
π¦ 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 the strings that identify specific remote sensing platform bands (= band references) can carry extra metadata that's managed by i.band.library. And a specific band reference can be assigned to a raster map as a semantic label using the r.semantic.label or r.support modules. cute, right? π
π NOTES π
The 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 used to reference time series of multi band data. Lots of frameworks use it (check the Google Earth Engine API for example) to address multispectral satellite image series. GRASS basically supports a multi-band raster layer approach with the imagery group concept (i.group). And a whole new semantic label concept was designed to support image collections in GRASS GIS. new era unlocked β¨
π 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). There are only two required attributes: a shortcut and bands. And heads up β a shortcut must be unique across all band reference registry files. The number of other attributes isn't defined or even limited (in the example above only the description and instruments attributes are defined). The list of bands is defined by a bands attribute. Each band is defined by an identifier ("1", "2" in the example above). And the list of attributes describing each band is also not pre-defined or limited β in the example above each band is described by a central wavelength (nm), a bandwidth (nm), and a tag.
The band reference identifier defined by the pattern option is given either by a shortcut β so it prints band reference info for the whole series β or by a specific shortcut_band identifier.
System-defined registry files live in the GRASS GIS installation directory ($GISBASE/etc/i.band.library). And ngl, right now i.band.library only lets you manage system-defined registry files. Support for user-defined registry files is planned, so check the KNOWN ISSUES section below for the tea. β
π₯ 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 the band reference and the related tag if one is defined. π
π Filter band references by a shortcut
Only band identifiers related to the Sentinel-2 satellite will get printed:
i.band.library pattern=S2
S2_1 Visible (Coastal/Aerosol)
...
S2_12 SWIR 2
π Filter band references by a regular expression
Print all the 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 get 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 the Sentinel-2, Landsat7, and Landsat8 satellites. This will be improved in the near future. periodt.
π 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)
Accessed: Saturday Jan 17 05:41:52 2026
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page bestie π this is i.band.library(1) from the GRASS GIS 8.4.2 Reference Manual, GRASS 8.4.2, and the source code was accessed Saturday Jan 17 05:41:52 2026. slay, go label some bands πβ¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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