i.spectral(1)

✨ i.spectral ✨

okay bestie, welcome to GRASS GIS User's Manual πŸ’– this is the page for i.spectral, and no cap it's a good one.


🌸 NAME 🌸

i.spectral β€” displays spectral response at user specified locations in group or images. literally what it says on the tin, and it ate πŸ’…


πŸŽ€ KEYWORDS πŸŽ€

imagery, querying, raster, multispectral


πŸ¦‹ SYNOPSIS πŸ¦‹

i.spectral
i.spectral --help
i.spectral [-cgt]  [group=name]   [subgroup=name]
[raster=name[,name,...]]  coordinates=east,north[,east,north,...]
[output=name]   [format=string]   [--overwrite]  [--help]  [--verbose]
[--quiet]  [--ui]

✨ FLAGS ✨

  • -c β€” show the sampling coordinates instead of numbering them in the legend (only valid when you're also using the -g flag, iykyk)
  • -g β€” use gnuplot for display 🫢
  • -t β€” output to text file
  • --overwrite β€” allow output files to overwrite existing files (yes, it will genuinely just bulldoze them, so be careful πŸ‘€)
  • --help β€” print usage summary
  • --verbose β€” verbose module output
  • --quiet β€” quiet module output
  • --ui β€” force launching GUI dialog

🌈 PARAMETERS 🌈

  • group=name β€” name of input imagery group
  • subgroup=name β€” name of input imagery subgroup
  • raster=name[,name,...] β€” name of input raster map(s)
  • coordinates=east,north[,east,north,...] β€” coordinates. required, bestie, you cannot skip this one πŸ™ˆ
  • output=name β€” name for output image, valid for -g (or text file when you're using the -t flag)
  • format=string β€” graphics format for the output file (valid for the -g flag)
    • Options: png, eps, svg
    • Default: png

πŸ’œ DESCRIPTION πŸ’œ

i.spectral displays spectral response at user specified locations in images. that's it, that's the whole vibe ⭐


πŸ”₯ NOTES πŸ”₯

this script requires the launch of one of the supported monitors (cairo, png, ps) or gnuplot to be installed. no monitor, no plot, periodt πŸ’€

🌸 EXAMPLE 🌸

Analysis of LANDSAT TM7 channels (North Carolina dataset):

g.region raster=lsat7_2002_10 -p
i.spectral -g raster=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70 \
           coordinates=636069,215440,637958,223393,633277,223605

Spectral plot of 3 different land cover types: (1) water, (2) green vegetation, and (3) highway πŸ‘‘

North Carolina sample dataset:

g.region raster=lsat7_2002_10 -p
LIST=`g.list type=raster pattern="lsat7_2002_[1-5,7]0" separator=","`
d.mon start=cairo output=plot.png
i.spectral raster=$LIST coordinates=637502.25,221744.25
d.mon stop=cairo

This will search all LANDSAT map for 2002 but select only the B, G, R, NIR, and MIR channels. main character energy fr fr πŸŽ€


🫢 SEE ALSO 🫢

d.where, r.what, Cairo driver, PNG driver, PS driver (Postscript)


πŸ‘‘ AUTHORS πŸ‘‘

  • Markus Neteler
  • Francesco Pirotti

πŸ’– SOURCE CODE πŸ’–

Available at: i.spectral 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 πŸ¦‹ GRASS 8.4.2, i.spectral(1) β€” go plot something iconic, ily, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from