Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Transition-classes

Transition classes


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:

Details

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.

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" from sp package

extent

Object of class "Extent"

layername

Object of class "vector"

Objects from the Class

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

Extends

Class Raster

Examples

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

Distances and Routes on Geographical Grids

v1.3-6
GPL (>= 2)
Authors
Jacob van Etten [aut] (<https://orcid.org/0000-0001-7554-2558>), Kauê de Sousa [cre, ctb] (<https://orcid.org/0000-0002-7571-7845>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.