Transition-class: Transition* classes

Description Objects from the Class Slots Extends Author(s) Examples

Description

TransitionLayer and TransitionStack (or Transition*) are the core classes of the package gdistance. They are the main input into the functions to calculate distances and routes.

An object of the class TransitionLayer contains two main elements: a. a transition matrix with transition values between connected cells in a raster - an object of class sparseMatrix (package Matrix); b. information on the extent, resolution and projection of the underlying raster - an object of class Raster (package raster).

All slots belong to these two elements from other package, except two additional slots: 1. slot transitionCells, which is only used internally in the package; 2. slot matrixValues indicates if the nonzero values of the transition matrix contains conductance or resistance values.

Class TransitionStack contains one or more transition matrices.

Class Transition is the union of TransitionLayer and TransitionStack.

Objects from the Class

Objects can be created by calls of the form new("Transition", nrows, ncols, xmin, xmax, ymin, ymax, projection).

Slots

transitionMatrix:

Object of class "sparseMatrix"

transitionCells:

Object of class "integer"

matrixValues:

Object of class "character"

ncols:

Object of class "integer"

nrows:

Object of class "integer"

crs:

Object of class "CRS" (sp package)

extent:

Object of class "Extent"

layernames:

Object of class "vector"

Extends

Class "Raster".

Author(s)

Jacob van Etten <jacobvanetten@yahoo.com>

Examples

1
2
3
4
5
6
7
8
9
showClass("TransitionLayer")

tr <- new("TransitionLayer", nrows=as.integer(36), ncols=as.integer(18),
		extent=extent(c(xmin=-180,xmax=180, ymin=-90,ymax=90)),
		crs=CRS("+proj=longlat +datum=WGS84"))

tr <- new("TransitionLayer",nrows=as.integer(36),ncols=as.integer(18),
        extent=extent(c(xmin=-180, xmax=180, ymin=-90,ymax=90)),
		crs=CRS(""))

gdistance documentation built on May 2, 2019, 5:46 p.m.