[GRASS-SVN] r58242 - grass/trunk/raster/r.neighbors
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 16 16:29:55 PST 2013
Author: neteler
Date: 2013-11-16 16:29:55 -0800 (Sat, 16 Nov 2013)
New Revision: 58242
Modified:
grass/trunk/raster/r.neighbors/r.neighbors.html
Log:
r.neighbors manual: weight explanations from glynnc on ML added
Modified: grass/trunk/raster/r.neighbors/r.neighbors.html
===================================================================
--- grass/trunk/raster/r.neighbors/r.neighbors.html 2013-11-16 19:02:22 UTC (rev 58241)
+++ grass/trunk/raster/r.neighbors/r.neighbors.html 2013-11-17 00:29:55 UTC (rev 58242)
@@ -207,7 +207,27 @@
-------
</pre>
-<p>
+The way that weights are used depends upon the specific aggregate
+(<b>method</b>) being used.
+
+However, most of the aggregates have the property that multiplying all
+of the weights by the same factor won't change the final result (an
+exception is <b>method=count</b>).
+
+Also, most (if not all) of them have the properties that an integer
+weight of N is equivalent to N occurrences of the cell value, and
+having all weights equal to one produces the same result as when
+weights are not used.
+
+When weights are used, the calculation for <b>method=average</b> is:
+
+<pre>
+ sum(w[i]*x[i]) / sum(w[i])
+</pre>
+
+In the case where all weights are zero, this will end up with both the
+numerator and denominator to zero, which produces a NULL result.
+
<h3>FLAGS</h3>
<dl>
<dt><b>-a</b>
@@ -287,7 +307,15 @@
whether or not the color file makes sense for the output
will be dependent on the input data values.)
+<!-- TODO
+<h2>EXAMPLES</h2>
+<div class="code"><pre>
+r.neighbors
+</pre></div>
+
+-->
+
<h2>SEE ALSO</h2>
<em><a href="g.region.html">g.region</a></em><br>
More information about the grass-commit
mailing list