Wednesday 20 September 2017

raster - Seting 0 values in GeoTIFF to nodata using GDAL?


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



Answer



You could try something like this with gdal_translate


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

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...