[GRASS-SVN] r30352 - grass/branches/releasebranch_6_3/raster/r.neighbors

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 25 22:11:00 EST 2008


Author: epatton
Date: 2008-02-25 22:11:00 -0500 (Mon, 25 Feb 2008)
New Revision: 30352

Modified:
   grass/branches/releasebranch_6_3/raster/r.neighbors/description.html
Log:
Backported correction about -c flag from TRUNK

Modified: grass/branches/releasebranch_6_3/raster/r.neighbors/description.html
===================================================================
--- grass/branches/releasebranch_6_3/raster/r.neighbors/description.html	2008-02-26 03:00:22 UTC (rev 30351)
+++ grass/branches/releasebranch_6_3/raster/r.neighbors/description.html	2008-02-26 03:11:00 UTC (rev 30352)
@@ -1,6 +1,6 @@
-<H2>DESCRIPTION</H2>
+<h2>DESCRIPTION</h2>
 
-<EM>r.neighbors</EM> looks at each cell in a raster input
+<em><b>r.neighbors</b></em> looks at each cell in a raster input
 file, and examines the values assigned to the
 cells in some user-defined "neighborhood" around it.  It
 outputs a new raster map layer in which each cell is
@@ -12,77 +12,75 @@
 layer.
 
 
-<P>
+<p>
 
 The program will be run non-interactively if the user
 specifies program arguments (see OPTIONS) on the command
 line.  Alternately, the user can simply type
-<B>r.neighbors</B> on the command line, without program
+<em><b>r.neighbors</b></em> on the command line, without program
 arguments.  In this case, the user will be prompted for
 flag settings and parameter values.
 
-<H3>OPTIONS</H3>
+<h3>OPTIONS</h3>
 
 The user must specify the names of the raster map layers to
-be used for <EM>input</EM> and <EM>output</EM>, the
-<EM>method</EM> used to analyze neighborhood
+be used for <b>input</b> and <b>output</b>, the
+<b>method</b> used to analyze neighborhood
 values (i.e., the neighborhood function or operation to be
-performed), and the <EM>size</EM> of the neighborhood.
-Optionally, the user can also specify the <EM>TITLE</EM> to
-be assigned to the raster map layer <EM>output</EM>, elect
+performed), and the <b>size</b> of the neighborhood.
+Optionally, the user can also specify the <b>TITLE</b> to
+be assigned to the raster map layer <b>output</b>, elect
 to not align the resolution of the output with that of the
-input (the <EM>-a</EM> option), run <EM>r.neighbors</EM> with
-a custom matrix weights with the <EM>weight</EM> option, and
-elect to run <EM>r.neighbors</EM> quietly (the <EM>-q</EM> option).
+input (the <b>-a</b> option), run <em><b>r.neighbors</b></em> with
+a custom matrix weights with the <em>weight</em> option, and
+elect to run <em><b>r.neighbors</b></em> quietly (the <b>-q</b> option).
 These options are described further below.
 
 
-<P>
+<p>
 
-<EM>Neighborhood Operation Methods:</EM>
-The <EM>neighborhood</EM> operators determine what new 
+<em>Neighborhood Operation Methods:</em>
+The <b>neighborhood</b> operators determine what new 
 value a center cell in a neighborhood will have after examining
 values inside its neighboring cells.
 Each cell in a raster map layer becomes the center cell of a neighborhood 
 as the neighborhood window moves from cell to cell throughout the map layer.
-<EM>r.neighbors</EM>
-can perform the following operations:
+<em><b>r.neighbors</b></em> can perform the following operations:
 
+<p>
+<dl>
 
-<P>
-<DL>
+<dt><b>average</b> 
 
-<DT><B>average</B> 
-
-<DD>The average value within the neighborhood.
+<dd>The average value within the neighborhood.
 In the following example, the result would be:
 
-<BR>
+<br>
 
 (7*4 + 6 + 5 + 4*3)/9 = 5.66
 
-<BR>
+<br>
 
 The result is rounded to the nearest integer (in this case 6).
 
-<DT><B>median</B> 
+<dt><b>median</b> 
 
-<DD>The value found half-way through a list of the
+<dd>The value found half-way through a list of the
 neighborhood's values,
 when these are ranged in numerical order.
 
-<DT><B>mode</B> 
+<dt><b>mode</b> 
 
-<DD>The most frequently occurring value in the neighborhood.
+<dd>The most frequently occurring value in the neighborhood.
 
-<DT><B>minimum</B> 
+<dt><b>minimum</b> 
 
-<DD>The minimum value within the neighborhood.
+<dd>The minimum value within the neighborhood.
 
-<DT><B>maximum</B> 
+<dt><b>maximum</b> 
 
