I am new to python and QGIS (have some experience with arcpy). I am trying to multiply two .tif files together using gdal_calc.py but I can't get it to work. It just returns the error invalid syntax. Here is the code. I am doing this in the QGIS Python command line.
gdal_calc.py -A people.tif -B places.tif --outfile=c:/test.tif --calc="A*B" --NoDataValue=0
I then tried this after reading an answer to another question, which ran and printed a number. However, it has not output a .tif file:
import os gdal_calc = 'python C:/wheregdal_calc/islocated -Apeople.tif B-places.tif --outfile=c:/test.tif --calc="A*B"' os.system(gdal_calc)