gdal calculator

Posted

__busy busy busy__

Extracting several raster values from a categorical raster and rewriting as 0/1 raster using gdal_calc:

python "%gdal_dir%/gdal_calc.py" --co COMPRESS=LZW -A C:/temp_geodata/sample/LU2019.tif --overwrite --outfile=%out_dir%/LandUseSel.tif --calc="numpy.where(numpy.isin(A, numpy.array([9,10,61,62])), 1, 0)"

Author
Categories gdal, GIS