i.spectral(1grass)

πŸ’– i.spectral β€” the manual page, bestie edition πŸ’–

okay so we're doing the i.spectral(1grass) page from the GRASS User's Manual and honestly? it's giving "I just want to know what color the ground is at this exact spot." Let's get into it ✨


✨ NAME ✨

i.spectral β€” displays spectral response at user specified locations in group or images. πŸŽ€

🌈 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 actual sampling coordinates in the legend instead of just numbering them (this one only works if you also passed -g, iykyk)
  • -g β€” use gnuplot for display πŸ‘‘
  • -t β€” output to a text file
  • --overwrite β€” allow output files to overwrite existing files (yes, it will eat your old file, so be careful πŸ’€)
  • --help β€” print usage summary
  • --verbose β€” verbose module output (it tells you everything, main character energy)
  • --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,...] [required] β€” coordinates. You literally cannot skip this one bestie, it's mandatory πŸ’…
  • output=name β€” name for output image is valid for -g (or text file for -t flag)
  • format=string β€” graphics format for output file (valid for -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 job. it looks at your pixels wherever you point it and shows you the spectral vibes 🫢

πŸŽ€ NOTES πŸŽ€

This script requires the launch of one of the supported monitors (cairo, png, ps) or gnuplot to be installed. no monitor, no plot, no slay 😭


🌟 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. three totally different vibes, one plot πŸ”₯

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. so it's picky on purpose, periodt ⭐


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

Latest change: Friday Mar 07 23:20:43 2025 in commit: b94776ae711b613e98849395a1b4635336af9479

Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual

that's the whole manual bestie, no notes skipped, no options dropped, we ate and left no crumbs πŸ“

and that's a wrap on i.spectral(1grass) from the GRASS 8.5.0 Reference Manual β€” go plot something iconic, ily, bye πŸ§šπŸ’œ

πŸ“¦ where this page comes from