LulcRasterStack-methods: Create an LulcRasterStack object

Description Usage Arguments Details Value See Also Examples

Description

Methods to create an LulcRasterStack object, which may be created from file or an existing Raster* object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
DiscreteLulcRasterStack(x, ...)

## S4 method for signature 'Raster'
DiscreteLulcRasterStack(x, ...)

## S4 method for signature 'RasterStack'
DiscreteLulcRasterStack(x, categories, labels, t)

ContinuousLulcRasterStack(x, ...)

## S4 method for signature 'Raster'
ContinuousLulcRasterStack(x, ...)

## S4 method for signature 'RasterStack'
ContinuousLulcRasterStack(x, categories, labels, t)

Arguments

x

path (character), Raster* object or list of Raster* objects. Default behaviour is to search for files in the working directory

...

additional arguments to raster::stack

categories

numeric vector of land use categories in observed maps

labels

character vector (optional) with labels corresponding to categories

t

numeric vector containing the timestep of each observed map. The first timestep must be 0

Details

Observed land use maps should have the same extent and resolution and have the same non-NA cells. The location of non-NA cells in LulcRasterStack objects defines the region for subsequent analysis.

Value

An LulcRasterStack object.

See Also

LulcRasterStack-class, raster::stack

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Plum Island Ecosystems 

lu <- DiscreteLulcRasterStack(x=stack(pie[1:3]),
                              categories=c(1,2,3),
                              labels=c("Forest","Built","Other"),
                              t=c(0,6,14))
lu

## Sibuyan Island
lu <- DiscreteLulcRasterStack(x=stack(sibuyan$maps[1:2]),
                              categories=c(1,2,3,4,5),
                              labels=c("forest","coconut","grass","rice","other"),
                              t=c(0,14))

simonmoulds/lulcc2 documentation built on Dec. 23, 2021, 2:24 a.m.