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

NAME

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

KEYWORDS

9       raster, statistics
10

SYNOPSIS

12       r.statistics
13       r.statistics help
14       r.statistics   [-c]   base=name  cover=name  method=string  output=name
15       [--overwrite]  [--verbose]  [--quiet]
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       --verbose
25           Verbose module output
26
27       --quiet
28           Quiet module output
29
30   Parameters:
31       base=name
32           Name of base raster map
33
34       cover=name
35           Name of cover raster map
36
37       method=string
38           Method of object-based statistic
39           Options:     diversity,distribution,average,mode,median,avedev,std‐
40           dev,variance,skewness,kurtosis,min,max,sum
41
42       output=name
43           Resultant raster map (not used with 'distribution')
44

DESCRIPTION

46       r.statistics  is  a  tool to analyse exploratory statistics of a "cover
47       layer" according to how it intersects with objects in a  "base  layer".
48       A  variety of standard statistical measures are possible (called "zonal
49       statistics" in some GIS).  All cells in the base layer  are  considered
50       one  object  for  the  analysis.  For some applications, one will first
51       want to prepare the input data so that all  areas  of  contiguous  cell
52       category values in the base layer are uniquely identified, which can be
53       done with r.clump.
54       The available methods are the following (english - german):
55
56                     distribution - Verteilung in Prozent
57
58                     average - Durchschnitt
59
60                     mode - Modalwert
61
62                     median - Median
63
64                     average deviation - Durchschnittliche Abweichung
65
66                     standard deviation - Standardabweichung
67
68                     variance - Varianz
69
70                     skewness - Schiefe der Verteilung
71
72                     kurtosis - Relative Abflachung (-) oder Zuspitzung (+)
73
74                     minimum - Minimum
75
76                     maximum - Maximum
77
78                     sum - Summe
79       The calculations will be performed on each area of data  of  the  cover
80       layers  which  fall  within each unique value, or category, of the base
81       layer.
82
83       Setting the -c flag the category lables of the  covering  raster  layer
84       will  be  used.  This is nice to avoid the GRASS limitation to interger
85       in raster maps because using category values floating point numbers can
86       be stored.
87
88       All  calculations  except  "distribution"  create an output layer.  The
89       output layer is a reclassified version of the base layer with identical
90       category values, but modified category labels - the results of the cal‐
91       culations are stored in the category labels of the output layer.
92
93       For distributions, the output is printed to the  user  interface  (std‐
94       out).   If  an  output file name was specified, it will be ignored. The
95       result will be a text table with three columns.  In  the  first  column
96       are the category values of the base layer (a), in the second column the
97       associated value of the cover layers (b), and in the third  column  the
98       percentage of area in that base layer category (a) that falls into that
99       row's value in the cover layer(b). Example:
100       1   124  23
101       1   201  47
102       1   273  30
103       2   101  5
104       2   152  16
105       2   167  60
106       2   187  19
107            .
108            .
109            .
110        So for the first line in the output above, we  see  that  23%  of  the
111       cells  of  the  base  layer category 1 have a value of 124 in the cover
112       layer.  To transfer the values stored as category labels into cell val‐
113       ues, r.mapcalc can be used ('@' operator).
114

EXAMPLES

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

SEE ALSO

125        r.average, r.clump, r.mode, r.median, r.mapcalc, r.neighbors, r.univar
126       r.category
127

AUTHOR

129       Martin Schroeder, Geographisches Institut Heidelberg, Germany
130
131       Last changed: $Date: 2008-02-19 21:18:46 +0100 (Tue, 19 Feb 2008) $
132
133       Full index
134
135       © 2003-2008 GRASS Development Team
136
137
138
139GRASS 6.3.0                                                    r.statistics(1)
Impressum