r.random.surface(1grass) | GRASS GIS User's Manual | r.random.surface(1grass) |
r.random.surface - Generates random surface(s) with spatial dependence.
raster, surface, random
r.random.surface
r.random.surface --help
r.random.surface [-u]
output=string[,string,...]
[distance=float] [exponent=float]
[flat=float] [seed=integer]
[high=integer] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
r.random.surface generates a spatially dependent random surface. The random surface is composed of values representing the deviation from the mean of the initial random values driving the algorithm. The initial random values are independent Gaussian random deviates with a mean of 0 and standard deviation of 1. The initial values are spread over each output map using filter(s) of diameter distance. The influence of each random value on nearby cells is determined by a distance decay function based on exponent. If multiple filters are passed over the output maps, each filter is given a weight based on the weight inputs. The resulting random surface can have any mean and variance, but the theoretical mean of an infinitely large map is 0.0 and a variance of 1.0. Description of the algorithm is in the NOTES section.
The random surface generated are composed of floating point numbers, and saved in the category description files of the output map(s). Cell values are uniformly or normally distributed between 1 and high values inclusive (determined by whether the -u flag is used). The category names indicate the average floating point value and the range of floating point values that each cell value represents.
r.random.surface’s original goal is to generate random fields for spatial error modeling. A procedure to use r.random.surface in spatial error modeling is given in the NOTES section.
While most literature uses the term random field instead of random surface, this algorithm always generates a surface. Thus, its use of random surface.
r.random.surface builds the random surface using a filter algorithm smoothing a map of independent random deviates. The size of the filter is determined by the largest distance of spatial dependence. The shape of the filter is determined by the distance decay exponent(s), and the various weights if different sets of spatial parameters are used. The map of independent random deviates will be as large as the current region PLUS the extent of the filter. This will eliminate edge effects caused by the reduction of degrees of freedom. The map of independent random deviates will ignore the current mask for the same reason.
One of the most important uses for r.random.surface is to determine how the error inherent in raster maps might effect the analyses done with those maps.
Generate a random surface (using extent of North Carolina sample
dataset):
g.region raster=elevation res=100 -p r.surf.random output=randomsurf min=10 max=100 # verify distribution r.univar -e map=randomsurf
Figure: Random surface example (min: 10; max: 100)
With the histogram tool the cell values versus count can be shown.
Figure: Histogram of random surface example (min: 10; max: 100)
Random Field Software for GRASS by Chuck Ehlschlaeger
As part of my dissertation, I put together several programs that help GRASS (4.1 and beyond) develop uncertainty models of spatial data. I hope you find it useful and dependable. The following papers might clarify their use:
r.random, r.random.cells, r.mapcalc, r.surf.random
Charles Ehlschlaeger, Michael Goodchild, and Chih-chang Lin; National Center for Geographic Information and Analysis, University of California, Santa Barbara
Available at: r.random.surface source code (history)
Accessed: Sunday Jan 22 07:36:25 2023
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
GRASS 8.2.1 |