r.threshold
Find optimal threshold for stream extraction
r.threshold [-g] acc=acc [--verbose] [--quiet] [--qq] [--ui]
Example:
r.threshold acc=acc
grass.script.parse_command("r.threshold", acc, flags=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.parse_command("r.threshold", acc="acc")
grass.tools.Tools.r_threshold(acc, flags=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.r_threshold(acc="acc")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
acc=acc [required]
    Name of accumulation raster map
-g
    Print the threshold value in shell script style
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog
acc : str, required
    Name of accumulation raster map
    Used as: input, raster, acc
flags : str, optional
    Allowed values: g
    g
        Print the threshold value in shell script style
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  
acc : str, required
    Name of accumulation raster map
    Used as: input, raster, acc
flags : str, optional
    Allowed values: g
    g
        Print the threshold value in shell script style
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 | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None will be returned.
Raises:
grass.tools.ToolError: When the tool ended with an error.
DESCRIPTION
r.threshold finds optimal threshold for stream extraction.
NOTES
The module finds a first tentative value of upslope area to be used as input to extract the river network using r.stream.extract or r.watershed. Real streams depend on many factors, such as rainfall, infiltration rate, geology, climate etc. i.e. the same topography in different parts of the world yields different real stream networks. This approach provides a best guess about what makes sense when looking only at the DEM.
EXAMPLE
r.threshold acc=accumulation_map
SEE ALSO
AUTHOR
Margherita Di Leo (dileomargherita AT gmail DOT com)
SOURCE CODE
Available at: r.threshold source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819