I have two single band rasters r1
and r2
.
and
Put together in a GIS they look like this:
Raster extend and cell size of r1
and r2
match perfectly. The white areas are nodata cells. There is no overlapping of cells that have a cell value.
I would like to 'overlay' the two rasters to create one single band raster!
I already tried:
r_overlay <- overlay(r1, r2, fun=sum)
and
r_mean <- mean(r1, r2)
and
r_brick <- brick(r1, r2)
but none of the approaches seems to work. The goal is to create a single band raster containing the values of both rasters r1
and r2
and nodata values where there are nodata values now.