i.oif(1)

✨ i.oif ✨ (GRASS GIS User's Manual, section 1)

okay bestie, buckle up πŸ’– we're doing spectral statistics today and honestly? it's giving genius.

🌸 NAME 🌸

i.oif β€” calculates the Optimum-Index-Factor table for spectral bands πŸ’…


🏷️ KEYWORDS 🏷️

imagery, multispectral, statistics πŸ¦‹


✨ SYNOPSIS ✨

i.oif
i.oif --help
i.oif [-gs] input=name[,name,...]  [output=name]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags:

  • -g β€” print it in shell script style, so it plays nice with your scripts 🫢
  • -s β€” process the bands serially (the default is to run in parallel, jsyk) ⚑
  • --overwrite β€” allow output files to overwrite existing files (yes, it will literally bulldoze them, so like... be aware πŸ‘€)
  • --help β€” print the usage summary
  • --verbose β€” verbose module output
  • --quiet β€” quiet module output
  • --ui β€” force launching the GUI dialog

πŸ“ Parameters:

  • input=name[,name,...] [required] β€” name of the input raster map(s). You gotta give it something, no cap.
  • output=name β€” name for the output file (if it's omitted or you just put -, it outputs to stdout) 🌈

πŸ’– DESCRIPTION πŸ’–

So i.oif calculates the Optimum Index Factor for multi-spectral satellite imagery. Iconic, honestly.

The Optimum Index Factor (OIF) is the thing that figures out which three-band combination maximizes the variability (aka the information) in a multi-spectral scene. The index is a ratio of the total variance (standard deviation) within, and the correlation between, all the possible band combinations. The bands that make up the highest scoring combination from i.oif? Those are the ones you use as the three color channels for d.rgb or r.composite. Main character bands only. πŸ‘‘

The analysis gets saved to a file in the current directory called "i.oif.result".


πŸ“ NOTES πŸ“

Landsat 1-7 TM: colour composites in BGR order, as important Landsat TM band combinations (example: 234 in BGR order means: B=2, G=3, R=4):

  • 123: near natural ("true") colour; however, because of the correlation of the 3 bands in the visible spectrum, this combination contains not much more info than is contained in a single band. lowkey redundant bestie 😭
  • 234: sensitive to green vegetation (portrayed as red), coniferous as distinctly darker red than deciduous forests. Roads and water bodies are clear. πŸ›£οΈ
  • 243: green vegetation is green but coniferous forests aren't as clear as the 234 combination.
  • 247: one of the best for info pertaining to forestry. Good for operation scale mapping of recent harvest areas and road construction. 🌲
  • 345: contains one band from each of the main reflective units (vis, nir, shortwave infra). Green vegetation is green and the shortwave band shows vegetational stress and mortality. Roads are less evident as band 3 is blue.
  • 347: similar to 345 but depicts burned areas better. πŸ”₯
  • 354: appears more like a colour infrared photo.
  • 374: similar to 354.
  • 457: shows soil texture classes (clay, loam, sandy). 🏜️

By default the module will calculate standard deviations for all bands in parallel. To run serially, use the -s flag. If the WORKERS environment variable is set, the number of concurrent processes will be limited to that number of jobs. Slay, multitasking. ✨


🌈 EXAMPLE 🌈

North Carolina sample dataset:

g.region raster=lsat7_2002_10 -p
i.oif input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70

πŸ“š REFERENCES πŸ“š

Jensen, 1996. Introductory digital image processing. Prentice Hall, p.98. ISBN 0-13-205840-5


πŸ‘€ SEE ALSO πŸ‘€

d.rgb, r.composite, r.covar, r.univar


πŸ’œ AUTHORS πŸ’œ

  • Markus Neteler, ITC-Irst, Trento, Italy
  • Updated to GRASS 5.7 by Michael Barton, Arizona State University

πŸ” SOURCE CODE πŸ”

Available at: i.oif source code (history)

Accessed: Saturday Jan 17 05:41:52 2026

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


and that's the whole page, bestie!! no notes, ate and left no crumbs 🫢

k bye, this was GRASS 8.4.2, Β© 2003-2025 GRASS Development Team, straight out of the GRASS GIS 8.4.2 Reference Manual. mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from