Learn R Programming

lazyraster (version 0.5.1)

as_raster: Convert to in-memory raster

Description

Create an actual raster::raster object by breaking the lazy contract and demanding pixel values at a given resolution.

Usage

as_raster(x, dim = NULL, resample = "NearestNeighbour", native = FALSE)

Arguments

dim

dimensions, pixel size in rows and columns

resample

resampling method, see vapour::vapour_read_raster

native

return raster at native resolution, default is FALSE

Value

a regular raster 'BasicRaster' in-memory object

Details

Control the dimensions and method for resampling with the 'dim' and 'resample' arguments.

When native = TRUE the dim argument is ignored, and no resampling is performed.