Creates a cost surface based on the distance between neighbouring cells. Distance corrected for if neighbours value greater than 4 (diagonal distance greater than straight line distance). Distance units are derived from the maximum resolution of the supplied RasterLayer.
create_distance_cs(raster, neighbours = 16)
TransitionLayer (gdistance package) numerically expressing the distance between neighbouring cells
r <- raster::raster(system.file('external/maungawhau.grd', package = 'gdistance')) distance_cs <- create_distance_cs(r, neighbours = 16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.