Bug report #16880

SAGA Catchment Area tool not working

Added by Mario Reyes over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:High
Assignee:Giovanni Manghi
Category:Processing/SAGA
Affected QGIS version:2.18.10 Regression?:No
Operating System:Windows 32 bits Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24779

Description

I'm trying to use the SAGA Catchment Area tool within QGIS and I don`t get a result. The log file is the following:

2017-07-17T00:58:58    0    SAGA execution commands
            io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\207375cf6c214fc29b38c563de21ea7b\demssnad27lcc.sgrd" -FILES "C:/Users/Leslie/Documents/Curso QGIS II/Practica 3 Hidrologia/datos_practica/dem_ss_nad27lcc.tif" 
            ta_preprocessor "Fill Sinks (Wang & Liu)"  -ELEV "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\207375cf6c214fc29b38c563de21ea7b\demssnad27lcc.sgrd" -MINSLOPE 0.01 -FILLED "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\8fb1dc9374ee4cea93f13f58b828018c\FILLED.sdat" -FDIR "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\e9023bec26954e91a5cf2e01f43df720\FDIR.sdat" -WSHED "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\a8fe1bc1b8684dc9b3297c2fdf1188b9\WSHED.sdat" 
2017-07-17T00:59:32    0    Salida de la consola de ejecución de SAGA

            C:\PROGRA~1\QGIS2~1.18\bin>set SAGA=C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr

            C:\PROGRA~1\QGIS2~1.18\bin>set SAGA_MLB=C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr\modules

            C:\PROGRA~1\QGIS2~1.18\bin>PATH=C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg\shapely\DLLs;C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs;C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\numpy\core;C:\PROGRA~1\QGIS2~1.18\apps\qgis\bin;C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\lib;C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\bin;{app};C:\PROGRA~1\QGIS2~1.18\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\PROGRA~1\QGIS2~1.18\apps\Python27\Scripts;C:\Program Files\R\R-3.4.0\bin\i386;C:\Program Files\RStudio\bin;C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr;C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr\modules

            C:\PROGRA~1\QGIS2~1.18\bin>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\207375cf6c214fc29b38c563de21ea7b\demssnad27lcc.sgrd" -FILES "C:/Users/Leslie/Documents/Curso QGIS II/Practica 3 Hidrologia/datos_practica/dem_ss_nad27lcc.tif" 
            ____________________________

            #####   ##   #####    ##
            ###     ###  ##       ###
            ###   # ## ##  #### # ##
            ### ##### ##    # #####
            ##### #   ##  ##### #   ##
            ____________________________

            SAGA Version: 2.3.2 (32 bit)

            ____________________________
            library path: C:\PROGRA~1\QGIS2~1.18\apps\saga-ltr\modules\
            library name: io_gdal
            library     : GDAL/OGR
            tool        : Import Raster
            author      : O.Conrad (c) 2007 (A.Ringeler)
            processors  : 2 [2]
            ____________________________

            Parameters

            Grids: No objects
            Files: "C:/Users/Leslie/Documents/Curso QGIS II/Practica 3 Hidrologia/datos_practica/dem_ss_nad27lcc.tif" 
            Select from Multiple Bands:
            Alphanumeric Sorting: yes
            Transformation: yes
            Resampling: B-Spline Interpolation

            loading: C:/Users/Leslie/Documents/Curso QGIS II/Practica 3 Hidrologia/datos_practica/dem_ss_nad27lcc.tif

            Driver: GTiff

            Bands: 1

            Rows: 1362

            Columns: 1144

            loading: dem_ss_nad27lcc

            C:\PROGRA~1\QGIS2~1.18\bin>saga_cmd ta_preprocessor "Fill Sinks (Wang & Liu)"  -ELEV "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\207375cf6c214fc29b38c563de21ea7b\demssnad27lcc.sgrd" -MINSLOPE 0.01 -FILLED "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\8fb1dc9374ee4cea93f13f58b828018c\FILLED.sdat" -FDIR "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\e9023bec26954e91a5cf2e01f43df720\FDIR.sdat" -WSHED "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\a8fe1bc1b8684dc9b3297c2fdf1188b9\WSHED.sdat" 
            ____________________________

            #####   ##   #####    ##
            ###     ###  ##       ###
            ###   # ## ##  #### # ##
            ### ##### ##    # #####
            ##### #   ##  ##### #   ##
            ____________________________

            SAGA Version: 2.3.2 (32 bit)

            ____________________________
            library path: C:\PROGRA~1\QGIS2~1.18\apps\saga-ltr\modules\
            library name: ta_preprocessor
            library     : Preprocessing
            tool        : Fill Sinks (Wang & Liu)
            author      : Copyrights (c) 2007 by Volker Wichmann
            processors  : 2 [2]
            ____________________________

            Load grid: C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\207375cf6c214fc29b38c563de21ea7b\demssnad27lcc.sgrd...

            Parameters

            Grid system: 30.325388; 1362x 1144y; 463349.588191x 267606.598769y
            DEM: demssnad27lcc
            Filled DEM: Filled DEM
            Flow Directions: Flow Directions
            Watershed Basins: Watershed Basins
            Minimum Slope [Degree]: 0.010000

            Save grid: C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\e9023bec26954e91a5cf2e01f43df720\FDIR.sdat...

            Save grid: C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\a8fe1bc1b8684dc9b3297c2fdf1188b9\WSHED.sdat...

            C:\PROGRA~1\QGIS2~1.18\bin>exit
