Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to set all the 0 value pixels on a raster to nodata using gdal or qgis?I world like to use fillnodata to fill some holes, but holes are set to 0,so I need to delete them first

share|improve this question
up vote 1 down vote accepted

Hi you could try somethign like this with gdal_translate gdal_translate -of GTiff -a_nodata 0 input.tif output.tif

share|improve this answer

with gdal:

  1. gdalbuildvrt -of GTIFF -srcnodata 0 input.tif myVrt.vrt
  2. gdal_translate -of GTIFF -scale -a_nodata 0 myVrt.vrt output.tif

beside this you can use raster calculator plugin or grass in qgis too. and arcpy SetNull method.

i hope it helps you...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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