Saturday 19 November 2016

imagery - Redefining nodata value into zero in QGIS?



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?



Answer



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! :)


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...