Skip to content

r.spreadpath

Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.

r.spreadpath x_input=name y_input=name [coordinates=east,north [,east,north,...]] output=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.spreadpath x_input=name y_input=name output=name

grass.script.run_command("r.spreadpath", x_input, y_input, coordinates=None, output, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.spreadpath", x_input="name", y_input="name", output="name")

Parameters

x_input=name [required]
    Name of raster map containing back-path easting information
y_input=name [required]
    Name of raster map containing back-path northing information
coordinates=east,north [,east,north,...]
    The map E and N grid coordinates of starting points
output=name [required]
    Name for output raster map
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

x_input : str, required
    Name of raster map containing back-path easting information
    Used as: input, raster, name
y_input : str, required
    Name of raster map containing back-path northing information
    Used as: input, raster, name
coordinates : list[tuple[float, float]] | tuple[float, float] | list[float] | str, optional
    The map E and N grid coordinates of starting points
    Used as: input, coords, east,north
output : str, required
    Name for output raster map
    Used as: output, raster, name
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r.spreadpath is part of the wildfire simulation toolset. Preparational steps for the fire simulation are the calculation of the rate of spread (ROS) with r.ros, and the creating of spread map with r.spread. Eventually, the fire path(s) based on starting point(s) are calculated with r.spreadpath.

r.spreadpath recursively traces the least cost path backwards to the origin, given backlink information input map layers and target locations from where paths are to be traced. The backlink information map layers record each cell's backlink UTM northing (the y_input) and easting (the x_input) coordinates from which the cell's cumulative cost was determined.

The backlink inputs can be generated from another GRASS raster program r.spread. One of the major applications of r.spreadpath along with r.spread is to accurately find the least cost corridors and/or paths on a raster setting. More information on r.spread and r.spreadpath can be found in Xu (1994).

Parameters

x_input=name
Name of input raster map layer containing backlink UTM easting coordinates.

y_input=name
Name of input raster map layer containing backlink UTM northing coordinates.

coordinates=x,y[,x,y,x,y, ...]
Each x,y coordinate pair gives the easting and northing (respectively) geographic coordinates of a target point from which to backwards trace the least cost path. As many points as desired can be entered by the user.

output=name
Name of raster map layer to contain output. Also can be used as the map layer of the input target points. If so used, the input target point map will be overwritten by the output.

REFERENCES

  • Xu, Jianping, 1994, Simulating the spread of wildfires using a geographic information system and remote sensing, Ph. D. Dissertation, Rutgers University, New Brunswick, New Jersey (ref).

SEE ALSO

r.spread, r.ros Sample data download: firedemo.sh (run this script within the "Fire simulation data set" project).

AUTHORS

Jianping Xu and Richard G. Lathrop, Jr., Center for Remote Sensing and Spatial Analysis, Rutgers University.

SOURCE CODE

Available at: r.spreadpath source code (history)
Latest change: Monday Feb 24 16:07:55 2025 in commit 4ab71fd