Euclidean distance to nearest neighbour
RasterLayer or matrix (with x,y,id columns).
If TRUE, also the patch ID of the nearest neighbour is returned.
Fast and memory safe Rcpp implementation for calculating the minimum Euclidean
distances to the nearest patch of the same class in a raster or matrix.
All patches need an unique ID (see
get_patches). Please be aware
that the patch ID is not identical to the patch ID of all metric functions (lsm_).
return_ID = TRUE, for some focal patches several nearest neighbour patches
might be returned.
Based on RCpp code of Florian Privé email@example.com
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.