i.segment.stats calculates statistics for areas in a raster map. Areas are defined by adjacent pixels with the same value. Such areas can be the output of i.segment or r.clump.
Available statistics are those related to the shape and size of the areas (see the r.object.geometry addon man page for more information on the statistics) and aggregated statistics of pixel values of other raster maps (see v.univar for details).
The user can chose between output in the form of a vector map of the areas with the statistics in the attribute table (vectormap) and/or in the form of a CSV text file (csvfile).
The module respects the current region settings. The -r flag allows to force the module to adjust the region to the input raster map before calculating the statistics.
This module is a simple front-end to v.univar and the r.object.geometry add-on. It is the user's responsibility to install the latter using g.extension. If other statistics are desired, these should probably be implemented in those (or other) modules which can then be called from this module.
Problems can arise in the calculation of some form statistics for certain segment forms. If errors arise, the user might want to try to run r.clump on the input raster file before running i.segment.stats.
When treating files with a large number objects, creating the vector map can be very time-consuming. In that case, it might be easier to only work with the csvfile output.
The processing of several raster input files for which to calculate per-segment statistics can be parallelized by setting the processes parameter to the number of desired parallel processes, with at most one process per raster to be treated.
i.group group=landsat_pan input=lsat7_2002_80 g.region rast=lsat7_2002_80 -p i.segment group=landsat_pan output=ls_pan_seg01 threshold=0.1 memory=4000 minsize=50 i.segment.stats map=ls_pan_seg01 csvfile=segstats.csv vectormap=ls_pan_seg01 \ rasters=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70 \ processes=4
r.object.geometry (Addon) v.class.mlR (Addon)
Last changed: $Date: 2017-11-02 14:27:22 +0100 (Thu, 02 Nov 2017) $
Available at: i.segment.stats source code (history)
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
© 2003-2018 GRASS Development Team, GRASS GIS 7.4.1svn Reference Manual