Bug report #18870
SAGA ... Channel Network and Drainage Basins fails due to Threshold being passed as a Real when Integer is required
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/SAGA | ||
Affected QGIS version: | 3.1(master) | Regression?: | No |
Operating System: | Mac OS X 10.12.6 | Easy fix?: | Yes |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26702 |
Description
Processing > SAGA > Terrain Analysis - Channels > "Channel Network and Drainage Basins" requires only 2 inputs: Elevation (DEM file) and Threshold (Strahler) value.
In the Processing dialog, Threshold is handled as a Real (i.e., displayed as 5.000) and the function fails; the log messages panel contains "'5.0' is not a correct numeric value for option 'THRESHOLD'." and shows that the function call included "-THRESHOLD 5.0"
In the log's "Usage: saga_cmd ta_channels..." section it describes:
-THRESHOLD:<num> Threshold
Integer
Minimum: 1
Default: 5
Thus the problem appears to be caused by a Real format value being supplied where an Integer value is required.
This error does occur in QGIS 3.0.0, 3.0.1 and 3.0.2
This error does NOT occur in QGIS 2.18.15
Note: other SAGA routines also expect an integer Strahler Threshold value and might have similar issues.
If someone could tell me how to edit the call I would be happy to test if changing '5.0' to '5' solved the problem.
Related issues
Associated revisions
[processing][saga] Fix "channel network and drainage basins" alg
Fixes #18870
[processing][saga] Fix "channel network and drainage basins" alg
Fixes #18870
(cherry-picked from c2f224b446)
History
#1 Updated by Nyall Dawson over 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|c2f224b4462887bcc252a48b2c3c602bf5aee6bc.
#2 Updated by Jürgen Fischer over 6 years ago
- Related to Bug report #19205: SAGA -> Terrain Analysis - Profiles -> Cross profiles gets a float where an integer is required added