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_1
  • operation=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_r Visible red
  • gen_g Visible green
  • gen_b Visible blue
  • gen_pan Visible panchromatic
  • gen_nir Near infrared

Landsat-5:

  • L5_1 Visible (Blue)
  • L5_2 Visible (Green)
  • L5_3 Visible (Red)
  • L5_4 Near-Infrared
  • L5_5 Short-wave infrared
  • L5_6 Thermal
  • L5_7 Short-wave infrared

Landsat-7:

  • L7_1 Visible (Blue)
  • L7_2 Visible (Green)
  • L7_3 Visible (Red)
  • L7_4 Near-Infrared
  • L7_5 Near-Infrared
  • L7_6 Thermal
  • L7_7 Mid-Infrared
  • L7_8 Panchromatic

Landsat-8:

  • L8_1 Visible (Coastal/Aerosol)
  • L8_2 Visible (Blue)
  • L8_3 Visible (Green)
  • L8_4 Visible (Red)
  • L8_5 Near-Infrared
  • L8_6 SWIR 1
  • L8_7 SWIR 2
  • L8_8 Panchromatic
  • L8_9 Cirrus
  • L8_10 TIRS 1
  • L8_11 TIRS 1

Sentinel-2:

  • S2_1 Visible (Coastal/Aerosol)
  • S2_2 Visible (Blue)
  • S2_3 Visible (Green)
  • S2_4 Visible (Red)
  • S2_5 Vegetation Red Edge 1
  • S2_6 Vegetation Red Edge 2
  • S2_7 Vegetation Red Edge 3
  • S2_8 Near-Infrared
  • S2_8A Narrow Near-Infrared
  • S2_9 Water vapour
  • S2_10 SWIR - Cirrus
  • S2_11 SWIR 1
  • S2_12 SWIR 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 πŸ”₯

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)
...

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