View source: R/calc.stream.dist.R
| calc.stream.dist | R Documentation |
Calculate the shortest distance along a stream network between a pair of points
calc.stream.dist(p1, p2, data)
p1 |
(numeric vector) Longitude and latitude (in that order) of first point |
p2 |
(numeric vector) Longitude and latitude (in that order) of second point |
data |
(list) Output from |
This is the primary function for calculating the shortest distance between two points along the stream network.
(numeric) Distance (in meters) between the two points
data(stream.line)
data(nodes)
data(animal.points)
network.20 <- prep.data(
l = stream.line,
freq = 20,
nodes = nodes,
lon.name = "lon",
lat.name = "lat",
node.name = "id"
)
calc.stream.dist(p1 = c(-88.99845, 17.17668),
p2 = c(-88.99838, 17.17710),
data=network.20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.