Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2054

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: r.mode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>r.mode</b></em>  - Finds the mode of values in a cover map within areas assigned the same category value in a user-specified base map.
<h2>KEYWORDS</h2>
raster
<h2>SYNOPSIS</h2>
<b>r.mode</b><br>
<b>r.mode help</b><br>
<b>r.mode</b> <b>base</b>=<em>string</em> <b>cover</b>=<em>string</em> <b>output</b>=<em>string</em>  [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>base</b>=<em>string</em></DT>
<DD>Base map to be reclassified</DD>

<DT><b>cover</b>=<em>string</em></DT>
<DD>Coverage map</DD>

<DT><b>output</b>=<em>string</em></DT>
<DD>Output map</DD>

</DL>
<H2>DESCRIPTION</H2>

<EM>r.mode</EM> calculates the most frequently occurring value (i. e., mode)
of data contained in a <EM>cover</EM> raster map layer for areas assigned
the same category value in the user-specified <EM>base</EM> raster map
layer. These modes are stored in the new <EM>output</EM> map layer.

<P>
The <EM>output</EM> map is actually a <EM>reclass</EM> of the <EM>base</EM>
map.

<P>
The <B>base</B> parameter defines 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 <EM>base</EM> map, the mode of the values assigned
these cells in the <EM>cover</EM> map will be computed.

<P>
The <B>cover</B> parameter defines an existing raster map layer containing
the values to be used to compute the mode within each category of the
<EM>base</EM> map.

<H2>NOTES</H2>

The user should use the results of <EM>r.mode</EM> with care.
Since this utility assigns a value to each
cell which is based on global information (i.e., information at spatial 
locations other than just the location of the cell itself), the resultant 
map layer is only valid if the geographic region and mask settings are
the same as they were at the time that the result map was created.

<P>
Results are affected by the current region settings and mask.

<H2>EXAMPLE</H2>

Mode of K-factor (erosion) for Spearfish fields:

<div class="code"><pre>
g.region rast=fields -p
r.mode base=fields cover=soils.Kfactor output=K.by.farm.mode
r.univar K.by.farm.mode
</pre></div>

<H2>SEE ALSO</H2>

<em><a href="g.region.html">g.region</a></em>,
<em><a href="r.average.html">r.average</a></em>,
<em><a href="r.category.html">r.category</a></em>,
<em><a href="r.clump.html">r.clump</a></em>,
<em><a href="r.describe.html">r.describe</a></em>,
<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
<em><a href="r.median.html">r.median</a></em>,
<em><a href="r.mfilter.html">r.mfilter</a></em>,
<em><a href="r.neighbors.html">r.neighbors</a></em>,
<em><a href="r.reclass.html">r.reclass</a></em>,
<em><a href="r.stats.html">r.stats</a></em>,
<em><A HREF="r.statistics.html">r.statistics</a></em>,
<em><A HREF="r.univar.html">r.univar</a></em>


<H2>AUTHOR</H2>

Michael Shapiro,
U.S.Army Construction Engineering Research Laboratory

<p><i>Last changed: $Date: 2007-10-10 10:01:00 +0200 (Wed, 10 Oct 2007) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>