.TH r.stats.zonal 1grass "" "GRASS 7.6.0" "Grass User's Manual" .SH NAME \fI\fBr.stats.zonal\fR\fR \- Calculates category or object oriented statistics (accumulator\-based statistics). .SH KEYWORDS raster, statistics, zonal statistics .SH SYNOPSIS \fBr.stats.zonal\fR .br \fBr.stats.zonal \-\-help\fR .br \fBr.stats.zonal\fR [\-\fBcr\fR] \fBbase\fR=\fIname\fR \fBcover\fR=\fIname\fR \fBmethod\fR=\fIstring\fR \fBoutput\fR=\fIname\fR [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-c\fR" 4m .br Cover values extracted from the category labels of the cover map .IP "\fB\-r\fR" 4m .br Create reclass map with statistics as category labels .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBbase\fR=\fIname\fR \fB[required]\fR" 4m .br Name of base raster map .IP "\fBcover\fR=\fIname\fR \fB[required]\fR" 4m .br Name of cover raster map .IP "\fBmethod\fR=\fIstring\fR \fB[required]\fR" 4m .br Method of object\-based statistic .br Options: \fIcount, sum, min, max, range, average, avedev, variance, stddev, skewness, kurtosis, variance2, stddev2, skewness2, kurtosis2\fR .br \fBcount\fR: Count of values in specified objects .br \fBsum\fR: Sum of values in specified objects .br \fBmin\fR: Minimum of values in specified objects .br \fBmax\fR: Maximum of values in specified objects .br \fBrange\fR: Range of values (max \- min) in specified objects .br \fBaverage\fR: Average of values in specified objects .br \fBavedev\fR: Average deviation of values in specified objects .br \fBvariance\fR: Variance of values in specified objects .br \fBstddev\fR: Standard deviation of values in specified objects .br \fBskewness\fR: Skewness of values in specified objects .br \fBkurtosis\fR: Kurtosis of values in specified objects .br \fBvariance2\fR: (2\-pass) Variance of values in specified objects .br \fBstddev2\fR: (2\-pass) Standard deviation of values in specified objects .br \fBskewness2\fR: (2\-pass) Skewness of values in specified objects .br \fBkurtosis2\fR: (2\-pass) Kurtosis of values in specified objects .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Resultant raster map .SH DESCRIPTION \fIr.stats.zonal\fR is a tool to analyse exploratory statistics of a floating\-point \(dqcover layer\(dq according to how it intersects with objects in a \(dqbase layer\(dq. A variety of standard statistical measures are possible (called \(dqzonal statistics\(dq in some GIS). .SH NOTES \fIr.stats.zonal\fR is intended to be a partial replacement for \fIr.statistics\fR, with support for floating\-point cover maps at the expense of not supporting quantiles. For this, see \fIr.stats.quantile\fR. .SH EXAMPLE In this example, the raster polygon map zipcodes in the North Carolina sample dataset is used to calculate zonal raster statistics using the elevation raster map: .br .nf \fC g.region raster=zipcodes \-p # pixel count in zipcode areas r.stats.zonal base=zipcodes cover=elevation method=count output=zipcodes_elev_count r.colors zipcodes_elev_count color=gyr \-g # average elevation in zipcode areas r.stats.zonal base=zipcodes cover=elevation method=average output=zipcodes_elev_avg r.colors zipcodes_elev_avg color=elevation \-g \fR .fi .SH SEE ALSO \fI r.quantile, r.stats.quantile, r.statistics \fR .SH AUTHOR Glynn Clements .PP \fILast changed: $Date: 2018\-04\-25 14:03:54 +0200 (Wed, 25 Apr 2018) $\fR .SH SOURCE CODE .PP Available at: r.stats.zonal source code (history) .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual