3
<em>r3.univar</em> calculates the univariate statistics for a 3D raster map.
4
This includes the number of cells counted, minimum and maximum cell values,
5
range, arithmetic mean, population variance, standard deviation,
6
coefficient of variation, and sum. Statistics are calculated separately for every
7
category/zone found in the <b>zones</b> input map if given.
8
If the <b>-e</b> extended statistics flag is given the 1st quartile, median,
9
3rd quartile, and given <b>percentile</b> are calculated.
10
If the <b>-g</b> flag is given the results are presented in a format suitable
11
for use in a shell script.
12
If the <b>-t</b> flag is given the results are presented in tabular format
13
with the given field separator. The table can immediately be converted to a
14
vector attribute table which can then be linked to a vector, e.g. the vector
15
that was rasterized to create the <b>zones</b> input raster.
19
As with most GRASS raster3d modules, <em>r3.univar</em> operates on the voxel
20
array defined by the current 3d region settings, not the original extent and
21
resolution of the input map. See <em><a href="g.region.html">g.region</a></em>.
23
This module can use large amounts of system memory when the <b>-e</b>
24
extended statistics flag is used with a very large region setting. If the
25
region is too large the module should exit gracefully with a memory allocation
26
error. Basic statistics can be calculated using any size input region.
28
<!-- no rast3D support?
30
The <em>r.quantile</em> module will be significantly more efficient for
31
calculating percentiles with large maps.
36
Computing univariate statistics of a 3D raster with randomly generated values:
38
<div class="code"><pre>
40
r3.mapcalc "random_0_1 = rand(0., 1)" -s
42
# compute univariate statistics
43
r3.univar map=random_0_1
49
<i>mode, skewness, kurtosis</i>
56
<a href="g.region.html">g.region</a>,
57
<a href="r.univar.html">r.univar</a>,
58
<a href="r.mode.html">r.mode</a>,
59
<a href="r.quantile.html">r.quantile</a>,
60
<a href="r.series.html">r.series</a>,
61
<a href="r3.stats.html">r3.stats</a>,
62
<a href="r.statistics.html">r.statistics</a>,
63
<a href="v.rast.stats.html">v.rast.stats</a>,
64
<a href="v.univar.html">v.univar</a>
71
Code is based on r.univar from<br>
72
Hamish Bowman, Otago University, New Zealand<br>
74
Zonal loop by Markus Metz
77
<p><i>Last changed: $Date: 2014-10-14 04:57:21 +0200 (Tue, 14 Oct 2014) $</i>