r.slopeunits.clean
Clean results of r.slopeunits.create
r.slopeunits.clean [-mn] demmap=name [plainsmap=name] slumap=name [slumapclean=name] cleansize=float [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.slopeunits.clean demmap=name slumap=name cleansize=25000
grass.script.run_command("r.slopeunits.clean", demmap, plainsmap=None, slumap, slumapclean=None, cleansize=25000, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("r.slopeunits.clean", demmap="name", slumap="name", cleansize=25000)
grass.tools.Tools.r_slopeunits_clean(demmap, plainsmap=None, slumap, slumapclean=None, cleansize=25000, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.r_slopeunits_clean(demmap="name", slumap="name", cleansize=25000)
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]
Input Slope Units layer (the main input)
slumapclean=name
Output Slope Units layer, cleaned (the main output)
cleansize=float [required]
Slope Units size to be removed
Default: 25000
-m
Perform quick cleaning of small-sized areas and stripes
-n
Perform detailed cleaning of small-sized areas (slow)
--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
Input Slope Units layer (the main input)
Used as: input, raster, name
slumapclean : str, optional
Output Slope Units layer, cleaned (the main output)
Used as: output, raster, name
cleansize : float, required
Slope Units size to be removed
Default: 25000
flags : str, optional
Allowed values: m, n
m
Perform quick cleaning of small-sized areas and stripes
n
Perform detailed cleaning of small-sized areas (slow)
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 | np.ndarray, required
Input Slope Units layer (the main input)
Used as: input, raster, name
slumapclean : str | type(np.ndarray) | type(np.array) | type(gs.array.array), optional
Output Slope Units layer, cleaned (the main output)
Used as: output, raster, name
cleansize : float, required
Slope Units size to be removed
Default: 25000
flags : str, optional
Allowed values: m, n
m
Perform quick cleaning of small-sized areas and stripes
n
Perform detailed cleaning of small-sized areas (slow)
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.clean cleans slope units layer, e.g. results of r.slopeunits.create.
EXAMPLE
r.slopeunits.clean \
demmap=dem_italia_isolegrandi@su_test \
plainsmap=flat \
slumap=su_tmp \
slumapclean=su_tmp_cl \
cleansize=25000 \
-m
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.create, r.slopeunits.metrics, r.slopeunits.optimize
AUTHORS
Main authors: Ivan Marchesini, Massimiliano Alvioli, CNR-IRPI
Markus Metz (refactoring, translation of "clean_method_3" to python),
Carmen Tawalika (creation of extra addon),
mundialis
SOURCE CODE
Available at: r.slopeunits.clean source code
(history)
Latest change: Wednesday May 07 16:16:50 2025 in commit 8af96b6