VeloxRaster_as.matrix: Cast a VeloxRaster band as a matrix

Description Arguments Value Examples

Description

as.matrix creates a matrix from a VeloxRaster band.

Arguments

band

Integer indicating the VeloxRaster band to be transformed.

Value

A matrix.

Examples

1
2
3
4
5
6
## Make VeloxRaster
mat <- matrix(1:100, 10, 10)
vx <- velox(mat, extent=c(0,1,0,1), res=c(0.1,0.1), crs="+proj=longlat +datum=WGS84 +no_defs")
## Cast to matrix
vx.mat <- vx$as.matrix(band=1)
identical(mat, vx.mat)

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