2017-07-17T01:00:03    0    SAGA execution commands
            ta_hydrology "Flow Accumulation (Top-Down)"  -ELEVATION "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\8fb1dc9374ee4cea93f13f58b828018c\FILLED.sgrd" -METHOD 0 -CAREA "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\ef8b47abf5f14cdfba5fb1aef6bc881b\CAREA.sdat" 
2017-07-17T01:00:14    0    Salida de la consola de ejecución de SAGA

            C:\PROGRA~1\QGIS2~1.18\bin>set SAGA=C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr

            C:\PROGRA~1\QGIS2~1.18\bin>set SAGA_MLB=C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr\modules

            C:\PROGRA~1\QGIS2~1.18\bin>PATH=C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg\shapely\DLLs;C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs;C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\numpy\core;C:\PROGRA~1\QGIS2~1.18\apps\qgis\bin;C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\lib;C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.1\bin;{app};C:\PROGRA~1\QGIS2~1.18\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\PROGRA~1\QGIS2~1.18\apps\Python27\Scripts;C:\Program Files\R\R-3.4.0\bin\i386;C:\Program Files\RStudio\bin;C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr;C:/PROGRA~1/QGIS2~1.18/apps\saga-ltr\modules

            C:\PROGRA~1\QGIS2~1.18\bin>saga_cmd ta_hydrology "Flow Accumulation (Top-Down)"  -ELEVATION "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\8fb1dc9374ee4cea93f13f58b828018c\FILLED.sgrd" -METHOD 0 -CAREA "C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\ef8b47abf5f14cdfba5fb1aef6bc881b\CAREA.sdat" 
            Unknown option 'CAREA'
            ____________________________

            #####   ##   #####    ##
            ###     ###  ##       ###
            ###   # ## ##  #### # ##
            ### ##### ##    # #####
            ##### #   ##  ##### #   ##
            ____________________________

            SAGA Version: 2.3.2 (32 bit)

            ____________________________
            library path: C:\PROGRA~1\QGIS2~1.18\apps\saga-ltr\modules\
            library name: ta_hydrology
            library     : Hydrology
            tool        : Flow Accumulation (Top-Down)
            author      : O.Conrad (c) 2001-2016, T.Grabs portions (c) 2010
            processors  : 2 [2]
            ____________________________

            Usage: saga_cmd ta_hydrology 0 [-ELEVATION <str>] [-SINKROUTE <str>] [-WEIGHTS <str>] [-FLOW <str>] [-VAL_INPUT <str>] [-VAL_MEAN <str>] [-ACCU_MATERIAL <str>] [-ACCU_TARGET <str>] [-ACCU_TOTAL <str>] [-ACCU_LEFT <str>] [-ACCU_RIGHT <str>] [-STEP <num>] [-FLOW_UNIT <str>] [-FLOW_LENGTH <str>] [-LINEAR_VAL <str>] [-LINEAR_DIR <str>] [-METHOD <str>] [-LINEAR_DO <str>] [-LINEAR_MIN <num>] [-CONVERGENCE <double>] [-NO_NEGATIVES <str>] [-WEIGHT_LOSS <str>]
            -ELEVATION:<str>         Elevation
            Grid (input)
            -SINKROUTE:<str>         Sink Routes
            Grid (optional input)
            -WEIGHTS:<str>           Weights
            Grid (optional input)
            -FLOW:<str>              Flow Accumulation
            Grid (output)
            -VAL_INPUT:<str>         Input for Mean over Catchment
            Grid (optional input)
            -VAL_MEAN:<str>          Mean over Catchment
            Grid (output)
            -ACCU_MATERIAL:<str>     Material for Accumulation
            Grid (optional input)
            -ACCU_TARGET:<str>       Accumulation Target
            Grid (input)
            -ACCU_TOTAL:<str>        Accumulated Material
            Grid (optional output)
            -ACCU_LEFT:<str>         Accumulated Material (Left Side)
            Grid (optional output)
            -ACCU_RIGHT:<str>        Accumulated Material (Right Side)
            Grid (optional output)
            -STEP:<num>              Step
            Integer
            Minimum: 1
            Default: 1
            -FLOW_UNIT:<str>         Flow Accumulation Unit
            Choice
            Available Choices:
            [0] number of cells
            [1] cell area
            Default: 1
            -FLOW_LENGTH:<str>       Flow Path Length
            Grid (optional output)
            -LINEAR_VAL:<str>        Linear Flow Threshold Grid
            Grid (optional input)
            -LINEAR_DIR:<str>        Channel Direction
            Grid (optional input)
            -METHOD:<str>            Method
            Choice
            Available Choices:
            [0] Deterministic 8
            [1] Rho 8
            [2] Braunschweiger Reliefmodell
            [3] Deterministic Infinity
            [4] Multiple Flow Direction
            [5] Multiple Triangular Flow Directon
            [6] Multiple Maximum Downslope Gradient Based Flow Directon
            Default: 4
            -LINEAR_DO:<str>         Thresholded Linear Flow
            Boolean
            Default: 0
            -LINEAR_MIN:<num>        Linear Flow Threshold
            Integer
            Default: 500
            -CONVERGENCE:<double>    Convergence
            Floating point
            Minimum: 0.000000
            Default: 1.100000
            -NO_NEGATIVES:<str>      Prevent Negative Flow Accumulation
            Boolean
            Default: 1
            -WEIGHT_LOSS:<str>       Loss through Negative Weights
            Grid (optional output)

            C:\PROGRA~1\QGIS2~1.18\bin>exit
