Is there any way to add multiple grids on the first parameter of saga:rastercalculator?
If I added one file as string at first parameters and the other files at second parameter as list, the algorithm worked, but it resampled my data and I don't need this.
I have some raster files with the same grid system generated in a for loop. I want to sum their values in a single raster.
This is my code:
s1 = 'C:/Users/.../OUTPUT.sdat'
s2 = 'C:/Users/.../OUTPUT.sdat'
s3 = 'C:/Users/.../OUTPUT.sdat'
list = [s1,s2,s3]
rezult = processing.runalg('saga:rastercalculator', list, [], "g1+g2+g3", True, 8, None)
To simplify the code above, I used the files path as a string, but in my algorythm, the files paths are dynamically added to the list and the formula is dynamically updated.
When I run the above code, I get this error:
Wrong parameter value: ['C:/Users/Flaviu/AppData/Local/Temp/processing6750b371ece74c718b442b56c8f3ef1f/c99bbf3a6dc64ba798285e21a5040648/OUTPUT11.sdat', 'C:/Users/Flaviu/AppData/Local/Temp/processing6750b371ece74c718b442b56c8f3ef1f/c99bbf3a6dc64ba798285e21a5040648/OUTPUT22.sdat', 'C:/Users/Flaviu/AppData/Local/Temp/processing6750b371ece74c718b442b56c8f3ef1f/c99bbf3a6dc64ba798285e21a5040648/OUTPUT33.sdat']
Is there an easier way to do this operation using QgsRasterCalculator ?