/usr/share/doc/grass-doc/html/r.stats.html is in grass-doc 6.4.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS manual: r.stats</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">
<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
<h2>NAME</h2>
<em><b>r.stats</b></em> - Generates area statistics for raster map layers.
<h2>KEYWORDS</h2>
raster, statistics
<h2>SYNOPSIS</h2>
<b>r.stats</b><br>
<b>r.stats help</b><br>
<b>r.stats</b> [-<b>1AacplgxrnNCi</b>] <b>input</b>=<em>name</em>[,<i>name</i>,...] [<b>output</b>=<em>name</em>] [<b>fs</b>=<em>character|space|tab</em>] [<b>nv</b>=<em>string</em>] [<b>nsteps</b>=<em>integer</em>] [--<b>verbose</b>] [--<b>quiet</b>]
<h3>Flags:</h3>
<DL>
<DT><b>-1</b></DT>
<DD>One cell (range) per line</DD>
<DT><b>-A</b></DT>
<DD>Print averaged values instead of intervals</DD>
<DT><b>-a</b></DT>
<DD>Print area totals</DD>
<DT><b>-c</b></DT>
<DD>Print cell counts</DD>
<DT><b>-p</b></DT>
<DD>Print APPROXIMATE percents (total percent may not be 100%)</DD>
<DT><b>-l</b></DT>
<DD>Print category labels</DD>
<DT><b>-g</b></DT>
<DD>Print grid coordinates (east and north)</DD>
<DT><b>-x</b></DT>
<DD>Print x and y (column and row)</DD>
<DT><b>-r</b></DT>
<DD>Print raw indexes of fp ranges (fp maps only)</DD>
<DT><b>-n</b></DT>
<DD>Suppress reporting of any NULLs</DD>
<DT><b>-N</b></DT>
<DD>Suppress reporting of NULLs when all values are NULL</DD>
<DT><b>-C</b></DT>
<DD>Report for cats fp ranges (fp maps only)</DD>
<DT><b>-i</b></DT>
<DD>Read fp map as integer (use map's quant rules)</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>
<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name[,<i>name</i>,...]</em></DT>
<DD>Name of input raster map(s)</DD>
<DT><b>output</b>=<em>name</em></DT>
<DD>Name for output file (if omitted or "-" output to stdout)</DD>
<DT><b>fs</b>=<em>character|space|tab</em></DT>
<DD>Field separator</DD>
<DD>Output field separator</DD>
<DD>Default: <em>space</em></DD>
<DT><b>nv</b>=<em>string</em></DT>
<DD>String representing no data cell value</DD>
<DD>Default: <em>*</em></DD>
<DT><b>nsteps</b>=<em>integer</em></DT>
<DD>Number of fp subranges to collect stats from</DD>
<DD>Default: <em>255</em></DD>
</DL>
<h2>DESCRIPTION</h2>
<em>r.stats</em> 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 <em>-c</em> 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.
<p>
For example, if one raster map layer were specified, the output would look like:
<pre>
1:1350000.00
2:4940000.00
3:8870000.00
</pre>
If three raster map layers <em>a, b</em>, and <em>c</em>, were specified,
the output would look like:
<pre>
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
</pre>
Within each grouping, the first field represents the category value of map
layer <em>a</em>, the second represents the category values associated with
map layer <em>b</em>, the third represents category values for map layer
<em>c</em>, and the last field gives the area in square meters for the
particular combination of these three map layers' categories. For example,
above, combination 3,1,1 covered 2500 square meters. Fields are separated by
colons.
<h2>NOTES</h2>
<em>r.stats</em> works in the current geographic region with the current mask.
<p>
If a nicely formatted output is desired, pipe the output into a command
which can create columnar output. For example, the command:
<p>
<b>r.stats input=</b>a,b,c | pr -3 | cat -s
<p>
will create a three-column output
<pre>
1:4:4:10000.00 2:1:5:290000.00 2:4:5:2090000.00
1:4:5:1340000.00 2:2:5:350000.00 3:1:2:450000.00
2:1:1:1090000.00 2:4:1:700000.00 3:1:3:5280000.00
2:1:3:410000.00 2:4:3:10000.00 3:1:5:3140000.00
</pre>
The output from <em>r.stats</em> on more than one map layer is sorted.
<p>
Note that the user has only the option of printing out cell statistics in
terms of cell counts and/or area totals. Users wishing to use different
units than are available here should use the GRASS program
<em><a href="r.report.html">r.report</a></em>.
<h2>SEE ALSO</h2>
<em>
<a href="g.region.html">g.region</a>,
<a href="r.coin.html">r.coin</a>,
<a href="r.describe.html">r.describe</a>,
<a href="r.report.html">r.report</a>,
<a href="r.statistics.html">r.statistics</a>,
<a href="r.univar.html">r.univar</a>
</em>
<h2>AUTHOR</h2>
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
<p><i>Last changed: $Date: 2008-05-16 12:09:06 -0700 (Fri, 16 May 2008) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
<P>© 2003-2013 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>
|