Learn R Programming

SDMTools (version 1.1-11)

ClassStat: Landscape Class Statistics

Description

ClassStat calculates the class statistics for patch types identified in a matrix of data or in a raster of class 'asc' (SDMTools & adehabitat packages), 'RasterLayer' (raster package) or 'SpatialGridDataFrame' (sp package).

Usage

ClassStat(mat,cellsize=1,bkgd=NA,latlon=FALSE)

Arguments

mat
a matrix of data with patches identified as classes (unique integer values) as e.g., a binary lanscape of a species distribution or a vegetation map. Matrix can be a raster of class 'asc' (adehabitat package), 'RasterLayer' (raster package) or 'SpatialGri
cellsize
cell size (in meters) is a single value representing the width/height of cell edges (assuming square cells)
bkgd
the background value for which statistics will not be calculated
latlon
boolean value representing if the data is geographic. If latlon == TRUE, matrix must be of class 'asc', 'RasterLayer' or 'SpatialGridDataFrame'

Value

  • a data.frame listing
  • classa particular patch type from the original input matrix (mat).
  • n.patchesthe number of patches of a particular patch type or in a class.
  • total.areathe sum of the areas (m2) of all patches of the corresponding patch type.
  • prop.landscapethe proportion of the total lanscape represented by this class
  • patch.densitythe numbers of patches of the corresponding patch type divided by total landscape area (m2).
  • total.edgethe total edge length of a particular patch type.
  • edge.densityedge length on a per unit area basis that facilitates comparison among landscapes of varying size.
  • landscape.shape.indexa standardized measure of total edge or edge density that adjusts for the size of the landscape.
  • largest.patch.indexlargest patch index quantifies the percentage of total landscape area comprised by the largest patch.
  • mean.patch.areaaverage area of patches.
  • sd.patch.areastandard deviation of patch areas.
  • min.patch.areathe minimum patch area of the total patch areas.
  • max.patch.areathe maximum patch area of the total patch areas.
  • perimeter.area.frac.dimperimeter-area fractal dimension equals 2 divided by the slope of regression line obtained by regressing the logarithm of patch area (m2) against the logarithm of patch perimeter (m).
  • mean.perim.area.ratiothe mean of the ratio patch perimeter. The perimeter-area ratio is equal to the ratio of the patch perimeter (m) to area (m2).
  • sd.perim.area.ratiostandard deviation of the ratio patch perimeter.
  • min.perim.area.ratiominimum perimeter area ratio
  • max.perim.area.ratiomaximum perimeter area ratio.
  • mean.shape.indexmean of shape index
  • sd.shape.indexstandard deviation of shape index.
  • min.shape.indexthe minimum shape index.
  • max.shape.indexthe maximum shape index.
  • mean.frac.dim.indexmean of fractal dimension index.
  • sd.frac.dim.indexstandard deviation of fractal dimension index.
  • min.frac.dim.indexthe minimum fractal dimension index.
  • max.frac.dim.indexthe maximum fractal dimension index.
  • total.core.areathe sum of the core areas of the patches (m2).
  • prop.landscape.coreproportional landscape core
  • mean.patch.core.areamean patch core area.
  • sd.patch.core.areastandard deviation of patch core area.
  • min.patch.core.areathe minimum patch core area.
  • max.patch.core.areathe maximum patch core area.
  • prop.like.adjacenciescalculated from the adjacency matrix, which shows the frequency with which different pairs of patch types (including like adjacencies between the same patch type) appear side-by-side on the map (measures the degree of aggregation of patch types).
  • aggregation.indexcomputed simply as an area-weighted mean class aggregation index, where each class is weighted by its proportional area in the landscape.
  • lanscape.division.indexbased on the cumulative patch area distribution and is interpreted as the probability that two randomly chosen pixels in the landscape are not situated in the same patch
  • splitting.indexbased on the cumulative patch area distribution and is interpreted as the effective mesh number, or number of patches with a constant patch size when the landscape is subdivided into S patches, where S is the value of the splitting index.
  • effective.mesh.sizeequals 1 divided by the total landscape area (m2) multiplied by the sum of patch area (m2) squared, summed across all patches in the landscape.
  • patch.cohesion.indexmeasures the physical connectedness of the corresponding patch type.

Details

The class statistics are based on statistics calculated by fragstats http://www.umass.edu/landeco/research/fragstats/fragstats.html.

References

McGarigal, K., S. A. Cushman, M. C. Neel, and E. Ene. 2002. FRAGSTATS: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors at the University of Massachusetts, Amherst. Available at the following web site: www.umass.edu/landeco/research/fragstats/fragstats.html

See Also

PatchStat, ConnCompLabel

Examples

Run this code
#define a simple binary matrix
tmat = { matrix(c( 0,0,0,1,0,0,1,1,0,1,
                   0,0,1,0,1,0,0,0,0,0,
                   0,1,NA,1,0,1,0,0,0,1,
                   1,0,1,1,1,0,1,0,0,1,
                   0,1,0,1,0,1,0,0,0,1,
                   0,0,1,0,1,0,0,1,1,0,
                   1,0,0,1,0,0,1,0,0,1,
                   0,1,0,0,0,1,0,0,0,1,
                   0,0,1,1,1,0,0,0,0,1,
                   1,1,1,0,0,0,0,0,0,1),nr=10,byrow=TRUE) }
					
#do the connected component labelling
ccl.mat = ConnCompLabel(tmat)
ccl.mat
image(t(ccl.mat[10:1,]),col=c('grey',rainbow(length(unique(ccl.mat))-1)))

#calculate the patch statistics
ps.data = PatchStat(ccl.mat)
ps.data

#calculate the class statistics
cl.data = ClassStat(tmat)
cl.data

#identify background data is 0
cl.data = ClassStat(tmat,bkgd=0)
cl.data

Run the code above in your browser using DataLab