r.slopeunits.create
Create a raster layer of slope units
r.slopeunits.create [-gs] demmap=name [plainsmap=name] slumap=name [slumapvect=name] [circvarmap=name] [areamap=name] thresh=float areamin=float [areamax=float] cvmin=float rf=integer maxiteration=integer [generalize_treshold=float] [convergence=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.slopeunits.create demmap=name slumap=name thresh=0.0 areamin=0.0 cvmin=0.0 rf=0 maxiteration=0
grass.script.run_command("r.slopeunits.create", demmap, plainsmap=None, slumap, slumapvect=None, circvarmap=None, areamap=None, thresh, areamin, areamax=None, cvmin, rf, maxiteration, generalize_treshold=20, convergence=5, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("r.slopeunits.create", demmap="name", slumap="name", thresh=0.0, areamin=0.0, cvmin=0.0, rf=0, maxiteration=0)
grass.tools.Tools.r_slopeunits_create(demmap, plainsmap=None, slumap, slumapvect=None, circvarmap=None, areamap=None, thresh, areamin, areamax=None, cvmin, rf, maxiteration, generalize_treshold=20, convergence=5, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.r_slopeunits_create(demmap="name", slumap="name", thresh=0.0, areamin=0.0, cvmin=0.0, rf=0, maxiteration=0)
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
demmap=name [required]
Input digital elevation model
plainsmap=name
Input raster map of alluvial plains
slumap=name [required]
Output Slope Units layer (the main output)
slumapvect=name
Output Slope Units layer as vector layer
circvarmap=name
Output Circular Variance layer
areamap=name
Output Area layer; values in square meters
thresh=float [required]
Initial threshold (m^2).
areamin=float [required]
Minimum area (m^2) below which the slope unit is not further segmented
areamax=float
Maximum area (m^2) above which the slope unit is segmented irrespective of aspect
cvmin=float [required]
Minimum value of the circular variance (0.0-1.0) below which the slope unit is not further segmented
rf=integer [required]
Factor used to iterativelly reduce initial threshold: newthresh=thresh-thresh/reductionfactor
maxiteration=integer [required]
maximum number of iteration to do before the procedure is in any case stopped
generalize_treshold=float
Threshold for maximal tolerance value for v.generalize
Allowed values: 0-1000000000
Default: 20
convergence=integer
Convergence factor for MFD in r.watershed (1-10)
1 = most diverging flow, 10 = most converging flow. Recommended: 5
Default: 5
-g
Generalize Slope Units vector layer
-s
SFD (D8) flow in r.watershed (default is MFD)
SFD: single flow direction, MFD: multiple flow direction
--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
demmap : str, required
Input digital elevation model
Used as: input, raster, name
plainsmap : str, optional
Input raster map of alluvial plains
Used as: input, raster, name
slumap : str, required
Output Slope Units layer (the main output)
Used as: output, raster, name
slumapvect : str, optional
Output Slope Units layer as vector layer
Used as: output, vector, name
circvarmap : str, optional
Output Circular Variance layer
Used as: output, raster, name
areamap : str, optional
Output Area layer; values in square meters
Used as: output, raster, name
thresh : float, required
Initial threshold (m^2).
areamin : float, required
Minimum area (m^2) below which the slope unit is not further segmented
areamax : float, optional
Maximum area (m^2) above which the slope unit is segmented irrespective of aspect
cvmin : float, required
Minimum value of the circular variance (0.0-1.0) below which the slope unit is not further segmented
rf : int, required
Factor used to iterativelly reduce initial threshold: newthresh=thresh-thresh/reductionfactor
maxiteration : int, required
maximum number of iteration to do before the procedure is in any case stopped
generalize_treshold : float, optional
Threshold for maximal tolerance value for v.generalize
Allowed values: 0-1000000000
Default: 20
convergence : int, optional
Convergence factor for MFD in r.watershed (1-10)
1 = most diverging flow, 10 = most converging flow. Recommended: 5
Default: 5
flags : str, optional
Allowed values: g, s
g
Generalize Slope Units vector layer
s
SFD (D8) flow in r.watershed (default is MFD)
SFD: single flow direction, MFD: multiple flow direction
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
demmap : str | np.ndarray, required
Input digital elevation model
Used as: input, raster, name
plainsmap : str | np.ndarray, optional
Input raster map of alluvial plains
Used as: input, raster, name
slumap : str | type(np.ndarray) | type(np.array) | type(gs.array.array), required
Output Slope Units layer (the main output)
Used as: output, raster, name
slumapvect : str, optional
Output Slope Units layer as vector layer
Used as: output, vector, name
circvarmap : str | type(np.ndarray) | type(np.array) | type(gs.array.array), optional
Output Circular Variance layer
Used as: output, raster, name
areamap : str | type(np.ndarray) | type(np.array) | type(gs.array.array), optional
Output Area layer; values in square meters
Used as: output, raster, name
thresh : float, required
Initial threshold (m^2).
areamin : float, required
Minimum area (m^2) below which the slope unit is not further segmented
areamax : float, optional
Maximum area (m^2) above which the slope unit is segmented irrespective of aspect
cvmin : float, required
Minimum value of the circular variance (0.0-1.0) below which the slope unit is not further segmented
rf : int, required
Factor used to iterativelly reduce initial threshold: newthresh=thresh-thresh/reductionfactor
maxiteration : int, required
maximum number of iteration to do before the procedure is in any case stopped
generalize_treshold : float, optional
Threshold for maximal tolerance value for v.generalize
Allowed values: 0-1000000000
Default: 20
convergence : int, optional
Convergence factor for MFD in r.watershed (1-10)
1 = most diverging flow, 10 = most converging flow. Recommended: 5
Default: 5
flags : str, optional
Allowed values: g, s
g
Generalize Slope Units vector layer
s
SFD (D8) flow in r.watershed (default is MFD)
SFD: single flow direction, MFD: multiple flow direction
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | np.ndarray | tuple[np.ndarray] | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None
will be returned. If an array type (e.g., np.ndarray) is used for one of the raster outputs, the result will be an array and will have the shape corresponding to the computational region. If an array type is used for more than one raster output, the result will be a tuple of arrays.
DESCRIPTION
r.slopeunits.create creates a raster layer of slope units. Optionally, a vector map can be created.
EXAMPLE
r.slopeunits.create \
demmap=dem_italia_isolegrandi@su_test \
plainsmap=flat \
slumap=su_tmp \
thresh=250000 \
areamin=200000 \
cvmin=0.25 \
rf=2 \
maxiteration=50
REFERENCES
- Alvioli, M., Marchesini, I., Reichenbach, P., Rossi, M., Ardizzone, F., Fiorucci, F., and Guzzetti, F. (2016): Automatic delineation of geomorphological slope units with r.slopeunits v1.0 and their optimization for landslide susceptibility modeling, Geosci. Model Dev., 9, 3975-3991. DOI:10.5194/gmd-9-3975-2016
- Alvioli, M., Guzzetti, F., & Marchesini, I. (2020): Parameter-free delineation of slope units and terrain subdivision of Italy. Geomorphology, 358, 107124. DOI:10.1016/j.geomorph.2020.107124
SEE ALSO
r.slopeunits.clean, r.slopeunits.metrics, r.slopeunits.optimize
AUTHORS
Main authors: Ivan Marchesini, Massimiliano Alvioli, CNR-IRPI
Markus Metz (refactoring), mundialis
SOURCE CODE
Available at: r.slopeunits.create source code
(history)
Latest change: Wednesday May 07 16:16:50 2025 in commit 8af96b6