I have two raster files A and B which overlap in certain areas. These rasters should be merged to one while taking the exact values of raster A, and hence overriding/replacing the values from raster B in those areas.
I tried the tools Mosaic raster layers (with "first" and "last" as options for dealing with the overlapping areas) as well as r.patch
so far, but all the outputs do not contain the exact values of raster A, but instead often show some values between raster A and B.
Is there a proper way to do it? If not in QGIS, I would also try in ArcGIS.