-<DD>The maximum value within the neighborhood.
-<PRE>
+<dd>The maximum value within the neighborhood.
+<pre>
        Raw Data     Operation     New Data
    ----------------          ----------------
    | 7  | 7  |  5 |          |    |    |    |
@@ -91,80 +89,80 @@
    |----|----|----|          |----|----|----|
    | 7  | 6  |  4 |          |    |    |    |
    |----|----|----|          |----|----|----|
-</PRE>
+</pre>
 
-<DT><B>stddev</B> 
+<dt><b>stddev</b> 
 
-<DD>The statistical standard deviation of values
+<dd>The statistical standard deviation of values
 within the neighborhood (rounded to the nearest integer).
 
-<DT><B>sum</B> 
+<dt><b>sum</b> 
 
-<DD>The sum of values within the neighborhood.
+<dd>The sum of values within the neighborhood.
 
-<DT><B>variance</B> 
+<dt><b>variance</b> 
 
-<DD>The statistical variance of values
+<dd>The statistical variance of values
 within the neighborhood (rounded to the nearest integer).
 
-<DT><B>diversity</B> 
+<dt><b>diversity</b> 
 
-<DD>The number of different values within the neighborhood.
+<dd>The number of different values within the neighborhood.
 In the above example, the diversity is 4.
 
-<DT><B>interspersion</B> 
+<dt><b>interspersion</b> 
 
-<DD>The percentage of cells containing values which differ from the values
+<dd>The percentage of cells containing values which differ from the values
 assigned to the center cell in the neighborhood, plus 1.
 In the above example, the interspersion is:
 
-<BR>
+<br>
 
 5/8 * 100 + 1 = 63.5
 
-<BR>
+<br>
 
 The result is rounded to the nearest integer (in this case 64).
 
-</DL>
-<P>
-<BR>
+</dl>
+<p>
+<br>
 
-<EM>Neighborhood Size:</EM>
-<DD>The neighborhood <EM>size</EM> specifies which cells surrounding any given
+<em>Neighborhood Size:</em>
+<dd>The neighborhood <b>size</b> specifies which cells surrounding any given
 cell fall into the neighborhood for that cell.
-The size must be an odd integer.
+The <b>size</b> must be an odd integer.
 For example,
-<PRE>
+<pre>
                               _ _ _
                              |_|_|_| 
     3 x 3 neighborhood ---&gt;  |_|_|_|
                              |_|_|_|
 
-</PRE>
-</DD>
-<P>
+</pre>
+</dd>
+<p>
 
-<EM>Matrix weights:</EM>
-<DD>A custom matrix can be used if none of the neighborhood operation
-methods are desirable by using the <EM>weight</EM>.  This option must
-be used in conjunction with the <EM>size</EM> option to specify the
+<em>Matrix weights:</em>
+<dd>A custom matrix can be used if none of the neighborhood operation
+methods are desirable by using the <b>weight</b>.  This option must
+be used in conjunction with the <b>size</b> option to specify the
 matrix size.  The weights desired are to be entered into a text file.
-For example, to calculate the focal mean with a matrix <EM>size</EM> of
+For example, to calculate the focal mean with a matrix <b>size</b> of
 3,
-<PRE>
+<pre>
 r.neigbors in=input.map out=output.map size=3 weight=weights.txt
-</PRE>
+</pre>
 
 The contents of the weight.txt file:
-<PRE>
+<pre>
 3 3 3
 1 4 8
 9 5 3
-</PRE>
+</pre>
 
 This corresponds to the following 3x3 matrix:
-<PRE>
+<pre>
     -------
     |3|3|3|
     -------
@@ -172,31 +170,31 @@
     -------
     |9|5|3|
     -------
-</PRE>
+</pre>
 
-<P>
+<p>
 
-<H3>FLAGS</H3>
+<h3>FLAGS</h3>
 
-<DT><B>-a</B> 
+<dt><b>-a</b> 
 
-<DD>If specified, <EM>r.neighbors</EM> will not align the output
+<dd>If specified, <em><b>r.neighbors</b></em> will not align the output
 raster map layer with that of the input raster map layer.
-The <EM>r.neighbors</EM> program works in the current geographic region.
+The <em><b>r.neighbors</b></em> program works in the current geographic region.
 It is recommended, but not required, that the resolution
 of the geographic region be the same as that of the raster map layer.
 By default, if unspecified,
-<EM>r.neighbors</EM> will align these geographic region settings.
+<em><b>r.neighbors</b></em> will align these geographic region settings.
 <p>
 
-<DT><B>-c</B>
-<DD>
+<dt><b>-c</b>
+<dd>
 This flag will use a circular neighborhood for the moving analysis window,
 centered on the current cell. 
 
 <p>
 The exact masks for the first few neighborhood sizes are as follows:
