I am looking to utilise gdal_calc to batch binarise a few hundred rasters. My problem is in relation to gdal_calc and the correct syntax for --calc to do what I wish to achieve. Using QGIS Raster Calculator and the following script:
("raster@1" <= -15 AND "raster@1" >= -20)*255
I can achieve the desired result, but I cant replicate this using gdal_calc.
To clarify, I am trying to make all the values between -20 and -15 in the raster = 1 or 255 and everything else = 0, making 0 nodata.