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β usegnuplotfor 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 groupsubgroup=nameβ name of input imagery subgroupraster=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-tflag)format=stringβ graphics format for output file (valid for-gflag)- Options:
png,eps,svg - Default:
png
- Options:
π 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
- 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