other versions
- jessie 6.4.4-1
r.average(1grass) | Grass User's Manual | r.average(1grass) |
NAME¶
r.average - Finds the average of values in a cover map within areas assigned the same category value in a user-specified base map.KEYWORDS¶
raster, statisticsSYNOPSIS¶
r.averageFlags:¶
- -c
-
- --overwrite
-
- --verbose
-
- --quiet
-
Parameters:¶
- base=name
-
- cover=name
-
- output=name
-
DESCRIPTION¶
r.average calculates the average value of data contained in a cover raster map layer for areas assigned the same category value in the user-specified base raster map layer. These averaged values are stored in the category labels file associated with a new output map layer. The values to be averaged are taken from a user-specified cover map. The category values for the cover map will be averaged, unless the -c flag is set. If the -c flag is set, the values that appear in the category labels file for the cover map will be averaged instead (see example below). The output map is actually a reclass of the base map (see r.reclass), and will have exactly the same category values as the base map. The averaged values computed by r.average are stored in the output map's category labels file. The base= map is an existing raster map layer in the user's current mapset search path. For each group of cells assigned the same category value in the base map, the values assigned these cells in the cover map will be averaged. The cover map is an existing raster map layer containing the values (in the form of cell category values or cell category labels) to be averaged within each category of the base map.NOTES¶
The -c option requires that the category label for each category in the cover map be a valid number, integer, or decimal. To be exact, if the first item in the label is numeric, then that value is used. Otherwise, zero is used. The following table covers all possible cases:category value
label used by -c
______________________
.12 .12
.80 KF .8
no data 0
EXAMPLE¶
Assume that farms is a map with 7 farms (i.e., 7 categories), and that soils.Kfactor is a map of soil K factor values with the following category file:SEE ALSO¶
g.region, r.category, r.clump, r.describe, r.mapcalc, r.mfilter, r.mode, r.neighbors, r.reclass, r.statistics, r.statsAUTHOR¶
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory Last changed: $Date: 2008-05-16 21:09:06 +0200 (Fri, 16 May 2008) $ Full index © 2003-2014 GRASS Development TeamGRASS 6.4.4 |