other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
| r.stats(1grass) | Grass User's Manual | r.stats(1grass) |
NAME¶
r.stats - Generates area statistics for raster map layers.KEYWORDS¶
raster, statisticsSYNOPSIS¶
r.statsFlags:¶
- -1
-
One cell (range) per line
- -A
-
Print averaged values instead of intervals
- -a
-
Print area totals
- -c
-
Print cell counts
- -p
-
Print APPROXIMATE percents (total percent may not be 100%)
- -l
-
Print category labels
- -g
-
Print grid coordinates (east and north)
- -x
-
Print x and y (column and row)
- -r
-
Print raw indexes of fp ranges (fp maps only)
- -n
-
Suppress reporting of any NULLs
- -N
-
Suppress reporting of NULLs when all values are NULL
- -C
-
Report for cats fp ranges (fp maps only)
- -i
-
Read fp map as integer (use map's quant rules)
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- input=name[,name,...]
-
Name of input raster map(s)
- output=name
-
Name for output file (if omitted or "-" output to stdout)
- fs=character|space|tab
-
Field separatorOutput field separatorDefault: space
- nv=string
-
String representing no data cell valueDefault: *
- nsteps=integer
-
Number of fp subranges to collect stats fromDefault: 255
DESCRIPTION¶
r.stats calculates the area present in each of the categories of user-selected raster map layer(s). Area statistics are given in units of square meters and/or cell counts. This analysis uses the current geographic region and mask settings. Output can be sent to a file in the user's current working directory. If a single map layer is specified on the command line, a list of areas in square meters (assuming the map's coordinate system is in meters) for each category in the raster map layer will be printed. (If the -c option is chosen, areas will be stated in number of cells.) If multiple raster map layers are specified on the command line, a cross-tabulation table of areas for each combination of categories in the map layers will be printed. For example, if one raster map layer were specified, the output would look like:1:1350000.00
2:4940000.00
3:8870000.00
0:0:0:8027500.00
0:1:0:1152500.00
1:0:0:164227500.00
1:0:1:2177500.00
1:1:0:140092500.00
1:1:1:3355000.00
2:0:0:31277500.00
2:0:1:2490000.00
2:1:0:24207500.00
2:1:1:1752500.00
3:0:0:17140000.00
3:1:0:11270000.00
3:1:1:2500.00
NOTES¶
r.stats works in the current geographic region with the current mask. If a nicely formatted output is desired, pipe the output into a command which can create columnar output. For example, the command: r.stats input=a,b,c | pr -3 | cat -s will create a three-column outputSEE ALSO¶
g.region, r.coin, r.describe, r.report, r.statistics, r.univarAUTHOR¶
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory Last changed: $Date: 2008-05-16 21:09:06 +0200 (Fri, 16 May 2008) $ Full index © 2003-2014 GRASS Development Team| GRASS 6.4.4 |