I am trying to create a tiff file using gdal_translate.

Initially my noDataValue was 0.0, but my client suggested that - noDataValue should be -9999.0, so I changed it to -9999.0.

gdal_translate -of GTiff  -a_nodata -9999.0 -a_srs EPSG:4326 -a_ullr -26.62 45.099999999999994 75.46 -6.82 -co INTERLEAVE=BAND -co TILED=YES -co COMPRESS=LZW -ot Float32 shape_19790101.tif shape_19790101_optimized.tif

But now I am getting following suggestion

You set the noDataValue to -9999, but you did not recompute the imagine and change the value of the "noDataPixels"

Can anybody explain what exactly this means ?

  • 1
    You are looking for this answer. gdal_translate -a_nodata only sets the nodata value to -9999 instead of 0, but won't change the value of the no data pixels (those with 0 in the source raster) – Javier JC Apr 16 at 18:29

Your Answer

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

Browse other questions tagged or ask your own question.