I have two raster files A and B, raster A lies completely in the extent of raster B. These rasters I want to merge into one while taking the exact values of raster A in the overlapping areas.
To achieve this, I first generated two polygons, each with the extent of one of the rasters, via the Tile Index tool and subsequently calculated the difference of the polygons to get the extent of raster B without the overlapping areas of raster A.
Then I used the tool Clip Raster by Mask Layer to clip Raster B on that extent to get rid of the overlapping parts.
However, when checking the alignment of raster A with the clipped raster (B), there is a small gap and overlap, respectively, about half a pixel size at the edges of the cut out part, which hence lead to wrong cell values after merging.
I then tried to align the rasters with the tool Align Rasters, but could not get the desired result (still gap/overlap). I could not find any tutorial or post explaining it properly.
Do you have any tips on how to do it correctly?
=A or B