GRASS logo

Note: This document is for an older version of GRASS GIS that will be discontinued soon. 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

Table of contents

DESCRIPTION

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.

EXAMPLE

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)

SEE ALSO

r.surf.fractal, r.surf.random

AUTHOR

Corey T. White, NCSU GeoForAll Lab

SOURCE CODE

Available at: r.random.walk source code (history)

Latest change: Monday Jun 24 08:16:48 2024 in commit: 8939a985d18de5366340b88037ab0fe3a0814c9b


Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual