raster_conduct: Create a conductance raster

Description Usage Arguments Details Value Examples

View source: R/s5_interpolate_animate.R

Description

Creates a conductance raster for the study area for use in calculating least cost paths between two locations.

Usage

1
raster_conduct(sa_rast, impassable, impassable_value = 100)

Arguments

sa_rast

A RasterLayer object on which to calculate conductance.

impassable

An sfc_POLYGON object that contains land or other impassable terrain.

impassable_value

A resistance value to assign to the impassable cells of the raster. This should be a large number to ensure the animal will not cross the impassable sections. The function will convert it from a resistance to a conductance.

Details

This function takes a RasterLayer as a template and an sfc_POLYGON and returns another RasterLayer of conductance. This conductance raster is intended to be passed downstream for calculation of least cost paths between animal locations.

Value

Returns a RasterLayer object of conductance values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Load sample data
data(acoustic)

#Initialize raster
r.cond <- init_raster(study_area = acoustic$study_area, res = 0.001)

#Create conductance raster
conduct <- raster_conduct(sa_rast = r.cond, impassable = acoustic$land)

#Plot
plot(conductance)
plot(acoustic$study_area, add = TRUE)
plot(acoustic$land, add = TRUE, col = NA)

bsmity13/ADePTR documentation built on Nov. 9, 2019, 12:43 a.m.