I want to sum the cell values from 3 grids. I have a list of file paths (temp layers) generated in a "for" loop, looking like the following one. I cannot understand why the function makes some transformations and takes 7 input grids, when it should load and sum 3 grids.
If I sum these files in SAGA GUI, the result is the expected one. But when I sum the files using PyQGIS, the last raster is summed 7 times (see the end of the log).
Can anyone help me?
Here is my code:
s1 = "E:/rcal/OUTPUT11.sdat"
s2 = "E:/rcal/OUTPUT22.sdat"
s3 = "E:/rcal/OUTPUT33.sdat"
list = [s1,s2,s3]
result = processing.runalg('saga:gridssum',list, None)
And this is the processing log:
##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
_____________________________________________
_____________________________________________
library path: C:\PROGRA~1\QGIS2~1.18\apps\saga\modules\grid_calculus.dll
library name: Grid - Calculus
tool name : Grids Sum
author : O. Conrad (c) 2010
_____________________________________________
Parameters
Grids: No objects
Files: E:/rcal/OUTPUT11.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT11.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT11)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT22)
Files: E:/rcal/OUTPUT11.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT11.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT11)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT22)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT22)
Files: E:/rcal/OUTPUT11.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT11.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT11)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT22)
Files: E:/rcal/OUTPUT11.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT11.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT11)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grids: 1 object (OUTPUT22)
Files: E:/rcal/OUTPUT22.sdat
Transformation: yes
Interpolation: B-Spline Interpolation
loading: E:/rcal/OUTPUT22.sdat
Driver: SAGA
Bands: 1
Rows: 177
Columns: 139
Transformation:
x' = 381422.717257 + x * 5.000000 + y * 0.000000
y' = 433062.210367 + x * 0.000000 + y * -5.000000
loading band [1/1]
Parameters
Grid system: 5; 177x 139y; 381425.217257x 432369.710367y
Grids: 7 objects (OUTPUT33, OUTPUT33, OUTPUT33, OUTPUT33, OUTPUT33, OUTPUT33, OUTPUT33)
Sum: Sum
Error: >> WKT: unknown projection [Double_Stereographic]
Error: >> WKT: unknown projection [Double_Stereographic]
C:\PROGRA~1\QGIS2~1.18\bin>exit