Debian Codegraph @

raster/r.random.surface/r.random.surface.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>r.random.surface</em> generates a spatially dependent random surface.
4 The random surface is composed of values representing the deviation from the
5 mean of the initial random values driving the algorithm. The initial random
6 values are independent Gaussian random deviates with a mean of 0 and
7 standard deviation of 1. The initial values are spread over each output map
8 using filter(s) of diameter distance. The influence of each random value on
9 nearby cells is determined by a distance decay function based on exponent.
10 If multiple filters are passed over the output maps, each filter is given a
11 weight based on the weight inputs. The resulting random surface can have
12 <em>any</em> mean and variance, but the theoretical mean of an infinitely
13 large map is 0.0 and a variance of 1.0. Description of the algorithm is in
14 the <b>NOTES</b> section.
15
16 <p>The random surface generated are composed of floating point numbers, and
17 saved in the category description files of the output map(s). Cell values
18 are uniformly or normally distributed between 1 and high values inclusive
19 (determined by whether the <b>-u</b> flag is used). The category names
20 indicate the average floating point value and the range of floating point
21 values that each cell value represents.
22
23 <p><em>r.random.surface's</em> original goal is to generate random fields for
24 spatial error modeling. A procedure to use <em>r.random.surface</em> in
25 spatial error modeling is given in the <b>NOTES</b> section.
26
27 <h3>Detailed parameter description</h3>
28 <dl>
29 <dt><b>output</b></dt>
30 <dd>Random surface(s). The cell values are a random distribution
31 between the low and high values inclusive. The category values of the
32 output map(s) are in the form <em>#.# #.# to #.#</em> where each #.#
33 is a floating point number. The first number is the average of the
34 random values the cell value represents. The other two numbers are the
35 range of random values for that cell value. The <em>average</em> mean
36 value of generated <code>output</code> map(s) is 0. The <em>average</em>
37 variance of map(s) generated is 1. The random values represent the
38 standard deviation from the mean of that random surface.</dd>
39
40 <dt><b>distance</b></dt>
41 <dd>Distance determines the spatial dependence of the output
42 map(s). The distance value indicates the minimum distance at which two
43 map cells have no relationship to each other. A distance value of 0.0
44 indicates that there is no spatial dependence (i.e., adjacent cell
45 values have no relationship to each other). As the distance value
46 increases, adjacent cell values will have values closer to each
47 other. But the range and distribution of cell values over the output
48 map(s) will remain the same. Visually, the clumps of lower and higher
49 values gets larger as distance increases. If multiple values are
50 given, each output map will have multiple filters, one for each set of
51 distance, exponent, and weight values.</dd>
52
53 <dt><b>exponent</b></dt>
54 <dd>Exponent determines the distance decay exponent for a particular
55 filter. The exponent value(s) have the property of determining
56 the <em>texture</em> of the random surface. Texture will decrease as
57 the exponent value(s) get closer to 1.0. Normally, exponent will be
58 1.0 or less. If there are no exponent values given, each filter will
59 be given an exponent value of 1.0. If there is at least one exponent
60 value given, there must be one exponent value for each distance value.</dd>
61
62 <dt><b>flat</b></dt>
63 <dd>Flat determines the distance at which the filter.</dd>
64
65 <dt><b>weight</b></dt>
66 <dd>Weight determines the relative importance of each filter. For
67 example, if there were two filters driving the algorithm and
68 weight=1.0, 2.0 was given in the command line: The second filter would
69 be twice as important as the first filter. If no weight values are
70 given, each filter will be just as important as the other filters
71 defining the random field. If weight values exist, there must be a
72 weight value for each filter of the random field.</dd>
73
74 <dt><b>high</b></dt>
75 <dd>Specifies the high end of the range of cell values in the output
76 map(s). Specifying a very large high value will minimize
77 the <em>errors</em> caused by the random surface's discretization. The
78 word errors is in quotes because errors in discretization are often
79 going to cancel each other out and the spatial statistics are far more
80 sensitive to the initial independent random deviates than any
81 potential discretization errors.</dd>
82
83 <dt><b>seed</b></dt>
84 <dd>Specifies the random seed(s), one for each map,
85 that <em>r.random.surface</em> will use to generate the initial set of
86 random values that the resulting map is based on. If the random seed
87 is not given, <em>r.random.surface</em> will get a seed from the
88 process ID number.</dd>
89
90 </dl>
91
92 <h2>NOTES</h2>
93
94 While most literature uses the term random field instead of random surface,
95 this algorithm always generates a surface. Thus, its use of random surface.
96
97 <p><em>r.random.surface</em> builds the random surface using a filter algorithm
98 smoothing a map of independent random deviates. The size of the filter is
99 determined by the largest distance of spatial dependence. The shape of the
100 filter is determined by the distance decay exponent(s), and the various
101 weights if different sets of spatial parameters are used. The map of
102 independent random deviates will be as large as the current region PLUS the
103 extent of the filter. This will eliminate edge effects caused by the
104 reduction of degrees of freedom. The map of independent random deviates will
105 ignore the current mask for the same reason.
106
107 <p>One of the most important uses for <em>r.random.surface</em> is to determine
108 how the error inherent in raster maps might effect the analyses done with
109 those maps.
110
111 <h2>EXAMPLE</h2>
112
113 Generate a random surface (using extent of North Carolina sample dataset):
114
115 <div class="code"><pre>
116 g.region raster=elevation res=100 -p
117 r.surf.random output=randomsurf min=10 max=100
118
119 # verify distribution
120 r.univar -e map=randomsurf
121 </pre></div>
122
123 <!--
124 d.legend -d raster=randomsurf@user1 title=randomsurf font=Vera
125 -->
126
127 <div align="center" style="margin: 10px">
128 <a href="r_random_surface.jpg">
129 <img src="r_random_surface.jpg" width="600" height="288" alt="r.random.surface example (n_min: 10; n_max: 100)" border="0">
130 </a><br>
131 <i>Figure: Random surface example (min: 10; max: 100)</i>
132 </div>
133
134 <p>
135 With the histogram tool the cell values versus count can be shown.
136 <p>
137 <div align="center" style="margin: 10px">
138 <a href="r_random_surface_hist.png">
139 <img src="r_random_surface_hist.png" width="600" height="244" alt="r.random.surface example histogram (n_min: 10; n_max: 100)" border="0">
140 </a><br>
141 <i>Figure: Histogram of random surface example (min: 10; max: 100)</i>
142 </div>
143
144 <h2>REFERENCES</h2>
145
146 Random Field Software for GRASS by Chuck Ehlschlaeger
147
148 <p> As part of my dissertation, I put together several programs that help
149 GRASS (4.1 and beyond) develop uncertainty models of spatial data. I hope
150 you find it useful and dependable. The following papers might clarify their
151 use:
152
153 <ul>
154 <li> Ehlschlaeger, C.R., Shortridge, A.M., Goodchild, M.F., 1997.
155 Visualizing spatial data uncertainty using animation.
156 Computers &amp; Geosciences 23, 387-395.
157 doi:<a href="https://doi.org/10.1016/S0098-3004(97)00005-8">10.1016/S0098-3004(97)00005-8</a></li>
158
159 <li> Ehlschlaeger, C.R., Shortridge, A.M., 1996.
160 <a href="http://www.geo.hunter.cuny.edu/~chuck/paper.html">Modeling
161 Uncertainty in Elevation Data for Geographical Analysis</a>. Proceedings of the
162 7th International Symposium on Spatial Data Handling, Delft,
163 Netherlands, August 1996.</li>
164
165 <li> Ehlschlaeger, C.R., Goodchild, M.F., 1994.
166 <a href="http://www.geo.hunter.cuny.edu/~chuck/acm/paper.html">Dealing
167 with Uncertainty in Categorical Coverage Maps: Defining, Visualizing,
168 and Managing Data Errors</a>. Proceedings, Workshop on Geographic Information
169 Systems at the Conference on Information and Knowledge Management, Gaithersburg
170 MD, 1994.</li>
171
172 <li> Ehlschlaeger, C.R., Goodchild, M.F., 1994.
173 <a href="http://www.geo.hunter.cuny.edu/~chuck/gislis/gislis.html">Uncertainty
174 in Spatial Data: Defining, Visualizing, and Managing Data
175 Errors</a>. Proceedings, GIS/LIS'94, pp. 246-253, Phoenix AZ,
176 1994.</li>
177 </ul>
178
179 <h2>SEE ALSO</h2>
180
181 <em>
182 <a href="r.random.html">r.random</a>,
183 <a href="r.random.cells.html">r.random.cells</a>,
184 <a href="r.mapcalc.html">r.mapcalc</a>,
185 <a href="r.surf.random.html">r.surf.random</a>
186 </em>
187
188 <h2>AUTHORS</h2>
189
190 Charles Ehlschlaeger, Michael Goodchild, and Chih-chang Lin; National Center
191 for Geographic Information and Analysis, University of California, Santa Barbara