Bug report #18751

SAGA raster calculator additional layer is not treated as optional

Added by matteo ghetta over 2 years ago. Updated about 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/SAGA
Affected QGIS version:master Regression?:Yes
Operating System:linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26638

Description

When performing a calculation on just one single raster layer the following error shows up:

Processing algorithm…
AlgorithmDialog
Input parameters:
{ 'FORMULA' : 'a * 10', 'GRIDS' : '/tmp/processing_0d84d0cba3f64eca9243f2ba5fdb600f/aa9dc0ddfbda469795eebb092d750248/slope.tif', 'RESAMPLING' : 3, 'RESULT' : '/tmp/processing_0d84d0cba3f64eca9243f2ba5fdb600f/4a80bd4893b2470b81b8cf4a6ccfe81b/RESULT.sdat', 'TYPE' : 7, 'USE_NODATA' : False, 'XGRIDS' : '' }

Traceback (most recent call last):
File "/home/matteo/lavori/QGIS/newbuild/output/python/plugins/processing/algs/saga/SagaAlgorithm.py", line 258, in processAlgorithm
command += ' -{} "{}"'.format(param.name(), ';'.join(self.exportedLayers[param.name()]))
KeyError: 'XGRIDS'

Execution failed after 0.05 seconds

Loading resulting layers
Algorithm 'Raster calculator' finished

so it seems that the additional layer box has to be filled up with some layers.

In fact, when adding a layer, even if not used in the formula, the calculation works nice.

Associated revisions

Revision 268aa171
Added by Nyall Dawson about 2 years ago

[processing][saga] Fix error in raster calculator

Fixes #18751

History

#1 Updated by Nyall Dawson about 2 years ago

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

Also available in: Atom PDF