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 mapgroup=name[required] β Name of input imagery groupsubgroup=name[required] β Name of input imagery subgroupsignaturefile=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
- 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