r.surf.random(1grass)
β¨ r.surf.random β the GRASS User's Manual, bestie edition β¨
okay so welcome to r.surf.random, a lil module from the GRASS fam (that's the manual name babe, r.surf.random(1grass)) that literally just makes a raster surface map full of uniform random deviates in whatever range you feel like. no cap. π²π
π NAME π
r.surf.random β produces a raster surface map of uniform random deviates with a defined range. it's giving "chaos, but make it spatial" π
π·οΈ KEYWORDS π·οΈ
raster, surface, random β yes those are the tags, and yes they're accurate, periodt.
π SYNOPSIS π
r.surf.random
r.surf.random --help
r.surf.random [-i] output=name [min=float] [max=float]
[seed=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
π© Flags π©
-iβ create an integer raster map. whole numbers only bestie, no decimals allowed π§--overwriteβ lets output files overwrite existing files. use with intention okay, this one is powerful π--helpβ prints the usage summary. when you're lost, she's there π«Ά--verboseβ verbose module output. she tells you everything π¬--quietβ quiet module output. she tells you nothing π€«--uiβ force launching the GUI dialog. for the visual girlies π
ποΈ Parameters ποΈ
output=name[required] β name for the output raster map. you MUST name your baby, there's no skipping this one πmin=floatβ minimum random value. default:0max=floatβ maximum random value. default:100seed=integerβ seed value for the random number generator. using the same seed ensures identical results, while a randomly generated seed produces different outcomes in each run. lowkey the most important knob here for reproducibility fr fr π±
π« DESCRIPTION π«
so r.surf.random produces a raster map layer of uniform random deviates whose range can be expressed by the user. it's essentially the same as r.surf.gauss, but uses a linear random number generator instead. iconic sibling energy honestly πΈ
under the hood it uses the random number generator drand48() or rand(), depending on the user's platform. so whichever one your machine vibes with, that's the one you get π¦
π₯ EXAMPLE π₯
first set up your region:
g.region -p n=228500 s=215000 w=630000 e=645000 res=10
r.surf.random out=random min=0 max=100
# check result
r.univar random
Figure: Random surface example (min: 10; max: 100)
with the histogram tool the cell values versus count can be shown. yes bestie, you can literally see the distribution and it's so satisfying πβ¨
Figure: Histogram of random surface example (min: 10; max: 100)
π SEE ALSO π
r.random.surface, r.surf.contour, r.surf.fractal, r.surf.gauss, r.surf.idw, v.surf.rst
(the whole surf squad, go check them out, they ate π )
π AUTHOR π
Jo Wood Midlands Regional Research Laboratory (ASSIST) University of Leicester October 1991
shoutout to Jo for real, an absolute legend since '91 π°οΈπ
π¦ SOURCE CODE π¦
Available at: r.surf.random source code (history)
Latest change: Thursday May 08 20:58:05 2025 in commit: 4144ba81fa125e1549fc52e1cf5feb4fa004be8b
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie!! π this gorgeous lil manpage lives in GRASS 8.5.0, and we're sending it off with a mwah π β go make some random surfaces, stay reproducible, and don't forget your seed πβ¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms