Set 0 Values in GeoTIFF to NoData Using GDAL

gdalraster

Is there a way to set all the 0 value pixels on a raster to nodata using GDAL?

I would like to use fillnodata to fill some holes, but holes are set to 0, so I need to delete them first

Best Answer

You could try something like this with gdal_translate

gdal_translate -of GTiff -a_nodata 0 input.tif output.tif
Related Question