[GRASS-SVN] r68371 - in grass/trunk/raster: r.rescale r.univar

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 3 10:09:18 PDT 2016


Author: neteler
Date: 2016-05-03 10:09:18 -0700 (Tue, 03 May 2016)
New Revision: 68371

Modified:
   grass/trunk/raster/r.rescale/r.rescale.html
   grass/trunk/raster/r.univar/r.univar.html
   grass/trunk/raster/r.univar/r3.univar.html
Log:
r.univar/r3.univar manuals: examples improved

Modified: grass/trunk/raster/r.rescale/r.rescale.html
===================================================================
--- grass/trunk/raster/r.rescale/r.rescale.html	2016-05-03 15:24:09 UTC (rev 68370)
+++ grass/trunk/raster/r.rescale/r.rescale.html	2016-05-03 17:09:18 UTC (rev 68371)
@@ -54,7 +54,8 @@
 <a href="r.rescale.eq.html">r.rescale.eq</a>,
 <a href="r.report.html">r.report</a>,
 <a href="r.resample.html">r.resample</a>,
-<a href="r.stats.html">r.stats</a>
+<a href="r.stats.html">r.stats</a>,
+<a href="r.univar.html">r.univar</a>
 </em>
 
 <h2>AUTHOR</h2>

Modified: grass/trunk/raster/r.univar/r.univar.html
===================================================================
--- grass/trunk/raster/r.univar/r.univar.html	2016-05-03 15:24:09 UTC (rev 68370)
+++ grass/trunk/raster/r.univar/r.univar.html	2016-05-03 17:09:18 UTC (rev 68371)
@@ -41,8 +41,60 @@
 map and uploads statistics to new attribute columns, see
 <em><a href="v.rast.stats.html">v.rast.stats</a></em>.
 
-<h2>EXAMPLE</h2>
+<h2>EXAMPLES</h2>
 
+<h3>Univariate statistics</h3>
+
+In this example, the raster map <tt>elevation</tt> in the North 
+Carolina sample dataset is used to calculate univariate statistics: 
+
+<div class="code"><pre>
+g.region raster=elevation -p
+
+# standard output, along with extended statistics
+r.univar -e elevation percentile=98
+total null and non-null cells: 2025000
+total null cells: 0
+
+Of the non-null cells:
+----------------------
+n: 2025000
+minimum: 55.5788
+maximum: 156.33
+range: 100.751
+mean: 110.375
+mean of absolute values: 110.375
+standard deviation: 20.3153
+variance: 412.712
+variation coefficient: 18.4057 %
+sum: 223510266.558102
+1st quartile: 94.79
+median (even number of cells): 108.88
+3rd quartile: 126.792
+98th percentile: 147.727
+
+
+# script style output, along with extended statistics
+r.univar -ge elevation percentile=98
+n=2025000
+null_cells=0
+cells=2025000
+min=55.5787925720215
+max=156.329864501953
+range=100.751071929932
+mean=110.375440275606
+mean_of_abs=110.375440275606
+stddev=20.3153233205981
+variance=412.712361620436
+coeff_var=18.4056555243368
+sum=223510266.558102
+first_quartile=94.79
+median=108.88
+third_quartile=126.792
+percentile_98=147.727
+</pre></div>
+
+<h3>Zonal statistics</h3>
 In this example, the raster polygon map <tt>basins</tt> in the North 
 Carolina sample dataset is used to calculate raster statistics for zones
 for <tt>elevation</tt> raster map: 

Modified: grass/trunk/raster/r.univar/r3.univar.html
===================================================================
--- grass/trunk/raster/r.univar/r3.univar.html	2016-05-03 15:24:09 UTC (rev 68370)
+++ grass/trunk/raster/r.univar/r3.univar.html	2016-05-03 17:09:18 UTC (rev 68371)
@@ -36,20 +36,60 @@
 Computing univariate statistics of a 3D raster with randomly generated values:
 
 <div class="code"><pre>
+# define volume
+g.region n=10 s=0 w=0 e=10 b=0 t=10 res=1 res3=1 -p3
+
 # generate random map
 r3.mapcalc "random_0_1 = rand(0., 1)" -s
 
-# compute univariate statistics
-r3.univar map=random_0_1
+# compute univariate statistics, along with extended statistics
+r3.univar -e map=random_0_1 percentile=98
+ 100%
+total null and non-null cells: 1000
+total null cells: 0
+
+Of the non-null cells:
+----------------------
+n: 1000
+minimum: 0.00053905
+maximum: 0.998322
+range: 0.997783
+mean: 0.513676
+mean of absolute values: 0.513676
+standard deviation: 0.289969
+variance: 0.0840821
+variation coefficient: 56.4498 %
+sum: 513.676463040334
+1st quartile: 0.257654
+median (even number of cells): 0.524313
+3rd quartile: 0.763637
+98th percentile: 0.982924
+
+# script style output, along with extended statistics
+r3.univar -ge map=random_0_1 percentile=98
+n=1000
+null_cells=0
+cells=1000
+min=0.000539049520323687
+max=0.998322037540536
+range=0.997782988020212
+mean=0.513676463040334
+mean_of_abs=0.513676463040334
+stddev=0.289969154194666
+variance=0.0840821103843701
+coeff_var=56.4497646005434
+sum=513.676463040334
+first_quartile=0.257654
+median=0.524313
+third_quartile=0.763637
+percentile_98=0.982924
 </pre></div>
 
 
 <h2>TODO</h2>
 
-<i>mode, skewness, kurtosis</i>
+To be implemented <i>mode, skewness, kurtosis</i>.
 
-
-
 <h2>SEE ALSO</h2>
 
 <em>
@@ -73,5 +113,4 @@
 and Martin Landa<br>
 Zonal loop by Markus Metz
 
-
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list