1r.statistics(1)             GRASS GIS User's Manual            r.statistics(1)
2
3
4

NAME

6       r.statistics  - Calculates category or object oriented statistics.
7

KEYWORDS

9       raster, statistics, zonal statistics
10

SYNOPSIS

12       r.statistics
13       r.statistics --help
14       r.statistics   [-c]   base=name  cover=name  method=string  output=name
15       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
16
17   Flags:
18       -c
19           Cover values extracted from the category labels of the cover map
20
21       --overwrite
22           Allow output files to overwrite existing files
23
24       --help
25           Print usage summary
26
27       --verbose
28           Verbose module output
29
30       --quiet
31           Quiet module output
32
33       --ui
34           Force launching GUI dialog
35
36   Parameters:
37       base=name [required]
38           Name of base raster map
39
40       cover=name [required]
41           Name of cover raster map
42
43       method=string [required]
44           Method of object-based statistic
45           Options: diversity, average, mode, median,  avedev,  stddev,  vari‐
46           ance, skewness, kurtosis, min, max, sum
47           diversity: Diversity of values in specified objects in %%
48           average: Average of values in specified objects
49           mode: Mode of values in specified objects
50           median: Median of values in specified objects
51           avedev: Average deviation of values in specified objects
52           stddev: Standard deviation of values in specified objects
53           variance: Variance of values in specified objects
54           skewness: Skewnes of values in specified objects
55           kurtosis: Kurtosis of values in specified objects
56           min: Minimum of values in specified objects
57           max: Maximum of values in specified objects
58           sum: Sum of values in specified objects
59
60       output=name [required]
61           Resultant raster map
62

DESCRIPTION

64       r.statistics is a tool to analyse exploratory statistics of a categori‐
65       cal "cover layer" according to how it  intersects  with  objects  in  a
66       "base  layer".  A variety of standard statistical measures are possible
67       (called "zonal statistics" in some GIS).  All cells in the  base  layer
68       are considered one object for the analysis.  For some applications, one
69       will first want to prepare the input data so that all areas of contigu‐
70       ous  cell  category  values  in the base layer are uniquely identified,
71       which can be done with r.clump.
72       The available methods are the following:
73
74           •   average deviation
75
76           •   average
77
78           •   diversity
79
80           •   kurtosis
81
82           •   maximum
83
84           •   median
85
86           •   minimum
87
88           •   mode
89
90           •   skewness
91
92           •   standard deviation
93
94           •   sum
95
96           •   variance
97       The calculations will be performed on each area of data  of  the  cover
98       layers  which  fall  within each unique value, or category, of the base
99       layer.
100
101       Setting the -c flag the category labels of the  covering  raster  layer
102       will be used.  This is nice to avoid the GRASS limitation to integer in
103       raster maps because using category values floating point numbers can be
104       stored.
105
106       All calculations create an output layer.  The output layer is a reclas‐
107       sified version of the base layer with identical  category  values,  but
108       modified  category  labels - the results of the calculations are stored
109       in the category labels of the output layer.
110

NOTES

112       For   floating-point   cover   map   support,   see   the   alternative
113       r.stats.zonal.   For  quantile  calculations  with  support  for float‐
114       ing-point cover maps, see the alternative r.stats.quantile.
115

EXAMPLES

117       Calculation of average elevation of each field in the Spearfish region:
118       r.statistics base=fields cover=elevation.dem out=elevstats method=average
119       r.category elevstats
120       r.mapcalc "fieldelev = @elevstats"
121       r.univar fieldelev
122

SEE ALSO

124        r.category, r.clump, r.mode, r.mapcalc, r.neighbors, r.stats.quantile,
125       r.stats.zonal, r.univar
126

AUTHOR

128       Martin Schroeder, Geographisches Institut Heidelberg, Germany
129

SOURCE CODE

131       Available at: r.statistics source code (history)
132
133       Accessed: Saturday Jan 21 21:15:12 2023
134
135       Main  index  | Raster index | Topics index | Keywords index | Graphical
136       index | Full index
137
138       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
139
140
141
142GRASS 8.2.1                                                    r.statistics(1)
Impressum