![]() |
![]()
| ![]() |
![]()
NAMEr.statistics - Calculates category or object oriented statistics. KEYWORDSraster, statistics, zonal statistics SYNOPSISr.statistics
Flags:Parameters:
DESCRIPTIONr.statistics is a tool to analyse exploratory statistics of
a categorical "cover layer" according to how it intersects with
objects in a "base layer". A variety of standard statistical
measures are possible (called "zonal statistics" in some GIS). All
cells in the base layer are considered one object for the analysis. For some
applications, one will first want to prepare the input data so that all
areas of contiguous cell category values in the base layer are uniquely
identified, which can be done with r.clump.
Setting the -c flag the category labels of the covering raster layer will be used. This is nice to avoid the GRASS limitation to integer in raster maps because using category values floating point numbers can be stored. All calculations create an output layer. The output layer is a reclassified version of the base layer with identical category values, but modified category labels - the results of the calculations are stored in the category labels of the output layer. NOTESFor floating-point cover map support, see the alternative r.stats.zonal. For quantile calculations with support for floating-point cover maps, see the alternative r.stats.quantile. EXAMPLESCalculation of average elevation of each field in the Spearfish
region:
r.statistics base=fields cover=elevation.dem out=elevstats method=average r.category elevstats r.mapcalc "fieldelev = @elevstats" r.univar fieldelev SEE ALSOr.category, r.clump, r.mode, r.mapcalc, r.neighbors, r.stats.quantile, r.stats.zonal, r.univar AUTHORMartin Schroeder, Geographisches Institut Heidelberg, Germany SOURCE CODEAvailable at: r.statistics source code (history) Latest change: Monday Jan 30 09:36:46 2023 in commit: 0fb05e493f4ef73f4a721b019bffc357be2ec8d6 Main index | Raster index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|