GDAL

Here are some examples of masks I’ve made, keeping values within certain ranges. Then, I get rid of all the other values.

gdal_calc.py -A combine_rcls.tif --outfile=result.tif --calc="1*((A<=119)&(A>=44))" --NoDataValue=0
gdal_calc.py -A result.tif --outfile=FPWF.tif --calc="1*((A<=54)|(A>=111))" --NoDataValue=0
gdal_calc.py -A combine_rcls.tif --outfile=FD.tif --calc="1*((A<=37)&(A>=19))" --NoDataValue=0
gdal_calc.py -A combine_rcls.tif --outfile=MH.tif --calc="1*((A<=77)&(A>=61))" --NoDataValue=

This leaves only 1’s where the desired pixel values were, and no other values in the raster.

Leave a Reply

Your email address will not be published. Required fields are marked *