-<div class="code"><PRE>
+<div class="code"><pre>
 3x3     . X .		5x5	. . X . .	7x7	. . . X . . . 
         X O X			. X X X .		. X X X X X .
         . X .			X X O X X		. X X X X X .
@@ -216,36 +214,37 @@
         . . . . X . . . .			. X X X X X X X X X .
 				        	. . X X X X X X X . .
 				        	. . . . . X . . . . .	
-</PRE></div>
+</pre></div>
 
 
         
 <p>
 
-<DT><B>-q</B> 
+<dt><b>-q</b> 
 
-<DD>If specified, <EM>r.neighbors</EM> will run relatively quietly
+<dd>If specified, <em><b>r.neighbors</b></em> will run relatively quietly
 (i.e., without printing to standard output notes on the program's progress).
 If unspecified, the program will print messages to standard output by default.
-</DD>
+</dd>
 
 
-<H2>NOTES</H2>
+<h2>NOTES</h2>
 
-The <EM>r.neighbors</EM> program works in the current geographic region
+The <em><b>r.neighbors</b></em> program works in the current geographic region
 with the current mask, if any.  It is recommended, but not required,
 that the resolution of the geographic region be the same as that
-of the raster map layer.  By default, <EM>r.neighbors</EM> will align
+of the raster map layer.  By default, <em><b>r.neighbors</b></em> will align
 these geographic region settings.  However, the user can elect to keep
 original input and output resolutions which are not aligned by specifying
-this (e.g., using the <EM>-a</EM> option).
+this (e.g., using the <b>-a</b> option).
 
-<P>
-With the <b>-c</b> flag, differently-shaped neighborhood analysis windows may be achieved by
-using the <em>weight=</em> parameter to specify a weights file where all values
-are equal (for <em>method</em>=sum, the sum of the weights should be 1). The user
-can also vary the weights at the edge of the neighborhood according to 
-the proportion of the cell that lies inside the neighborhood circle, 
+<p>
+The <b>-c</b> flag and the <b>weights</b> parameter are mutually exclusive. 
+Any use of the two together will produce an error. Differently-shaped neighborhood 
+analysis windows may be achieved by using the <b>weight=</b> parameter to specify 
+a weights file where all values are equal (for <b>method</b>=sum, the sum of the 
+weights should be 1). The user can also vary the weights at the edge of the 
+neighborhood according to the proportion of the cell that lies inside the neighborhood circle, 
 effectively anti-aliasing the analysis mask.
 <p>
 
@@ -255,27 +254,27 @@
 to be ignored and any non-zero value causes the cell to be used.
 <p>
 
-<EM>r.neighbors</EM> copies the GRASS <EM>color</EM> files associated with
+<em><b>r.neighbors</b></em> copies the GRASS <em>color</em> files associated with
 the input raster map layer for those output map layers that are based
 on the neighborhood average, median, mode, minimum, and maximum.
 Because standard deviation, variance, diversity, and interspersion are indices,
 rather than direct correspondents to input values,
-no <EM>color</EM> files are copied for these map layers.
-(The user should note that although the <EM>color</EM> file is copied
-for <EM>average</EM> neighborhood function output,
+no <em>color</em> files are copied for these map layers.
+(The user should note that although the <em>color</em> file is copied
+for <em>average</em> neighborhood function output,
 whether or not the color file makes sense for the output
 will be dependent on the input data values.)
 
-<H2>SEE ALSO</H2>
+<h2>SEE ALSO</h2>
 
-<EM><A HREF="g.region.html">g.region</A></EM><br>
-<EM><A HREF="r.clump.html">r.clump</A></EM><br>
-<EM><A HREF="r.mapcalc.html">r.mapcalc</A></EM><br>
-<EM><A HREF="r.mfilter.html">r.mfilter</A></EM><br>
-<EM><A HREF="r.statistics.html">r.statistics</A></EM><br>
-<EM><A HREF="r.support.html">r.support</A></EM>
+<em><a href="g.region.html">g.region</a></em><br>
+<em><a href="r.clump.html">r.clump</a></em><br>
+<em><a href="r.mapcalc.html">r.mapcalc</a></em><br>
+<em><a href="r.mfilter.html">r.mfilter</a></em><br>
+<em><a href="r.statistics.html">r.statistics</a></em><br>
+<em><a href="r.support.html">r.support</a></em>
 
-<H2>AUTHOR</H2>
+<h2>AUTHOR</h2>
 
 Michael Shapiro,
 U.S.Army Construction Engineering Research Laboratory 



More information about the grass-commit mailing list