View source: R/create_FETE_lcps.R
create_FETE_lcps  R Documentation 
Calculates least cost paths from each location to all other locations (i.e. From Everywhere To Everywhere (FETE)). This is based on the method proposed by White and Barber (2012).
create_FETE_lcps( cost_surface, locations, cost_distance = FALSE, parallel = FALSE, ncores = 1 )
cost_surface 

locations 

cost_distance 

parallel 

ncores 

SpatialLinesDataFrame
(sp package). The resultant object contains least cost paths calculated from each location to all other locations
Joseph Lewis
White, DA. Barber, SB. (2012). Geospatial modeling of pedestrian transportation networks: a case study from precolumbian Oaxaca, Mexico. J Archaeol Sci 39:26842696. doi: 10.1016/j.jas.2012.04.017
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=5,'regular') lcp_network < create_FETE_lcps(cost_surface = slope_cs, locations = locs, cost_distance = FALSE, parallel = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.