[GRASS-SVN] r70379 - grass/branches/releasebranch_7_2/raster/r.resamp.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 16 01:05:46 PST 2017
Author: neteler
Date: 2017-01-16 01:05:46 -0800 (Mon, 16 Jan 2017)
New Revision: 70379
Modified:
grass/branches/releasebranch_7_2/raster/r.resamp.stats/main.c
grass/branches/releasebranch_7_2/raster/r.resamp.stats/r.resamp.stats.html
Log:
r.resamp.stats: Introduce also other stats methods to resampling module to better match r.neigbors offer (trunk, r70297)
Modified: grass/branches/releasebranch_7_2/raster/r.resamp.stats/main.c
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.resamp.stats/main.c 2017-01-15 22:12:29 UTC (rev 70378)
+++ grass/branches/releasebranch_7_2/raster/r.resamp.stats/main.c 2017-01-16 09:05:46 UTC (rev 70379)
@@ -33,6 +33,7 @@
{c_mode, w_mode, "mode", "most frequently occurring value"},
{c_min, w_min, "minimum", "lowest value"},
{c_max, w_max, "maximum", "highest value"},
+ {c_range, NULL, "range", "range value"},
{c_quart1, w_quart1, "quart1", "first quartile"},
{c_quart3, w_quart3, "quart3", "third quartile"},
{c_perc90, w_perc90, "perc90", "ninetieth percentile"},
@@ -40,6 +41,8 @@
{c_var, w_var, "variance", "variance value"},
{c_stddev, w_stddev, "stddev", "standard deviation"},
{c_quant, w_quant, "quantile", "arbitrary quantile"},
+ {c_count, w_count, "count", "count of non-NULL values"},
+ {c_divr, NULL, "diversity", "number of different values"},
{NULL, NULL, NULL, NULL}
};
@@ -384,11 +387,14 @@
Rast_write_history(parm.rastout->answer, &history);
/* copy color table from source map */
- if (strcmp(parm.method->answer, "sum") != 0) {
+ if (strcmp(parm.method->answer, "sum") != 0 &&
+ strcmp(parm.method->answer, "range") != 0 &&
+ strcmp(parm.method->answer, "count") != 0 &&
+ strcmp(parm.method->answer, "diversity") != 0) {
if (Rast_read_colors(parm.rastin->answer, "", &colors) < 0)
G_fatal_error(_("Unable to read color table for %s"),
parm.rastin->answer);
- Rast_mark_colors_as_fp(&colors);
+ Rast_mark_colors_as_fp(&colors);
Rast_write_colors(parm.rastout->answer, G_mapset(), &colors);
}
Modified: grass/branches/releasebranch_7_2/raster/r.resamp.stats/r.resamp.stats.html
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.resamp.stats/r.resamp.stats.html 2017-01-15 22:12:29 UTC (rev 70378)
+++ grass/branches/releasebranch_7_2/raster/r.resamp.stats/r.resamp.stats.html 2017-01-16 09:05:46 UTC (rev 70379)
@@ -49,11 +49,14 @@
<a href="r.resample.html">r.resample</a>,
<a href="r.resamp.rst.html">r.resamp.rst</a>,
<a href="r.resamp.filter.html">r.resamp.filter</a>,
-<a href="r.resamp.interp.html">r.resamp.interp</a>
+<a href="r.resamp.interp.html">r.resamp.interp</a>,
+<a href="r.neighbors.html">r.neighbors</a>
</em>
<p>
Overview: <a href="https://grasswiki.osgeo.org/wiki/Interpolation">Interpolation and Resampling</a> in GRASS GIS
+<p>
+Examples how statistical functions are applied can be found in the <a href="r.neighbors.html">r.neighbors</a> module documentation.
<h2>AUTHOR</h2>
More information about the grass-commit
mailing list