Learn R Programming

rWind (version 1.1.7)

flow.dispersion_int: Compute flow-based cost or conductance

Description

flow.dispersion_int computes movement conductance through a flow either, sea or wind currents. It implements the formula described in Fel<U+00ED>cisimo et al. 2008:

Usage

flow.dispersion_int(stack, fun = cost.FMGS, output = "transitionLayer", ...)

Arguments

stack

RasterStack object with layers obtained from wind2raster function ("rWind" package) with direction and speed flow values.

fun

A function to compute the cost to move between cells. The default is cost.FMGS from Felic<U+00ED>simo et al. (2008), see details.

output

This argument allows to select different kinds of output. "raw" mode creates a matrix (class "dgCMatrix") with transition costs between all cells in the raster. "transitionLayer" creates a TransitionLayer object with conductance values to be used with "gdistance" package.

...

Further arguments passed to or from other methods.

Value

In "transitionLayer" output, the function returns conductance values (1/cost)to move between all cells in a raster having into account flow speed and direction obtained from wind.fit function("rWind" package). As wind or sea currents implies directionality, flow.dispersion produces an anisotropic conductance matrix (asymmetric). Conductance values are used later to built a TransitionLayer object from "gdistance" package.

In "raw" output, flow.dispersion creates a sparse Matrix with cost values.

Details

Cost=(1/Speed)*(HorizontalFactor)

being HorizontalFactor a "function that incrementally penalized angular deviations from the wind direction" (Felic<U+00ED>simo et al. 2008).

References

Felic<U+00ED>simo, <U+00C1>. M., Mu<U+00F1>oz, J., & Gonz<U+00E1>lez-Solis, J. (2008). Ocean surface winds drive dynamics of transoceanic aerial movements. PLoS One, 3(8), e2928.

Jacob van Etten (2017). R Package gdistance: Distances and Routes on Geographical Grids. Journal of Statistical Software, 76(13), 1-21. doi:10.18637/jss.v076.i13

See Also

wind.dl, wind2raster

Examples

Run this code
# NOT RUN {
data(wind.data)
wind <- wind2raster(wind.data)
Conductance <- flow.dispersion(wind, type = "passive")
# }
# NOT RUN {
require(gdistance)
transitionMatrix(Conductance)
image(transitionMatrix(Conductance))
# }

Run the code above in your browser using DataLab