i.gensig(1grass)

πŸ’– NAME πŸ’–

i.gensig β€” bestie, this is the GRASS User's Manual page for it β€” it generates statistics for i.maxlik from raster map. That's the whole job. It's giving signature-factory energy ✨


πŸŽ€ KEYWORDS πŸŽ€

imagery, classification, supervised classification, Maximum Likelihood Classification, MLC, signatures


🌸 SYNOPSIS 🌸

i.gensig
i.gensig --help
i.gensig trainingmap=name group=name subgroup=name signaturefile=name
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

✨ Flags ✨

  • --overwrite β€” Allow output files to overwrite existing files. Yes bestie it will literally overwrite them 😭
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output
  • --quiet β€” Quiet module output
  • --ui β€” Force launching GUI dialog

πŸ¦‹ Parameters πŸ¦‹

  • trainingmap=name [required] β€” Ground truth training map
  • group=name [required] β€” Name of input imagery group
  • subgroup=name [required] β€” Name of input imagery subgroup
  • signaturefile=name [required] β€” Name for output file containing result signatures

πŸ‘‘ DESCRIPTION πŸ‘‘

Okay so, i.gensig is the non-interactive way to make input for i.maxlik. Think of it as the first pass in the GRASS two-pass classification process β€” you'd use it instead of i.cluster or g.gui.iclass, no cap. It reads a raster map layer called the training map, which already has some of the pixels or regions classified. Then i.gensig extracts spectral signatures from an image based on how the pixels in the training map are classified, and makes those signatures available to i.maxlik. Iconic behavior, honestly πŸ’…

Then you (the user) go run the GRASS program i.maxlik to actually create the final classified map. That's the second pass, periodt.

This module generates signature files of type "sig". Use module i.signatures to manage those generated signature files 🫢

All raster maps used to generate the signature file can have semantic label set. Use r.support to set semantic labels of each member of the imagery group. Signatures generated for one scene are suitable for classification of other scenes as long as they consist of same raster bands (semantic labels match). Slay 🌈


πŸ’… OPTIONS πŸ’…

πŸ’œ Parameters πŸ’œ

trainingmap=name

ground truth training map

Bestie, this map has to be prepared by the user in advance β€” using a vector or raster digitizer. Obviously you could devise other methods to create this training map; i.gensig makes no assumption about the origin of this map layer. It literally just creates signatures for the classes defined in the training map for the image to be classified (that image gets specified in other options β€” see below, iykyk). The wxGUI vector digitizer can be used for interactively creating the training map ✨

group=name

imagery group

This is the name of the group that contains the band files which comprise the image to be analyzed. The i.group command is used to construct groups of raster layers which comprise an image.

subgroup=name

subgroup containing image files

This names the subgroup within the group that selects a subset of the bands to be analyzed. The i.group command is also used to prepare this subgroup. The subgroup mechanism lets the user select a subset of all the band files that form an image 🌸

signaturefile=name

resultant signature file

This is the resultant signature file (containing the means and covariance matrices) for each class in the training map that is associated with the band files in the subgroup select (see above). The resultant signature file can be used with any other imagery group as long as semantic labels match. Obsessed πŸ’–


🧚 NOTES 🧚

The structure of the SIG files generated by i.gensig is as follows (ASCII file, used internally by i.maxlik):

Note: the line numbers are not present in the file but have been added here for explanation only πŸ‘€

SIG file "lsat7_2000_gensig":

 1 1
 2 #
 3 Semantic_label1
 4 #water
 5 4186
 6 67.9508 48.7346 37.8915 15.3129 13.8473 12.0855
 7 1.74334
 8 0.439504 2.07267
 9 0.662523 1.63501 4.21189
10 0.530339 2.40757 5.52857 22.433
11 0.561184 2.30762 5.18846 20.5364 20.4926
12 0.393218 1.2184 2.63628 9.61528 9.36025 5.85314
  • Line 1: version number (currently always 1)
  • Line 2: text label
  • Line 3: Space separated list of semantic labels
  • Line 4: text label of class
  • Line 5: number of points in class
  • Line 6: mean values per band of the class
  • Line 7-12: (semi)-matrix of band-band covariance

πŸ”₯ SEE ALSO πŸ”₯

r.support, g.gui.iclass, i.group, i.cca, i.maxlik, i.smap, r.info, r.univar, wxGUI vector digitizer


🌟 AUTHORS 🌟

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

Semantic label support: Maris Nartiss, University of Latvia


πŸ’€ SOURCE CODE πŸ’€

Available at: i.gensig source code (history)

Latest change: Friday Apr 17 01:04:26 2026 in commit: 32a143358df26b2e518b03c7e0d79541e8d1e5b1

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


And that's the whole page bestie!! πŸ’–βœ¨πŸ¦‹ This was the GRASS 8.5.0 Reference Manual β€” Β© 2003-2026 GRASS Development Team β€” and we were all up in here reading i.gensig(1grass) under GRASS 8.5.0. Go classify something gorgeous, mwah πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from