~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to raster/r.average/description.html

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
 
4
 
<em>r.average</em> calculates the average value of data
5
 
contained in a <em>cover</em> raster map layer for areas
6
 
assigned the same category value in the user-specified
7
 
<em>base</em> raster map layer.  These averaged values are
8
 
stored in the category labels file associated with a new
9
 
<em>output</em> map layer.
10
 
 
11
 
The values to be averaged are taken from a user-specified
12
 
<em>cover</em> map.  The <em>category values</em> for the
13
 
<em>cover</em> map will be averaged, unless the <b>-c</b>
14
 
flag is set.  If the <b>-c</b> flag is set, the values that
15
 
appear in the <em>category labels</em> file for the
16
 
<em>cover</em> map will be averaged instead (see example
17
 
below).
18
 
 
19
 
<p>
20
 
 
21
 
The <em>output</em> map is actually a <em>reclass</em> of the <em>base</em>
22
 
map (see <em> <a href="r.reclass.html">r.reclass</a></em>), and will have
23
 
exactly the same <em>category values</em> as the <em>base</em> map.  The
24
 
averaged values computed by <em>r.average</em> are stored in the
25
 
<em>output</em> map's <em>category labels</em> file.
26
 
 
27
 
The <b>base=</b> map is an existing raster map layer in the user's current
28
 
mapset search path.  For each group of cells assigned the same category
29
 
value in the <em>base</em> map, the values assigned these cells in the
30
 
<em>cover</em> map will be averaged.
31
 
 
32
 
The <em>cover</em> map is an existing raster map layer containing the values
33
 
(in the form of cell category values or cell category labels) to be averaged
34
 
within each category of the <em>base</em> map.
35
 
 
36
 
<h2>NOTES</h2>
37
 
 
38
 
The <b>-c</b> option requires that the category label for
39
 
each category in the <em>cover</em> map be a valid number,
40
 
integer, or decimal.  To be exact, if the first item in the
41
 
label is numeric, then that value is used. Otherwise, zero
42
 
is used.  The following table covers all possible cases:
43
 
 
44
 
<p>
45
 
<pre>
46
 
         category    value 
47
 
         label       used by -c 
48
 
         ______________________
49
 
          .12           .12 
50
 
          .80 KF        .8 
51
 
          no data       0 
52
 
</pre>
53
 
<p>
54
 
 
55
 
(This flag is very similar to the @ operator in 
56
 
<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
57
 
and the user is encouraged to read the manual entry for 
58
 
<em><a href="r.mapcalc.html">r.mapcalc</a></em>
59
 
to see how it works there.) 
60
 
 
61
 
<p>
62
 
 
63
 
The user should use the results of <em>r.average</em> with
64
 
care.  Since this utility assigns a value to each cell
65
 
which is based on global information (i.e., information at
66
 
spatial locations other than just the location of the cell
67
 
itself), the resultant map layer is only valid if the
68
 
geographic region and mask settings are the same as they
69
 
were at the time that the result map was created.
70
 
 
71
 
<p>
72
 
 
73
 
Results are affected by the current region settings and mask. 
74
 
 
75
 
<h2>EXAMPLE</h2>
76
 
 
77
 
Assume that 
78
 
<em>farms</em>
79
 
is a map with 7 farms (i.e., 7 categories), and that 
80
 
<em>soils.Kfactor</em>
81
 
is a map of soil K factor values with the following category file: 
82
 
 
83
 
<pre>
84
 
        cat     cat 
85
 
        value   label 
86
 
        0       no soil data 
87
 
        1       .10 
88
 
        2       .15 
89
 
        3       .17 
90
 
        4       .20 
91
 
        5       .24 
92
 
        6       .28 
93
 
        7       .32 
94
 
        8       .37 
95
 
        9       .43 
96
 
</pre>
97
 
 
98
 
Then 
99
 
 
100
 
<p>
101
 
<dl>
102
 
<dd>
103
 
<b>r.average -c base=</b><em>farms</em> 
104
 
<b>cover=</b><em>soils.Kfactor</em> <b>output=</b><em>K.by.farm</em> 
105
 
</dl>
106
 
 
107
 
will compute the average soil K factor for each farm, and store the result
108
 
in the output map <em>K.by.farm</em>, which will be a reclass of
109
 
<em>farms</em> with category labels as follows (example only):
110
 
 
111
 
<pre>
112
 
        cat     cat 
113
 
        value   label 
114
 
        1       .1023 
115
 
        2       .1532 
116
 
        3       .172 
117
 
        4       .3872 
118
 
        5       .003 
119
 
        6       .28 
120
 
        7       .2345 
121
 
</pre>
122
 
 
123
 
 
124
 
 
125
 
<h2>SEE ALSO</h2>
126
 
 
127
 
<em><a href="g.region.html">g.region</a></em>,
128
 
<em><a href="r.category.html">r.category</a></em>,
129
 
<em><a href="r.clump.html">r.clump</a></em>,
130
 
<em><a href="r.describe.html">r.describe</a></em>,
131
 
<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
132
 
<em><a href="r.mfilter.html">r.mfilter</a></em>,
133
 
<em><a href="r.mode.html">r.mode</a></em>,
134
 
<em><a href="r.neighbors.html">r.neighbors</a></em>,
135
 
<em><a href="r.reclass.html">r.reclass</a></em>,
136
 
<em><a href="r.statistics.html">r.statistics</a></em>,
137
 
<em><a href="r.stats.html">r.stats</a></em>
138
 
 
139
 
<h2>AUTHOR</h2>
140
 
 
141
 
Michael Shapiro, 
142
 
U.S. Army Construction Engineering Research Laboratory
143
 
 
144
 
<p><i>Last changed: $Date: 2008-05-16 21:09:06 +0200 (Fri, 16 May 2008) $</i>