velox: Create a VeloxRaster object

Description Usage Arguments Details Value Examples

View source: R/velox.R

Description

velox creates a VeloxRaster object.

Usage

1
velox(x, extent = NULL, res = NULL, crs = NULL)

Arguments

x

A Raster* object, matrix, list of matrices, list of VeloxRaster objects, or character string pointing to a GDAL-readable file.

extent

An extent object or a numeric vector of length 4. Required if x is a matrix or list of matrices, ignored otherwise.

res

The x and y resolution of the raster as a numeric vector of length 2. Required if x is a matrix or list of matrices, ignored otherwise.

crs

Optional. A character string describing a projection and datum in the PROJ.4 format. Ignored if x is a Raster* object.

Details

Creates a VeloxRaster object. Note that VeloxRaster objects are Reference Class objects and thus mutable. Hence, the usual R copy on modify semantics do not apply.

Note that if x is a list of VeloxRasters, the extent and crs attributes are copied from the first list element.

Value

A VeloxRaster object.

Examples

1
2
3
4
5
## Create VeloxRaster from list of matrices
mat1 <- matrix(1:100, 10, 10)
mat2 <- matrix(100:1, 10, 10)
mat.ls <- list(mat1, mat2)
vx <- velox(mat.ls, extent=c(0,1,0,1), res=c(0.1,0.1), crs="+proj=longlat +datum=WGS84 +no_defs")

hunzikp/velox documentation built on June 6, 2021, 2:40 a.m.