1

Is it possible to reduce a raster to hold just 1 or 0 values with gdal? I find no data formats less than "Byte" in the documention

1

GeoTIFF with NBITS=1 is binary even the datatype is Byte https://gdal.org/drivers/raster/gtiff.html. I do not know the internal structure of such TIFF but together with the CCITT Group 4 compression that is designed long time ago for fax machines it yields very small file size.

Usage:

gdal_translate -of GTiff -co NBITS=1 -co compress=CCITTFAX4 input.tif output.tif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.