calcPatchIsolation: Calculate the KNN distance between patches in a binary raster...

Description Usage Arguments

Description

Calculate the KNN distance between patches in a binary raster (or raster(s); a vector or list) specified by r=RasterLayer. You can either return the KNN index or some statistic (e.g., mean) specified by fun=. The default action is to return the full index. I have added multi-core support and use the gdal backend by default for this analysis. It's much faster than doing it in pure 'R'.

Usage

1
2
calcPatchIsolation(r, fun = NULL, k = 1, method = "gdal",
  from = "centroid", parallel = FALSE)

Arguments

fun

a function that is applied to all KNN distances (i.e., for calculating mean/median/mode distances).

k

the K (e.g., 1,2,3) value used for our K nearest-neighbor calculation.

method

string specifying whether 'gdal' or 'R' is used to vectorize our raster patches for the KNN calculation.

from

string specifying whether to calculate patch issolation distances from the 'edges' (i.e., minimum distance) or patch 'centroid'. default is 'edges'.

parallel

TRUE/FALSE specifying whether to parallelize our vectorization / KNN operations.


ktaylora/landscapeAnalysis documentation built on May 20, 2019, 7:04 p.m.