Browse Source

r.univar and r3.univar: mention sum in manual, use 3D raster term, add trivial example for r3.univar

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62185 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 years ago
parent
commit
711363a7c1

+ 2 - 2
raster/r.univar/r.univar.html

@@ -2,8 +2,8 @@
 
 
 <em>r.univar</em> calculates the univariate statistics of one or several raster
 <em>r.univar</em> calculates the univariate statistics of one or several raster
 map(s). This includes the number of cells counted, minimum and maximum cell
 map(s). This includes the number of cells counted, minimum and maximum cell
-values, range, arithmetic mean, population variance, standard deviation, and 
-coefficient of variation. Statistics are calculated separately for every
+values, range, arithmetic mean, population variance, standard deviation,
+coefficient of variation, and sum. Statistics are calculated separately for every
 category/zone found in the <b>zones</b> input map if given.
 category/zone found in the <b>zones</b> input map if given.
 If the <b>-e</b> extended statistics flag is given the 1st quartile, median,
 If the <b>-e</b> extended statistics flag is given the 1st quartile, median,
 3rd quartile, and given <b>percentile</b> are calculated.
 3rd quartile, and given <b>percentile</b> are calculated.

+ 16 - 3
raster/r.univar/r3.univar.html

@@ -1,9 +1,9 @@
 <h2>DESCRIPTION</h2>
 <h2>DESCRIPTION</h2>
 
 
-<em>r3.univar</em> calculates the univariate statistics for raster3d maps.
+<em>r3.univar</em> calculates the univariate statistics for a 3D raster map.
 This includes the number of cells counted, minimum and maximum cell values,
 This includes the number of cells counted, minimum and maximum cell values,
-range, arithmetic mean, population variance, standard deviation, and 
-coefficient of variation. Statistics are calculated separately for every
+range, arithmetic mean, population variance, standard deviation,
+coefficient of variation, and sum. Statistics are calculated separately for every
 category/zone found in the <b>zones</b> input map if given.
 category/zone found in the <b>zones</b> input map if given.
 If the <b>-e</b> extended statistics flag is given the 1st quartile, median,
 If the <b>-e</b> extended statistics flag is given the 1st quartile, median,
 3rd quartile, and given <b>percentile</b> are calculated.
 3rd quartile, and given <b>percentile</b> are calculated.
@@ -31,6 +31,19 @@ The <em>r.quantile</em> module will be significantly more efficient for
 calculating percentiles with large maps.
 calculating percentiles with large maps.
 -->
 -->
 
 
+<h2>EXAMPLE</h2>
+
+Computing univariate statistics of a 3D raster with randomly generated values:
+
+<div class="code"><pre>
+# generate random map
+r3.mapcalc "random_0_1 = rand(0., 1)" -s
+
+# compute univariate statistics
+r3.univar map=random_0_1
+</pre></div>
+
+
 <h2>TODO</h2>
 <h2>TODO</h2>
 
 
 <i>mode, skewness, kurtosis</i>
 <i>mode, skewness, kurtosis</i>

+ 1 - 1
raster/r.univar/r3.univar_main.c

@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
     G_add_keyword(_("univariate statistics"));
     G_add_keyword(_("univariate statistics"));
 
 
     module->description =
     module->description =
-	_("Calculates univariate statistics from the non-null 3d cells of a raster3d map.");
+	_("Calculates univariate statistics from the non-null cells of a 3D raster map.");
 
 
     /* Define the different options */
     /* Define the different options */
     set_params();
     set_params();