# create_slope_cs

##### create_slope_cs

Creates a Slope Cost Surface

##### Usage

```
create_slope_cs(dem, cost_function = "tobler", neighbours = 16,
crit_slope = 12, max_slope = NULL)
```

##### Arguments

- dem
`RasterLayer`

(raster package). Digital Elevation Model.- cost_function
Cost Function used in the Least Cost Path calculation. Implemented cost functions include 'tobler', 'modified tobler', 'wheeled transport' 'herzog', or 'all'. Default is 'tobler'. See Details for more information.

- neighbours
`numeric`

value. 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.- crit_slope
Critical Slope (in percentage) is 'the transition where switchbacks become more effective than direct uphill or downhill paths'. Cost of climbing the critical slope is twice as high as those for moving on flat terrain and is used for estimating the cost of using wheeled vehicles. Default value is 12, which is the postulated maximum gradient traversable by ancient transport (Verhagen and Jeneson, 2012). Critical slope only used in 'wheeled transport' cost function.

- max_slope
`numeric`

value. Maximum percentage slope that is traversable. Default is NULL.

##### Details

Creates a cost surface based on the difficulty of moving up/down slope. This function allows for multiple isotropic and anisotropic cost functions that estimate human movement across a landscape. The maximum percentage slope traversal can also be supplied.

The most widely used cost function that approximates the difficulty of moving across a landscape is Waldo Tobler's 'Hiking Function' (Gorenflo and Gale, 1990; Wheatley and Gillings, 2001). This function allows for the assessment of time necessary to traverse a surface and takes into account up-slope and down-slope momentum (Kantner, 2004; Tobler, 1993).

The Modified Hiking cost function combines MIDE (Par<U+00ED>s Roche, 2002), a method to calculate walking hours for an average hiker with a light load (M<U+00E1>rquez-P<U+00E9>rez et al., 2017), and Tobler's 'Hiking Function' (Tobler, 1993). The Modified Hiking Function benefits from the precision of the MIDE rule and the continuity of Tobler's Hiking Function (M<U+00E1>rquez-P<U+00E9>rez et al., 2017).

Herzog (2013), based on the cost function provided by Llobera and Sluckin (2007), has provided a cost function to approximate the cost for wheeled transport. The cost function is symmetric and is most applicable for use when the same route was taken in both directions.

Herzog's (2010) Sixth-degree polynomial cost function approximates the energy expenditure values found in Minetti et al. (2002) but eliminates the problem of unrealistic negative energy expenditure values for steep downhill slopes.

##### Value

`TransitionLayer`

(gdistance package) numerically expressing the difficulty of moving up/down slope based on the cost function provided in the cost_function argument.

##### Examples

```
# NOT RUN {
r <- raster::raster(system.file('external/maungawhau.grd', package = 'gdistance'))
slope_cs <- create_slope_cs(r, cost_function = 'tobler', neighbours = 16, max_slope = NULL)
# }
```

*Documentation reproduced from package leastcostpath, version 1.2.1, License: GPL (>= 2)*