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.

I have an image which i cliped with an AOI polygon. The contour area was set to pixel value = 0 and I have a nodata value of -32768. I want to redefine the nodata value into zero. I used to do this with ArcMap easily in the raster calculator, but in QGIS I don't see how i could do it. Any ideas?

share|improve this question
2  
Do you want it purely for visualization or you need to set it to null wherein you will conduct further raster calculations? –  maning Jul 20 '11 at 11:14
add comment

3 Answers

I have tried using both rastercalc plugin and Raster Calculator and neither worked - Syntax error. What did work was the Warp tool and specifying the source and destination nodata values (see underdark's answer to a similar question How to exclude missing values from raster layer?)

share|improve this answer
add comment

I guess you can do that with the raster calculator.

If not with the help of GRASS plugin and r.null you will do it easily. That option means you will have first to create a GRASS mapset to import your raster in.

share|improve this answer
    
Thank you simo! –  vascobnunes Jul 20 '11 at 10:50
3  
could you elaborate on how to do that with raster calculator? –  rudivonstaden Dec 2 '12 at 10:48
add comment
up vote 5 down vote accepted

I found a solution for this. First i convert the image into a vrt layer (gdalbuildvrt) with -srcnodata 0, then i translate it back into a tif file with gdal_translate -a_nodata. Worked fine! :)

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.