View source: R/disturbanceMetrics.R
disturbanceMetrics | R Documentation |
Calculate the predictors described in Table 52 of Environment Canada (2011) Scientific Assessment to Inform the Identification of Critical Habitat for Woodland Caribou (Rangifer tarandus caribou), Boreal Population, in Canada:2011 Update. Ottawa, Ontario.The variables calculated by this function include:
Fire: % fire
Anthro: % non-overlapping anthropogenic disturbance.
Total_dist: Percent total non-overlapping fire and anthropogenic disturbance.
fire_excl_anthro: % fire not overlapping with anthropogenic disturbance.
disturbanceMetrics(
landCover = NULL,
linFeat = NULL,
projectPoly = NULL,
isPercent = TRUE,
...
)
landCover |
filename, SpatRaster or RasterLayer. 0 and NA values are assumed to be water and omitted from the tabulated area. Note landCover is also used to define the input grid, so must be provided even if all values are 1. |
linFeat |
filename, SpatRaster, RasterLayer, sf object or a list of these that will be combined. Linear features. |
projectPoly |
filename or sf object. Polygons defining range boundaries. |
isPercent |
logical. Should the results be returned as a percentage? |
... |
optional arguments:
|
Note assume natDist and anthroDist include 40 years of cumulative disturbance.
Note that locations where landCover is NA or 0 are omitted from the tabulated
area. Missing layers are omitted from the output, not interpreted as 0
disturbance. To update an existing DisturbanceMetrics object with new data see
updateDisturbance()
.
A DisturbanceMetrics Object see DisturbanceMetrics-class()
Environment Canada. 2011. Scientific Assessment to Inform the Identification of Critical Habitat for Woodland Caribou (Rangifer tarandus caribou), Boreal Population, in Canada:2011 Update. Ottawa, Ontario.
DisturbanceMetrics-class()
for information on the object
returned and updateDisturbance()
for updating an existing
DisturbanceMetrics object.
Functions for calculating disturbance:
DisturbanceMetrics-class
,
reclassDist()
,
results()
,
updateDisturbance()
# create example rasters
lc <- terra::rast(nrows = 10, ncols = 10, xmin = 0, xmax = 10, ymin = 0,
ymax = 10, crs = "EPSG:5070")
nd <- lc
nd[1:3, 1:3] <- 1
ad <- lc
ad[3:5, 3:5] <- 1
lc[] <- 1
# create sf objects
lf <- sf::st_as_sf(sf::st_sfc(list(sf::st_linestring(matrix(c(0, 0, 10, 10),
ncol = 2, byrow = TRUE))),
crs = 5070))
projPol <- sf::st_sf(sf::st_as_sfc(sf::st_bbox(ad)))
# calculate disturbance
disturbanceMetrics(landCover = lc,
linFeat = lf,
natDist = nd,
anthroDist = ad,
projectPoly = projPol,
padFocal = TRUE,
bufferWidth = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.