Bug report #18908

SAGA algorithms not usable in Processing Modeler

Added by matteo ghetta over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Processing/Modeller
Affected QGIS version:3.1(master) Regression?:Yes
Operating System:any Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26740

Description

All the SAGA algorithms seems not usable in Processing Modeler. The same algorithms with the same data runs fine outside the Modeler. Here some other infos:

  • SAGA raster algorithms: the only way to have output is to save the outout raster as `sdat` file. Both temporary layers and other formats will fail:
Processing algorithm…
Algorithm 'model' starting…
Input parameters:
{ 'ras' : '/home/matteo/lavori/miei/QPROTO2/DTM.tif', 'saga:rastercalculator_1:fsa' : '/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/dcfb7760f5d54397ae189c1cd1238814/saga_rastercalculator_1_fsa.tif' }

Prepare algorithm: saga:rastercalculator_1
Running Raster calculator [1/1]
Input Parameters:
{ FORMULA: 'a*a', GRIDS: '/home/matteo/lavori/miei/QPROTO2/DTM.tif', RESAMPLING: 3, RESULT: '/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/dcfb7760f5d54397ae189c1cd1238814/saga_rastercalculator_1_fsa.tif', TYPE: 7, USE_NODATA: False, XGRIDS: ['/home/matteo/lavori/miei/QPROTO2/DTM.tif'] }
grid_calculus "Grid Calculator" -GRIDS "/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/2bbd3348cbef489a8e5dd89f0af54cb8/DTM.sgrd" -XGRIDS "/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/2bbd3348cbef489a8e5dd89f0af54cb8/DTM.sgrd" -FORMULA "a*a" -RESAMPLING 3 -USE_NODATA false -TYPE 7 -RESULT "/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/dcfb7760f5d54397ae189c1cd1238814/saga_rastercalculator_1_fsa.tif" 
____________________________

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

SAGA Version: 2.3.1

____________________________
library path: /usr/lib/x86_64-linux-gnu/saga/
library name: libgrid_calculus
library : Calculus
tool : Grid Calculator
author : A.Ringeler (c) 2003
processors : 4 [4]
____________________________

Load grid: /tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/2bbd3348cbef489a8e5dd89f0af54cb8/DTM.sgrd...

Parameters

Grid system: 10; 761x 718y; 346560.239738x 4899625.453186y
Grids: 1 object (DTM)
Grids from different Systems: 1 object (DTM)
Resampling: B-Spline Interpolation
Result: Result
Formula: a*a
Name: Calculation
Take Formula: no
Use NoData: no
Data Type: 4 byte floating point number

Warning: The number of supplied grids exceeds the number of variables in formula. (2 > 1)

OK. Execution took 1.543 s (1 outputs).
Model processed OK. Executed 1 algorithms total in 1.607 s.
Execution completed in 1.65 seconds
Results:
{'saga:rastercalculator_1:fsa': '/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/dcfb7760f5d54397ae189c1cd1238814/saga_rastercalculator_1_fsa.tif'}

Loading resulting layers
The following layers were not correctly generated.
/tmp/processing_9f73c2c2a9ec46afa0f9703f84015abb/dcfb7760f5d54397ae189c1cd1238814/saga_rastercalculator_1_fsa.tif
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

  • SAGA vector: no algorithms are working. No memory layers, no shapefile, no geopackage:
2018-05-04T14:10:09     CRITICAL    Traceback (most recent call last):
              File "/home/matteo/lavori/QGIS/newbuild/output/python/plugins/processing/algs/saga/SagaAlgorithm.py", line 203, in processAlgorithm
              self.tr('Unsupported file format'))
             _core.QgsProcessingException: Unsupported file format

Associated revisions

Revision f85a3d6b
Added by Nyall Dawson over 6 years ago

[processing][SAGA] Fix exposed output formats to include only those supported by SAGA

Refs #18908

Revision e91aed66
Added by Nyall Dawson over 6 years ago

[processing] Force model outputs to respect constraints set by
their underlying algorithm's provider

E.g. for model outputs generated by a saga algorithm, only
sdat and shp files are valid outputs. So only give users choices
of these instead of all formats.

Also fixes temporary file names generated as part of model
execution may use formats which are not compatible with the
algorithm's provider.

Fixes #18908

History

#1 Updated by Nyall Dawson over 6 years ago

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

Also available in: Atom PDF