Create an ObsLulcRasterStack object

Share:

Description

Methods to create an ObsLulcRasterStack object, which may be created from file, an existing Raster* object or a list of Raster* objects.

Usage

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

## S4 method for signature 'missing,character'
ObsLulcRasterStack(x, pattern, ...)

## S4 method for signature 'character,character'
ObsLulcRasterStack(x, pattern, ...)

## S4 method for signature 'list,character'
ObsLulcRasterStack(x, pattern, ...)

## S4 method for signature 'RasterLayer,ANY'
ObsLulcRasterStack(x, pattern, ...)

## S4 method for signature 'RasterStack,ANY'
ObsLulcRasterStack(x, pattern, 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

pattern

regular expression (character). Only filenames (if x is a path) or Raster* objects (if x is a list) matching the regular expression will be returned. See
raster::raster for more information about supported filetypes

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

...

additional arguments to raster::stack

Details

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

Value

An ObsLulcRasterStack object.

See Also

ObsLulcRasterStack-class, raster::stack

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Plum Island Ecosystems
obs <- ObsLulcRasterStack(x=pie,
                   pattern="lu",
                   categories=c(1,2,3),
                   labels=c("forest","built","other"),
                   t=c(0,6,14))

## Sibuyan Island
obs <- ObsLulcRasterStack(x=sibuyan$maps,
                   pattern="lu",
                   categories=c(1,2,3,4,5),
                   labels=c("forest","coconut","grass","rice","other"),
                   t=c(0,14))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.