View source: R/create_CCP_lcps.R
create_CCP_lcps  R Documentation 
Calculates Least Cost Paths from radial locations of a specified distance to the centre location. This is based on the method proposed by Verhagen (2013).
create_CCP_lcps( cost_surface, location, distance, radial_points, cost_distance = FALSE, parallel = FALSE, ncores = 1 )
cost_surface 

location 

distance 

radial_points 

cost_distance 

parallel 

ncores 

SpatialLinesDataFrame
(sp package). The resultant object contains least cost paths (number of LCPs is dependent on radial_points argument) calculated from radial locations to a centre location within a specified distance.
Joseph Lewis
Verhagen, P. (2013). On the road to nowhere? Least cost paths, accessibility and the predictive modelling perspective. In Contreras F, Farjas M, Melero FJ (eds). Fusion of cultures. Proceedings of the 38th annual conference on computer applications and quantitative methods in archaeology, Granada, Spain, April 2010. (pp 383389). Oxford: Archaeopress
r < raster::raster(nrow=50, ncol=50, xmn=0, xmx=50, ymn=0, ymx=50, crs='+proj=utm') r[] < stats::runif(1:length(r)) slope_cs < create_slope_cs(r, cost_function = 'tobler') locs < sp::spsample(as(raster::extent(r), 'SpatialPolygons'),n=1,'regular') lcp_network < create_CCP_lcps(cost_surface = slope_cs, location = locs, distance = 20, radial_points = 10, cost_distance = FALSE, parallel = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.