Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lengthLine

Length of lines


Description

Compute the length of lines

Usage

lengthLine(line)

Arguments

line

longitude/latitude of line as a matrix of 2 columns (first one is longitude, second is latitude) or a SpatialLines* or SpatialPolygons* object

Value

length (in meters) for each line

See Also

For planar coordinates, see gLength

Examples

line <- rbind(c(-180,-20), c(-150,-10), c(-140,55), c(10, 0), c(-140,-60))
d <- lengthLine(line)

geosphere

Spherical Trigonometry

v1.5-10
GPL (>= 3)
Authors
Robert J. Hijmans [cre, aut], Ed Williams [ctb], Chris Vennes [ctb]
Initial release
2019-05-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.