VeloxRaster_as.RasterStack: Cast a VeloxRaster as a RasterStack object

Description Arguments Value Examples

Description

as.RasterStack creates a RasterStack object from a VeloxRaster.

Arguments

assign_data_type

Boolean indicating whether the dataType attribute of the returned RasterStack should be set. If TRUE, the dataType attribute is set to the smallest possible data type.

Value

A RasterStack object.

Examples

1
2
3
4
5
6
7
8
## Make VeloxRaster with two bands
mat1 <- matrix(1:100, 10, 10)
mat2 <- matrix(100:1, 10, 10)
vx <- velox(list(mat1, mat2), extent=c(0,1,0,1), res=c(0.1,0.1),
      crs="+proj=longlat +datum=WGS84 +no_defs")
## Cast to RasterStack
library(raster)
rs <- vx$as.RasterStack()

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