1r.stats.zonal(1) Grass User's Manual r.stats.zonal(1)
2
3
4
6 r.stats.zonal - Calculates category or object oriented statistics
7 (accumulator-based statistics).
8
10 raster, statistics, zonal statistics
11
13 r.stats.zonal
14 r.stats.zonal --help
15 r.stats.zonal [-cr] base=name cover=name method=string output=name
16 [--overwrite] [--help] [--verbose] [--quiet] [--ui]
17
18 Flags:
19 -c
20 Cover values extracted from the category labels of the cover map
21
22 -r
23 Create reclass map with statistics as category labels
24
25 --overwrite
26 Allow output files to overwrite existing files
27
28 --help
29 Print usage summary
30
31 --verbose
32 Verbose module output
33
34 --quiet
35 Quiet module output
36
37 --ui
38 Force launching GUI dialog
39
40 Parameters:
41 base=name [required]
42 Name of base raster map
43
44 cover=name [required]
45 Name of cover raster map
46
47 method=string [required]
48 Method of object-based statistic
49 Options: count, sum, min, max, range, average, avedev, variance,
50 stddev, skewness, kurtosis, variance2, stddev2, skewness2, kurto‐
51 sis2
52 count: Count of values in specified objects
53 sum: Sum of values in specified objects
54 min: Minimum of values in specified objects
55 max: Maximum of values in specified objects
56 range: Range of values (max - min) in specified objects
57 average: Average of values in specified objects
58 avedev: Average deviation of values in specified objects
59 variance: Variance of values in specified objects
60 stddev: Standard deviation of values in specified objects
61 skewness: Skewness of values in specified objects
62 kurtosis: Kurtosis of values in specified objects
63 variance2: (2-pass) Variance of values in specified objects
64 stddev2: (2-pass) Standard deviation of values in specified objects
65 skewness2: (2-pass) Skewness of values in specified objects
66 kurtosis2: (2-pass) Kurtosis of values in specified objects
67
68 output=name [required]
69 Resultant raster map
70
72 r.stats.zonal is a tool to analyse exploratory statistics of a float‐
73 ing-point "cover layer" according to how it intersects with objects in
74 a "base layer". A variety of standard statistical measures are possible
75 (called "zonal statistics" in some GIS).
76
78 r.stats.zonal is intended to be a partial replacement for r.statistics,
79 with support for floating-point cover maps at the expense of not sup‐
80 porting quantiles. For this, see r.stats.quantile.
81
83 In this example, the raster polygon map zipcodes in the North Carolina
84 sample dataset is used to calculate zonal raster statistics using the
85 elevation raster map:
86 g.region raster=zipcodes -p
87 # pixel count in zipcode areas
88 r.stats.zonal base=zipcodes cover=elevation method=count output=zipcodes_elev_count
89 r.colors zipcodes_elev_count color=gyr -g
90 # average elevation in zipcode areas
91 r.stats.zonal base=zipcodes cover=elevation method=average output=zipcodes_elev_avg
92 r.colors zipcodes_elev_avg color=elevation -g
93
95 r.quantile, r.stats.quantile, r.statistics
96
98 Glynn Clements
99
100 Last changed: $Date: 2018-04-25 14:03:54 +0200 (Wed, 25 Apr 2018) $
101
103 Available at: r.stats.zonal source code (history)
104
105 Main index | Raster index | Topics index | Keywords index | Graphical
106 index | Full index
107
108 © 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
109
110
111
112GRASS 7.6.0 r.stats.zonal(1)