sequential_dist: Calculate the sequential distances between sequential coordinate pairs
Description
Set lonlat to FALSE if you have projected data, e.g. with coordinates
representing distance in meters, not degrees. Lonlat coodinates are assumed
(lonlat = TRUE is the default).
Usage
sequential_dist(m, lonlat = TRUE)
Value
A vector of distance values in meters if lonlat = TRUE
or the map units of the input data if lonlat = FALSE between
consecutive vertices.
Arguments
m
Matrix containing coordinates and elevations.
The matrix should have three columns: x, y, and z, in that order. Typically
these correspond to location in the West-East, South-North, and vertical
elevation axes respectively.
In data with geographic coordinates, Z values are assumed to be in
metres. In data with projected coordinates, Z values are assumed to have
the same units as the X and Y coordinates.
lonlat
Are the coordinates in lon/lat (geographic) coordinates? TRUE by default.