1

I'm trying to multiply some rasters in a standalone python environment. I have done it successfully in the QGIS python environment, and manually in QGIS, but when I run the following code, nothing occurs, nor do I receive any indication of an error.

alg_params_cdsm_filt1 = {
'INPUT_A':home_folder+'\\CDSM.tif',
'BAND_A':1,
'INPUT_B':home_folder+'\\buildings_buffered_raster.tif',
'BAND_B':None,
'INPUT_C':None,'BAND_C':None,'INPUT_D':None,'BAND_D':None,'INPUT_E':None,'BAND_E':None,'INPUT_F':None,'BAND_F':None,
'FORMULA':'A*B',
'NO_DATA':None,
'RTYPE':5,
'OPTIONS':'',
'EXTRA':'',
'OUTPUT':home_folder+'\\CDSM_filt1.tif'}

cdsm_filt1 = processing.run("gdal:rastercalculator", alg_params_cdsm_filt1)

I took the code from the QGIS processing history when it had run successfully.

Why does nothing happen?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Ben W
  • 103
  • 7

0 Answers0