1r3.stats(1)                 GRASS GIS User's Manual                r3.stats(1)
2
3
4

NAME

6       r3.stats  - Generates volume statistics for 3D raster maps.
7

KEYWORDS

9       raster3d, statistics, voxel, volume
10

SYNOPSIS

12       r3.stats
13       r3.stats --help
14       r3.stats  [-ec]  input=name   [nsteps=integer]    [--help]  [--verbose]
15       [--quiet]  [--ui]
16
17   Flags:
18       -e
19           Calculate statistics based on equal value groups
20
21       -c
22           Only print cell counts
23
24       --help
25           Print usage summary
26
27       --verbose
28           Verbose module output
29
30       --quiet
31           Quiet module output
32
33       --ui
34           Force launching GUI dialog
35
36   Parameters:
37       input=name [required]
38           Name of input 3D raster map
39
40       nsteps=integer
41           Number of subranges to collect stats from
42           Default: 20
43

DESCRIPTION

45       r3.stats calculates volume statistics for 3D raster maps.  Volumes  are
46       created  on  base  of  value  subranges or groups of equal values.  The
47       default number of subranges is 20 and can  vary  from  1  to  infinite.
48       Larger  number  of  subranges will result in larger memory consumption.
49       The volumes are calculated in qubic meters. Null values are marked with
50       "*".  If the flag -e is set, the number of subranges will be ignored.
51

NOTES

53       As with most GRASS 3D raster map modules, r3.stats operates on the cell
54       array defined by the current  3D  region  settings,  not  the  original
55       extent and resolution of the input map. See g.region.
56
57       The  region setting will not effect the memory consumption of this mod‐
58       ule.  The number of subranges in case of value range calculation or the
59       number of equal value groups effect the memory consumption and the cal‐
60       culation time.  The user can expect a huge time consumption  to  calcu‐
61       late  the  equal  value groups (flag -e) if large region settings occur
62       for maps which have many equal value groups (> 100000).
63

EXAMPLES

65   Lausanne FOSS4G 2006 3D demo dataset example
66       The 3D raster map geology has three values.  Each  value  represents  a
67       specific  geological layer, clay = 1, sand = 2 and bedrock = 3. To cal‐
68       culate the volume of each geological layer, we can use the flag  -e  to
69       group  equal values into single volumes.  r3.stats geology -e will pro‐
70       duce the following output:
71
72         num   |        value       |     volume    |   perc  |    count
73             1             1.000000   300822000.000   50.13700        50137
74             2             2.000000   101400000.000   16.90000        16900
75             3             3.000000   197778000.000   32.96300        32963
76             4                    *           0.000   0.00000            0
77       Number of groups with equal values: 3
78       Sum of non Null cells:
79               Volume = 600000000.000
80               Percentage = 100.000
81               Count = 100000
82       Sum of all cells:
83               Volume = 600000000.000
84               Percentage = 100.000
85               Count = 100000
86
87   Generic example
88       #create a small 3D region
89       g.region n=1000 s=0 e=2000 w=0 t=300 b=0 res3=100
90       #create a raster3D map with row() and null values
91       r3.mapcalc "volmap = if(row() == 5, null(), row())"
92       #run r3.stats with a subrange of 10
93       r3.stats input=volmap nsteps=10
94       #the result should look like this
95        num   | minimum <= value   | value < maximum    |     volume    |   perc  | cell count
96             1          1.000000000          1.900000000    60000000.000   10.00000           60
97             2          1.900000000          2.800000000    60000000.000   10.00000           60
98             3          2.800000000          3.700000000    60000000.000   10.00000           60
99             4          3.700000000          4.600000000    60000000.000   10.00000           60
100             5          4.600000000          5.500000000           0.000   0.00000            0
101             6          5.500000000          6.400000000    60000000.000   10.00000           60
102             7          6.400000000          7.300000000    60000000.000   10.00000           60
103             8          7.300000000          8.200000000    60000000.000   10.00000           60
104             9          8.200000000          9.100000000    60000000.000   10.00000           60
105            10          9.100000000         10.000000001    60000000.000   10.00000           60
106            11                    *                    *    60000000.000   10.00000           60
107       Sum of non Null cells:
108               Volume = 540000000.000
109               Percentage =  90.000
110               Cell count = 540
111       Sum of all cells:
112               Volume = 600000000.000
113               Percentage = 100.000
114               Cell count = 600
115

SEE ALSO

117        g.region, r3.univar, r.stats, r.statistics, v.univar
118

AUTHOR

120       Sören Gebbert
121

SOURCE CODE

123       Available at: r3.stats source code (history)
124
125       Main index | 3D raster index | Topics index | Keywords index |  Graphi‐
126       cal index | Full index
127
128       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
129
130
131
132GRASS 7.8.5                                                        r3.stats(1)
Impressum