lc_paths: Create least cost paths between each location

Description Usage Arguments Details Value Examples

View source: R/s5_interpolate_animate.R

Description

Creates least cost paths as line objects between each location for any number of individuals.

Usage

1
lc_paths(det_locs, conductance)

Arguments

det_locs

A data.frame of georeferenced acoustic detections. Could be, e.g., the data.frame returned by proc_dets() or the data.frame returned by coa_locs().

conductance

A RasterLayer object of conductance, either returned by raster_conduct() or a similar object created by the user.

Details

Estimating the least cost paths between a large number of locations can be time consuming.

Value

Returns an object of class lcp_list, which is also a list. List elements are of class lcp_ind. See lc_path_ind for details.

Examples

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

#Process detections and stations
proc.det <- proc_dets(det = acoustic$detections, sta = acoustic$stations)

#Calculate  COAs -- Note, using 6 hour COAs to reduce processing time
coas.6h <- coa_locs(proc.det, Delta_t = "6 hours")

#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)

#Create least-cost paths
lcps <- lc_paths(det_locs = coas.6h, conductance = conduct)

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