Note: This document is for an older version of GRASS GIS that has been discontinued. You should upgrade, and read the current manual page.
NAME
r.random.walk - Performs a 2D random walk inside the computational region and returns the resulting walk.
KEYWORDS
raster,
random,
walk,
surface,
parallel
SYNOPSIS
r.random.walk
r.random.walk --help
r.random.walk [-ast] output=name [steps=integer] [directions=string] [memory=memory in MB] [seed=integer] [nprocs=integer] [nwalkers=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -a
- Perform a self-avoiding random walk
- -s
- Generate random seed (result is non-deterministic).
- -t
- Each walker starts from the same point.
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- output=name [required]
- Name for output raster map
- steps=integer
- How many steps to take during walk.
- Default: 100000
- directions=string
- How many directions should be used during walk.
- Options: 4, 8
- Default: 4
- memory=memory in MB
- Maximum memory to be used (in MB)
- Cache size for raster rows
- Default: 300
- seed=integer
- Seed for random number generator
- nprocs=integer
- Number of threads for parallel computing
- Default: 1
- nwalkers=integer
- Number of walkers.
- Default: 1
The
r.random.walk module generates a 2D random walk across the current computational region.
The module provides control of the number of steps and directions (4 or 8) a walker can take and allows
the walker's behavior to be set to be self-avoiding (Madras et al., 1996) or allow revisits. The output displays
the frequency the walker visited each cell or the average frequency. The module can run multiple walks in
parallel. It either samples the same starting location for each walk or generates a unique starting position
for each walker.
Using the North Carolina full sample dataset:
# set computational region
g.region raster=elevation -p
# calculate smoothed random walk from a single starting locations.
r.random.walk -at output=random_walk_smooth_paths directions=8 steps=100000 memory=1800 seed=1 nprocs=6 nwalkers=100
Smoothed random walk (Single Starting Location)
# calculate smoothed random walk from a multiple starting locations.
r.random.walk -as output=random_walk_smooth directions=8 steps=100000 memory=1800 nprocs=6 nwalkers=100
Smoothed random walk (Multiple Starting Locations)
r.surf.fractal,
r.surf.random
Corey T. White,
NCSU GeoForAll Lab
SOURCE CODE
Available at:
r.random.walk source code
(history)
Latest change: Sunday Aug 18 16:05:40 2024 in commit: f9d320e265329f9ec47c8a5ff0ce4876aa53e3e0
Main index |
Raster index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2024
GRASS Development Team,
GRASS GIS 8.3.3dev Reference Manual