Bug report #16982

TauDEM Stream and watershed delineation

Added by Cecile Kittel almost 7 years ago. Updated almost 7 years ago.

Assignee:Alexander Bruy
Affected QGIS version:2.18.9 Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24881


There is an issue with how QGIS calls the TauDEM executable "StreamNet" from the command line. The "delineate single watershed" option has the reverse effect: leaving the box unchecked results in a single watershed, whilst checking the box leads to multiple subwatersheds being delineated.

The issue is due to the "-sw" flag (single watershed option): in the description, the boolean parameter value for the "-sw" parameter is set by default to "False" and in the python script "../python/plugins/processing/algs/taudem/TauDEMAlgorithm.py" line 114-116

elif isinstance(param, ParameterBoolean):
if not param.value:
a None value results in the parameter name, in this case "-sw" being appended to the command line. A simple fix is to edit line 115 to (see attached file)
" if param.value:"

which ensures that the flag is only added when a user checks the option, giving the parameter a value of 1, as expected.

TauDEMAlgorithm.py Magnifier (4.92 KB) Cecile Kittel, 2017-08-07 01:49 PM


#1 Updated by Giovanni Manghi almost 7 years ago

  • Operating System deleted (Windows 7)
  • Assignee changed from Victor Olaya to Giovanni Manghi

#2 Updated by Alexander Bruy almost 7 years ago

  • Assignee changed from Giovanni Manghi to Alexander Bruy

#3 Updated by Alexander Bruy almost 7 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Should be fixed

Also available in: Atom PDF