I am having a hard time getting the "Additional Creation Parameters" to work when using GdalWarp through the processing toolbox.

I am trying to set the nodata value to 0 for the output raster.

processing.runalg("gdalogr:warpreproject","InRaster.tif","EPSG:32736","EPSG:32736",10,0,"-dstnodata 0","OutRaster.tif")

Has anyone used this functionality and managed to get it to work?

  • -dstnodata 0 0 0 would work? – vinayan Aug 21 '14 at 8:56
  • Hi Vinayan, no that doesn't work either. It is a single band raster. – user2677377 Aug 21 '14 at 9:06

You may need to upgrade your version of QGIS. From what I can gather, versions of QGIS before 2.6.0 had an issue where extra GDAL parameters passed to the processing plugin were quoted in a way that GDAL wouldn't recognise them.

(We've had to work around this issue ourselves as we can't upgrade our version of QGIS. Our workaround is to build our own GDAL command line and run GDAL directly, bypassing most of the processing plugin.)


Is it possible that you need to use srcnodata along with dstnodata for your tif? If nodata happens to be undefined in your source, it's not going to know what to set as nodata in your destination without that flag. That's worked for me in the past...though in my case I'm using srcnodata and dstalpha instead.

Your Answer

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

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