I'm trying to reclassify some categorical raster data in QGIS using GDAL raster calculator. My input Geotiff has four values, [26, 27, 31, 32] which I want reclassified to [1.25, 2.5, 3.75, 5] respectively.
I want to use GDAL raster calc so I can use GDAL's lossless compression creation options(the input raster is quite large).
The logic I've tried is the following, where inputraster.tif = A
(A=26)*1.25 + (A=27)*2.5 + (A=31)*3.75 + (A=32)*5
Where am I going wrong? I'm unfamiliar with Numpy but from the examples I've found in the docs and online this logic seems right, but the process crashes immediately.