I thought this would be extremely basic task but obviously it's not. In QGIS3 GDAL Merge (GUI), I am trying to merge two rasters which overlap and each of them has a different distribution of nodata values. I want the rasters to be mosaiced together such that nodata values are ignored if one the rasters does not have nodata value on that spot. In ArcGIS it is that simple, why not QGIS?
Probably best performed using the command line. Yes there is the gdal_merge script, but an alternative approach is to use gdalbuildvrt with the component rasters and use gdaltranslate to create the final raster. See the answers to this question:
For my application, I had a lot of no-data values and did not have any problems. I had to use custom merge scripting though. So I created a python script which updated the VRT and applied the required Python functions.
https://gis.stackexchange.com/a/306293/22646 suggests to go via a virtual raster (
gdal_merge.py -of VRT).
If you would like to go down this path in QGIS, you could try the GDAL Build Virtual Raster algorithm (found in the Processing Toolbox).
You can choose as many Input (raster) layers as you like (the
... button). For Resolution (in overlapping areas) you can choose between
The resulting virtual raster can (for instance) be saved as GeoTiff (Layer-> Save As...).