I need to sum two rasters (r1 and r2) using QGIS. They're made of 0s and 1s (black/white), and overlap only slightly over a common border. In the overlapping area, r1 has data in part of it, and r2 has data in another part, that's why I need a sum, not a merge (a merge would erase part of the data).
When I go to Raster Calculator, I can use a formula such as
"r1@1" + "r2@1"
but the Select Layer Extent only allows me to choose the extent of one of them. Since it's a kind of merge, the final extent should include both original rasters. I can increase the extent by hand, but I also need to calculate the number of columns and rows by hand? I don't want any resampling. Is there a way to automate this calculation, instead of doing it by hand (hard and error prone)?