I am trying to figure out if gdistance can be used on a certain kind of
multiple input problem.
I am trying to calculate a cost distance allowing for both pedestrian and
canoe travel. Currently I have 5 input rasters. One of them is a landtype,
which indicates a cell is land, a river, or a shore (a buffer around the
I would like to do the following:
* If there is movement between two land cells or between and land and shore
cell, you consult the DEM raster and do a Tobler trip (like the example in
the gdistance vignette)
* If there is movement between two river cells, you first consult the
direction of flow raster, and based on the direction of movement you apply
an upstream or a downstream speed based on the flowspeed raster.
* If there is movement between a river and shore cell, you do a Tobler
trip, but also apply an additional fixed time penalty based on another
I see that gdistance can use a RasterBrick, but only for mahalanobis
distance. And I can't tell if it is possible to use multiple raster inputs
for a transition function.
(And for actual use, I can collapse the 5 input rasters into 2, but have
described it this way for clarity.)