Create an actual raster::raster object by breaking the lazy contract and demanding pixel values at a given resolution.
as_raster(x, dim = NULL, resample = "NearestNeighbour", native = FALSE)
x | |
---|---|
dim | dimensions, pixel size in rows and columns |
resample | resampling method, see vapour::vapour_read_raster |
native | return raster at native resolution, default is |
a regular raster 'BasicRaster' in-memory object
Control the dimensions and method for resampling with the 'dim' and 'resample' arguments.
If dim
is non-integer it is rounded according to what raster does with the
dimensions.
When native = TRUE
the dim
argument is ignored, and no resampling is performed.