FragStatsCalc | R Documentation |
raster
*Object.Calculates a user defined set of landscape fragmentation indices for patch
types identified in a raster
*Object.
FragStatsCalc( inputRasterFiles = NULL, latlon = NULL, polyName = NULL, studysite = NULL, FragStats = "all", ncores = 1, saveCSV = FALSE )
inputRasterFiles |
A |
latlon |
|
polyName |
|
studysite |
An object of type |
FragStats |
Character vector of forest fragmentation parameters to be calculated. Currently available statistics are:
|
ncores |
The number of cores to use, i.e. at most how many child processes will be run simultaneously. |
saveCSV |
Default is |
An sf
-object with it's dataframe ammended by the specified
fragmentation statistics with one column for every layer
in inputRasterFiles
representing observation years. Additionally trend
statistics and the difference between the first and last observation
are automatically calculated for every single parameter based on
trend:sens.slope
.
Darius Görgen (MapTailor Geospatial Consulting GbR) info@maptailor.net
Maintainer: MAPME-Initiative contact@mapme-initiative.org
Contact Person: Dr. Johannes Schielein
Copyright: MAPME-Initiative
License: GPL-3
library(sf) library(raster) library(mapme.forest) aoi = st_read(system.file("extdata", "aoi_polys.gpkg", package = "mapme.forest")) yearlyRaster = stack(system.file("extdata", "pkgTest_yearlyCover.tif", package = "mapme.forest")) names(yearlyRaster) = paste("y_", as.character(2000:2018)) result = FragStatsCalc(inputRasterFiles = yearlyRaster, studysite = aoi[1,], FragStats = c("n.patches", "total.area", "prop.landscape", "patch.density"), latlon = TRUE, polyName = "id", ncores = 1, saveCSV = FALSE) str(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.