3
<em>r.mode</em> calculates the most frequently occurring value (i. e., mode)
4
of data contained in a <em>cover</em> raster map layer for areas assigned
5
the same category value in the user-specified <em>base</em> raster map
6
layer. These modes are stored in the new <em>output</em> map layer.
8
<p>The <em>output</em> map is actually a <em>reclass</em> of the <em>base</em>
11
<p>The <b>base</b> parameter defines an existing raster map layer in the user's
12
current mapset search path. For each group of cells assigned the same
13
category value in the <em>base</em> map, the mode of the values assigned
14
these cells in the <em>cover</em> map will be computed.
16
<p>The <b>cover</b> parameter defines an existing raster map layer containing
17
the values to be used to compute the mode within each category of the
22
The user should use the results of <em>r.mode</em> with care.
23
Since this utility assigns a value to each
24
cell which is based on global information (i.e., information at spatial
25
locations other than just the location of the cell itself), the resultant
26
map layer is only valid if the geographic region and mask settings are
27
the same as they were at the time that the result map was created.
29
<p>Results are affected by the current region settings and mask.
33
Mode of K-factor (erosion) for Spearfish fields:
35
<div class="code"><pre>
36
g.region raster=fields -p
37
r.mode base=fields cover=soils.Kfactor output=K.by.farm.mode
38
r.univar K.by.farm.mode
43
<em><a href="g.region.html">g.region</a></em>,
44
<em><a href="r.category.html">r.category</a></em>,
45
<em><a href="r.clump.html">r.clump</a></em>,
46
<em><a href="r.describe.html">r.describe</a></em>,
47
<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
48
<em><a href="r.mfilter.html">r.mfilter</a></em>,
49
<em><a href="r.neighbors.html">r.neighbors</a></em>,
50
<em><a href="r.reclass.html">r.reclass</a></em>,
51
<em><a href="r.stats.html">r.stats</a></em>,
52
<em><a href="r.statistics.html">r.statistics</a></em>,
53
<em><a href="r.univar.html">r.univar</a></em>
59
U.S.Army Construction Engineering Research Laboratory
61
<p><i>Last changed: $Date: 2014-12-19 22:55:37 +0100 (Fri, 19 Dec 2014) $</i>