Skip to contents

Calculate the sequential distances between sequential coordinate pairs

Usage

route_sequential_dist(m, lonlat = TRUE)

Arguments

m

Matrix containing coordinates and elevations

lonlat

Are the coordinates in lon/lat order? TRUE by default

Examples

x <- c(0, 2, 3, 4, 5, 9)
y <- c(0, 0, 0, 0, 0, 1)
m <- cbind(x, y)
route_sequential_dist(m)
#> Maximum distance is > 100km. The 'cheap' measure is inaccurate over such
#> large distances, you'd likely be better using a different 'measure', 
#> one of 'haversine', 'vincenty', or 'geodesic'. 
#> [1] 222257.4 111128.7 111128.7 111128.7 458196.5