2017-07-17T01:00:14    2    Error loading result layer:
            Traceback (most recent call last):
              File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\gui\Postprocessing.py", line 77, in handleAlgorithmResults
                isRaster)
              File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\tools\dataobjects.py", line 187, in load
                + '\nCheck the processing framework log to look for errors')
            RuntimeError: Could not load layer: C:\Users\Leslie\AppData\Local\Temp\processing30ebabc0f3844302af111e184a46deea\ef8b47abf5f14cdfba5fb1aef6bc881b\CAREA.sdat
            Check the processing framework log to look for errors

Thanks.

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Feedback

do you installed with the standalone or osgeo4w installer? if the latter what saga version have you installed and using, 2.1.2 or 2.3.2?

#2 Updated by Giovanni Manghi over 7 years ago

  • Assignee changed from Victor Olaya to Giovanni Manghi

#3 Updated by Mario Reyes over 7 years ago

Giovanni Manghi wrote:

do you installed with the standalone or osgeo4w installer? if the latter what saga version have you installed and using, 2.1.2 or 2.3.2?

I installed QGIS using the stand-alone installer. Thanks.

#4 Updated by Giovanni Manghi over 7 years ago

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

Fixed here: https://github.com/qgis/QGIS/pull/4895

if you don't want to wait for the new point release of 2.18 you can easily apply by hand the changes, is just a matter of edit the description file with the correct parameter names.

#5 Updated by Mario Reyes over 7 years ago

Giovanni Manghi wrote:

Fixed here: https://github.com/qgis/QGIS/pull/4895

if you don't want to wait for the new point release of 2.18 you can easily apply by hand the changes, is just a matter of edit the description file with the correct parameter names.

Thanks. Just a question, every time someone fixes a bug, do I have to wait for the next release or is it fixed if I download and install QGIS again?

#6 Updated by Giovanni Manghi over 7 years ago

Thanks. Just a question, every time someone fixes a bug, do I have to wait for the next release or is it fixed if I download and install QGIS again?

if you don't want to manually apply the changes (as you can do easily as are in parts of the code is interpreted and not compiled) you need to wait for a new version or point release.

Also available in: Atom PDF