This file is indexed.

/usr/share/doc/grass-doc/html/r.random.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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS manual: r.random</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.random</b></em>  - Creates a raster map layer and vector point map containing randomly located points.
<h2>KEYWORDS</h2>
raster, random
<h2>SYNOPSIS</h2>
<b>r.random</b><br>
<b>r.random help</b><br>
<b>r.random</b> [-<b>zidb</b>] <b>input</b>=<em>name</em>  [<b>cover</b>=<em>name</em>]  <b>n</b>=<em>number[%]</em>  [<b>raster_output</b>=<em>name</em>]   [<b>vector_output</b>=<em>name</em>]   [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-z</b></DT>
<DD>Generate points also for NULL category</DD>

<DT><b>-i</b></DT>
<DD>Report information about input raster and exit</DD>

<DT><b>-d</b></DT>
<DD>Generate vector points as 3D points</DD>

<DT><b>-b</b></DT>
<DD>Do not build topology in points mode</DD>

<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</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</em></DT>
<DD>Name of input raster map</DD>

<DT><b>cover</b>=<em>name</em></DT>
<DD>Name of cover raster map</DD>

<DT><b>n</b>=<em>number[%]</em></DT>
<DD>The number of points to allocate</DD>

<DT><b>raster_output</b>=<em>name</em></DT>
<DD>Name for output raster map</DD>

<DT><b>vector_output</b>=<em>name</em></DT>
<DD>Name for output vector map</DD>

</DL>
<h2>DESCRIPTION</h2>
<p>
The program <em>r.random</em> allows the user to create a
raster map layer and/or a vector points map containing 
coordinates of points whose locations have been randomly
determined.  The program locates these randomly generated
vector points (sites) within the current geographic region and mask (if
any), on non-NULL category value data areas within a
user-specified raster map layer. If the user sets the
<b>-z</b> flag, points will be randomly generated across all
cells (even those with NULL values).

<p>
The category values and
corresponding category names already associated with the
random point locations in the <em>input</em> map layer are
assigned to these points in the <em>raster_output</em> map
layer. If the <b>-z</b> is specified, then a unique entry
is made for the value used where the <em>input</em> was NULL.
This value is at least 1 less than the smallest value in the
<em>input</em> raster and is given a medium gray color.

<h2>NOTES</h2>
<p>
If a <em>cover</em> raster map is specified and the <em>cover</em> map
contains NULL (no data) values, these points are suppressed in the
resulting <em>vector_output</em> or <em>raster_output</em> map.

<p>
The <em>vector_output</em> file created by <em>r.random</em>
contains vector points that represent the <em>center points</em> of the
randomly generated cells.  A <em>value</em> attribute contains the cell value
of the <em>input</em> raster (or the assigned value
when <b>-z</b> is used). <br>
If a <em>cover</em> map is additionally specified, a second
column  <em>covervalue</em> is populated with raster values from
the <em>cover</em> map.

<p>
If the user sets the <b>-b</b> flag, vector points are written without
topology to minimize the required resources. This is suitable input
to <em>v.surf.rst</em> and other vector modules.

<p>
The user may specify the quantity of random locations to be
generated either as a <em>positive integer</em> (e.g., 10),
or as a <em>percentage of the raster map layer's cells</em> 
(e.g., 10%, or 3.05%).  The number of cells considered for 
the percentage reflects whether or not the <b>-z</b> flag
was given. Options are 0-100; percentages less than
one percent may be stated as decimals.

<p>
Flag <b>-i</b> prints the raster map's name and location, 
the total number of cells under the current region settings, and
the number of NULL valued cells under the current region settings.
Then module exits without doing anything.  Useful for deciding on the number
of sites to have <em>r.random</em> create.
<b>WARNING:</b> this feature may be removed in future. Use 
<a href="g.region.html">g.region</a> and 
<a href="r.report.html">r.report</a>
instead.
<div class="code"><pre>
g.region -p
r.report map=inputmap units=c null=* nsteps=1
</pre></div>

<p>
To create random vector point locations within some, but not all, 
non-zero categories of the input raster map layer, 
the user must first create a reclassified raster map layer 
of the original raster map layer (e.g., using the GRASS 
program <em><a href="r.reclass.html">r.reclass</a></em>) 
that contains only the desired categories, 
and then use the reclassed raster map layer as input to <em>r.random</em>.

<h2>EXAMPLES</h2>
<p>
Random vector elevation points sampled from elevation map in the
Spearfish region, result stored in 2D vector map:

<div class="code"><pre>
g.region rast=elevation.10m -p
r.random elevation.10m vector_output=elevrand n=100
v.db.select elevrand
v.univar elevrand col=value type=point
</pre></div>


<p>
Random vector elevation points sampled from elevation map in the
Spearfish region with collocated values sampled from landuse map,
result stored in 3D vector map:

<div class="code"><pre>
g.region rast=elevation.10m -p
r.random -d elevation.10m cover=landcover.30m vector_output=luserand3d n=100

# data output (value: elevation, covervalue: landuse class):
v.db.select luserand3d
cat|value|covervalue
1|1151.406616|81
2|1172.121216|71
3|1183.219604|71
...
</pre></div>

<h2>BUGS</h2>

It's not possible to use the <b>-i</b> flag and not also specify the <b>n</b> 
parameter.


<h2>SEE ALSO</h2>

<em>
<a href="g.region.html">g.region</a><br>
<a href="r.reclass.html">r.reclass</a><br>
<a href="v.random.html">v.random</a><br>
<a href="v.surf.rst.html">v.surf.rst</a>
</em>


<h2>AUTHOR</h2>

Dr. James Hinthorne,
GIS Laboratory, 
Central Washington University
<p>
Modified for GRASS 5.0 by Eric G. Miller
<p>
Cover map support by Markus Neteler, 2007

<p>
<i>Last changed: $Date: 2010-09-21 06:06:44 -0700 (Tue, 21 Sep 2010) $</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>&copy; 2003-2013 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>