i.gensig(1)

πŸ’– NAME πŸ’–

okay so bestie, meet i.gensig β€” she generates statistics for i.maxlik from a raster map. that's the whole job, and she does it flawlessly. πŸ’…


πŸŽ€ 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
  • --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 🌈

so i.gensig is the non-interactive way to make input for i.maxlik. it's literally the first pass of the GRASS two-pass classification process (the alternative to i.cluster or g.gui.iclass, iykyk). πŸ¦‹

here's the tea: she reads a raster map layer called the training map, which already has some pixels or regions classified. then i.gensig extracts spectral signatures from an image based on the classification of the pixels in that training map, and makes those signatures available to i.maxlik. iconic behavior, no cap. ✨

after that, you go ahead and run the GRASS program i.maxlik to actually create the final classified map. the main character moment happens there. πŸ‘‘

this module generates signature files of type "sig". use module i.signatures to manage generated signature files. πŸ’…

all raster maps used to generate a signature file can have a 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). fr fr. 🌸


πŸ’… OPTIONS πŸ’…

🌺 Parameters

  • trainingmap=name β€” ground truth training map

this map must be prepared by the user in advance using vector or raster digitizer. and bestie, of course other methods could be devised by the user for creating this training map β€” i.gensig makes no assumption about the origin of this map layer. she simply creates signatures for the classes defined in the training map for the image to be classified (the image is specified in other options β€” see below πŸ‘‡). 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 allows the user to select a subset of all the band files that form an image. lowkey handy. 🫢

  • 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). resultant singature file can be used with any other imagery group as long as semantic labels match. πŸ’–


πŸ“ 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)

Accessed: Saturday Jan 17 05:41:41 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!! πŸ₯³ this one's from GRASS 8.4.2, the reference manual, dated all the way back to Saturday Jan 17 05:41:41 2026 β€” and yeah, Β© 2003-2025 GRASS Development Team owns all of it. go forth and classify, you gorgeous genius. πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from