2

I have four rasters (raster.1.mask, raster.2.mask, raster.3.mask, raster.4.mask) that all together cover a certain area of interest (they may overlap a little at the borders). What I want is to put those four rasters in a single one in order to perform some certain calculations.

I used:

mosaic(raster.1, raster.2, fun = mean, tolerance = 0.05)

and

raster::merge(raster.1.mask, raster.2.mask, tolerance = 0.05, overlap = FALSE)

but I am receiving the same error:

"Error in compareRaster(x, extent = FALSE, rowcol = FALSE, orig = TRUE, : different origin"

Stathis G.
  • 145
  • 2
  • 11
  • 1
    You need to provide [example data](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and shape a reproducible example. Otherwise, it would not be easy to help you. Perhaps, there could be something wrong with `crs()` or more. – Majid Sep 22 '19 at 08:35
  • 1
    It is easy to make this reproducible by running `as.character(raster.1)` and so on for all rasters. – Robert Hijmans Sep 22 '19 at 20:26

0 Answers0