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

NAME

6       r3.stats  - Generates volume statistics for raster3d maps.
7

KEYWORDS

9       raster3d, statistics
10

SYNOPSIS

12       r3.stats
13       r3.stats help
14       r3.stats [-e] input=name  [nsteps=integer]   [--verbose]  [--quiet]
15
16   Flags:
17       -e
18           Calculate statistics based on equal value groups
19
20       --verbose
21           Verbose module output
22
23       --quiet
24           Quiet module output
25
26   Parameters:
27       input=name
28           Name of input raster3d map
29
30       nsteps=integer
31           Number of sub-ranges to collect stats from
32           Default: 20
33

DESCRIPTION

35       r3.stats  calculates  volume statistics for raster3d maps.  Volumes are
36       created on base of value subranges or  groups  of  equal  values.   The
37       default  number  of  subranges  is  20 and can vary from 1 to infinite.
38       Larger subranges will result in larger memory consumption.  The volumes
39       are  calculated  in  qubic meters. Null values are marked with "*".  If
40       the flag -e is set, the number of subrange will be ignored.
41

NOTES

43       As with most GRASS raster3d modules, r3.univar  operates  on  the  cell
44       array  defined  by  the  current  3d  region settings, not the original
45       extent and resolution of the input map. See g.region.
46
47       The region setting will not effect the memory consumption of this  mod‐
48       ule.  The number of subranges in case of value range calculation or the
49       number of equal value groups effect the memory consumption and the cal‐
50       culation time.  You can expect a huge time consumption to calculate the
51       equal value groups (flag -e) if you use large region  settings  +  maps
52       which have many equal value groups (> 100000).
53

EXAMPLES

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

SEE ALSO

122        g.region
123       r3.univar
124       r.stats
125       r.statistics
126       v.univar
127
128

AUTHORS

130       Soeren Gebbert
131
132       Last changed: $Date: 2007-03-04 01:24:01 +0100 (Sun, 04 Mar 2007) $
133
134       Full index
135
136       © 2003-2008 GRASS Development Team
137
138
139
140GRASS 6.3.0                                                        r3.stats(1)
Impressum