src: Create a SpatRasterCollection

Description Usage Arguments Value See Also Examples

Description

Methods to create a SpatRasterCollection. This is an object to hold a collection (list) of SpatRaster objects. There are no restrictions on the similarity of the SpatRaster geometry.

They can be used to combine several SpatRasters to be used with merge or mosaic

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'SpatRaster'
src(x, ...) 

## S4 method for signature 'list'
src(x) 

## S4 method for signature 'missing'
src(x) 

Arguments

x

SpatRaster, list with SpatRaster objects, or missing

...

additional SpatRaster objects

Value

SpatRasterCollection

See Also

sds

Examples

1
2
3
4
5
6
7
8
x <- rast(xmin=-110, xmax=-50, ymin=40, ymax=70, ncols=60, nrows=30)
y <- rast(xmin=-80, xmax=-20, ymax=60, ymin=30)
res(y) <- res(x)
values(x) <- 1:ncell(x)
values(y) <- 1:ncell(y)

z <- src(x, y)
z

terra documentation built on Oct. 11, 2021, 9:09 a.m.