merge

0th

Percentile

Merge RasterLayers

Merge RasterLayers to form a new RasterLayer with a larger spatial extent

Keywords
methods, spatial
Usage
merge(x, y, ...)
Arguments
x
A RasterLayer object
y
A RasterLayer object
...
Additional RasterLayers and other arguments. See below, under Methods
Details

The RasterLayer objects must have the same origin and resolution. In areas where the RasterLayers overlap, the values of the RasterLayer that is first in the sequence of arguments will be retained.

Value

  • A new RasterLayer object, and in some cases, the side effect of a new file on disk.

See Also

crop, expand

Aliases
  • merge
  • merge,RasterLayer,RasterLayer-method
Examples
r1 <- raster(xmx=-150, ymn=60, ncols=30, nrows=30)
r1[] <- 1:ncell(r1)
r2 <- raster(xmn=-100, xmx=-50, ymx=50, ymn=30)
res(r2) <- c(xres(r1), yres(r1))
r2[] <- 1:ncell(r2)
rm <- merge(r1, r2)
Documentation reproduced from package raster, version 1.0.0-1, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.