Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

2 Answers 2

up vote 0 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
add comment

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
add comment

Your Answer

 
discard

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.