r.stats.zonal(1grass) | Grass User's Manual | r.stats.zonal(1grass) |
r.stats.zonal - Calculates category or object oriented statistics (accumulator-based statistics).
raster, statistics, zonal statistics
r.stats.zonal
r.stats.zonal --help
r.stats.zonal [-cr] base=name
cover=name method=string
output=name [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
r.stats.zonal is a tool to analyse exploratory statistics of a floating-point "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).
r.stats.zonal is intended to be a partial replacement for r.statistics, with support for floating-point cover maps at the expense of not supporting quantiles. For this, see r.stats.quantile.
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:
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
r.quantile, r.stats.quantile, r.statistics
Glynn Clements
Last changed: $Date: 2018-04-25 14:03:54 +0200 (Wed, 25 Apr 2018) $
Available at: r.stats.zonal source code (history)
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
GRASS 7.6.0 |