Learn R Programming

velox (version 0.2.0)

VeloxRaster_as.RasterBrick: Cast a VeloxRaster as a RasterBrick object

Description

as.RasterBrick creates a RasterBrick object from a VeloxRaster.

Arguments

assign_data_type

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

Value

A RasterBrick object.

Examples

Run this code
# NOT RUN {
## 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 RasterBrick
library(raster)
rs <- vx$as.RasterBrick()

# }

Run the code above in your browser using DataLab