I want to calculate some result using QgisRasterCalculator and using the code mentioned below.Problem is i am not getting any output raster also if i use this formula in raster calculator it gives nan.Please help.My code is
from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry
bohLayer = iface.activeLayer()
entries = []
# Define band1
boh1 = QgsRasterCalculatorEntry()
boh1.ref = 'boh@1'
boh1.raster = bohLayer
boh1.bandNumber = 1
entries.append( boh1 )
## Define band2
#boh2 = QgsRasterCalculatorEntry()
#boh2.ref = 'boh@2'
#boh2.raster = bohLayer
#boh2.bandNumber = 2
#entries.append( boh2 )
# Process calculation with input extent and resolution
calc = QgsRasterCalculator( 'Float("%LE71970282002228EDC00_B6_clip.TIF (2)%" * 0.03705882) + 3.2', 'D:\UHI Plugin work\test\output\outputfile.tif', 'GTiff', bohLayer.extent(), bohLayer.width(), bohLayer.height(), entries )
calc.processCalculation()