leastCostMap: Generate a least cost transition matrix from a topographical...

Description Usage Arguments Value Examples

Description

This function generates a `TransitionLayer` (gdistance package) that excludes the cells that are outside a depth range, which is used later to calculate the shortest path between two points that avoids the excluded cells.

Usage

1
leastCostMap(topo, min.depth = 0, max.depth = NULL)

Arguments

topo

raster dataset (RasterLayer object) with the topographic information of the study area (bathymetry or elevation).

min.depth, max.depth

Minimum and maximum depths that the path is allowed to cross. If not provided, only areas that are marked with NA in the topographic raster will be avoided.

Value

A `TransitionLayer` object (gdistance package).

Examples

1
2
3
4
5
6
## Not run: 
library(raster)
dist.cost <- leastCostMap(bathymetry, min.depth = 30)
plot(raster(dist.cost))

## End(Not run)

aspillaga/fishtrack3d documentation built on June 4, 2019, 9:14 a.m.