leastcostpath (version 1.2.1)

create_feature_cs: create_feature_cs

Description

Creates a Landscape Feature Cost Surface

Usage

create_feature_cs(raster, locations, x, neighbours = 16)

Arguments

raster

RasterLayer (raster package). This is used to derive the resolution, extent, and spatial reference system to be used when calculating the landscape feature cost surface

locations

SpatialPoints. Locations of landscape features

x

numeric vector of values denoting the attraction/repulsion from the landscape features

neighbours

Number of directions used in the Least Cost Path calculation. See Huber and Church (1985) for methodological considerations when choosing number of neighbours. Expected values are 4, 8, or 16. Default is 16.

Value

TransitionLayer (gdistance package) numerically expressing the attraction/repulsion of a feature in the landscape. The resultant TransitionLayer can be incorporated with other TransitionLayer through Raster calculations.

Details

Creates a cost surface representing the attraction/repulsion of a feature in the landscape. See Llobera (2000) for theoretical discussion in its application.

Examples

Run this code
# NOT RUN {
r <- raster::raster(system.file('external/maungawhau.grd', package = 'gdistance'))
loc1 = cbind(2667670, 6479000)
loc1 = sp::SpatialPoints(loc1)

num <- seq(200, 1, length.out = 20)

feature <- create_feature_cs(raster = r, locations = loc1, x = num)
# }

Run the code above in your browser using DataLab