lazyraster-raster-S4: Raster methods (S4) for lazyraster.

Description Usage Arguments Details Value See Also Examples

Description

These methods are generics from the raster package, extended to work for lazyrasters.

Usage

1
2
## S4 method for signature 'lazyraster'
crop(x, y, ...)

Arguments

x

various (raster, extent)

y

an object with extent (for crop)

...

arguments passed to underlying raster function

Details

For crop() this set an active window of data using the same crop() function as the raster package. This is the data window that will be pulled by conversion to an actual raster by as_raster().

Value

lazyraster() and crop() return a lazyraster object, extent() returns a regular raster extent

See Also

raster::raster(), raster::extent(), raster::crop()

Examples

1
2
3
4
sstfile <- system.file("extdata/sst.tif", package = "vapour")
lr <- lazyraster(sstfile)
## crop and stay as lazyraster
crop(lazyraster(sstfile), raster::extent(142, 143, -50, -45))

mdsumner/lazyraster documentation built on Sept. 8, 2021, 9:36 p.m.