MPG: Extract a minimum planar graph (MPG) model from a landscape...

MPGR Documentation

Extract a minimum planar graph (MPG) model from a landscape resistance surface

Description

Extracts a minimum planar graph (MPG) and is also the first step in grains of connectivity (GOC) modelling. Both patch-based and lattice MPGs can be extracted.

Usage

MPG(cost, patch, ...)

## S4 method for signature 'RasterLayer,RasterLayer'
MPG(cost, patch, ...)

## S4 method for signature 'RasterLayer,numeric'
MPG(cost, patch, ...)

Arguments

cost

A RasterLayer giving a landscape resistance surface, where the values of each raster cell are proportional to the resistance to movement, dispersal, or gene flow for an organism in the landscape feature they represent. Missing values NA are acceptable (but see below). Negative values are not. To extract an MPG with Euclidean links (i.e., and not least-cost path links) set cost[] <- 1.

patch

A raster of class RasterLayer for a patch-based analysis OR an integer for a lattice analysis. If a raster is given it must be of the same extent, origin and projection as cost and be binary, without missing values, where patches=1 and non-patches=0. For lattice analyses, an integer gives the spacing in raster cells between focal points in the lattice.

...

Additional arguments (not used).

Details

Use this function to create a minimum planar graph (MPG) that can be further analyzed using igraph() routines. It is also the first step in grains of connectivity (GOC) modelling.

Value

A mpg() object.

Note

Researchers should consider whether the use of a patch-based MPG or a lattice MPG model is appropriate based on the patch-dependency of the organism under study. Patch-based models make most sense when animals are restricted to, or dependent on, a resource patch. Lattice models can be used as a generalized and functional approach to scaling resistance surfaces.

Rasters should be projected and not in geographic coordinates (i.e. projection(cost) should not contain "+proj=longlat") or the function will issue a warning. In unprojected cases consider using projectRaster() to change to an appropriate coordinate system for the location and extent of interest that balances both distance and areal accuracy. See https://www.spatialreference.org/ for location-specific suggestions. Use of geographic coordinates will result in inaccurate areal and distance measurements, rendering the models themselves inaccurate.

Author(s)

Paul Galpern, Sam Doctolero, Alex Chubaty

References

Fall, A., M.-J. Fortin, M. Manseau, D. O'Brien. (2007) Spatial graphs: Principles and applications for habitat connectivity. Ecosystems 10:448:461.

Galpern, P., M. Manseau. (2013a) Finding the functional grain: comparing methods for scaling resistance surfaces. Landscape Ecology 28:1269-1291.

Galpern, P., M. Manseau. (2013b) Modelling the influence of landscape connectivity on animal distribution: a functional grain approach. Ecography 36:1004-1016.

Galpern, P., M. Manseau, A. Fall. (2011) Patch-based graphs of landscape connectivity: a guide to construction, analysis, and application for conservation. Biological Conservation 144:44-55.

Galpern, P., M. Manseau, P.J. Wilson. (2012) Grains of connectivity: analysis at multiple spatial scales in landscape genetics. Molecular Ecology 21:3996-4009.

See Also

⁠[GOC], [threshold]⁠

Examples

## Load raster landscape
tiny <- raster::raster(system.file("extdata/tiny.asc", package = "grainscape"))

## Create a resistance surface from a raster using an is-becomes reclassification
tinyCost <- raster::reclassify(tiny, rcl = cbind(c(1, 2, 3, 4), c(1, 5, 10, 12)))
## Produce a patch-based MPG where patches are resistance features=1
tinyPatchMPG <- MPG(cost = tinyCost, patch = tinyCost == 1)
## Explore the graph structure and node/link attributes
graphdf(tinyPatchMPG)

## Find the mean patch area (see igraph manual for use of V() and E())
mean(igraph::V(tinyPatchMPG@mpg)$patchArea)

## Quick visualization of the MPG
if (interactive())
  plot(tinyPatchMPG, col = c("grey", "black"), legend = FALSE)

## Additional graph extraction scenarios
## Produce a lattice MPG where focal points are spaced 10 cells apart
tinyLatticeMPG <- MPG(cost = tinyCost, patch = 10)
if (interactive())
  plot(tinyLatticeMPG)

grainscape documentation built on April 20, 2023, 9:12 a.m.