In QGIS 2.18.16 with GRASS 7.4.0 (Windows 7, 64 bit), I am trying to create a composite raster layer from two nearly identical versions of a 3-band color geotiff that almost (but not quite perfectly) overlap, using the GRASS tool r.patch. Whether or not I select the "use zero for transparency instead of null," the process fails with the error message:

Input raster map contains cells with NULL-value (no-data). The value 255 will be used to represent no-data values in the input map. You can specify a nodata value with the nodata option. WARNING: The default nodata value is present in rasterband and would lead to data loss. Please specify a custom nodata value with the nodata parameter. ERROR: Raster export aborted.

Can anyone help me out with how to make this work within QGIS? There doesn't appear to be any way to set the nodata parameter within the r.patch dialogue box. Also, what value should I set it to?

1 Answer 1


You have to fill no data cell with values for that with zeros with another tool before r.patch,

  1. go to processing > Toolbox or press Ctrl + Alt + T if it is not in the screen

enter image description here

  1. then go to processing toolbox and search for the tool "Fill NoData cells."

enter image description here

  1. activate the tool and select one raster
  2. select the band number
  3. give the fill value as "0" or zero

enter image description here

  1. run

then repeat the same process for all raster's and create new raster's. then run them with r.patch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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