I have two elevation rasters that I want to combine into an output like the one shown in the image – Expected result.
I tried that using Gdal: Merge
, but it doesn't take into account my NoData cells as seen in Merge – Result.
From what I understand from this question, it is possible to do that using GRASS's tool r.mapcalculator
. I tried the solution listed there, but it outputs only a few pixels where the two rasters overlap.
How can I adapt the code below to match my needs?
r.mapcalc "output = not(if(a))*b"
I am open to other suggestions as well.
I am using QGIS 2.14 with GRASS 7.0.4.
Best Answer
One option to achieve this is using
gdal_merge.py
. But unfortunately, this tool stops my automated script with a "Python.exe has stopped working" error, as others complained here, here and here.Another option, which actually works for me, is using
SAGA
's toolMosaic raster layers
, which doesn't generate any errors:QGIS version: 2.14.3-Essen