Bug report #18870

SAGA ... Channel Network and Drainage Basins fails due to Threshold being passed as a Real when Integer is required

Added by Garth Fletcher over 1 year ago. Updated over 1 year ago.

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

Related to QGIS Application - Bug report #19205: SAGA -> Terrain Analysis - Profiles -> Cross profiles get... Closed 2018-06-16

Associated revisions

Revision c2f224b4
Added by Nyall Dawson over 1 year ago

[processing][saga] Fix "channel network and drainage basins" alg

Fixes #18870

Revision d15b9016
Added by Nyall Dawson over 1 year ago

[processing][saga] Fix "channel network and drainage basins" alg

Fixes #18870

(cherry-picked from c2f224b446)

History

#1 Updated by Nyall Dawson over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#2 Updated by Jürgen Fischer about 1 year ago

  • Related to Bug report #19205: SAGA -> Terrain Analysis - Profiles -> Cross profiles gets a float where an integer is required added

Also available in: Atom PDF