Compute the perimeter of a polygon (or the length of a line) on a sphere
Usage
perimeter(xy, r=6378137)
Arguments
xy
Longitude/latitude of the points forming a polygon; Must be a matrix of 2 columns (first one is longitude, second is latitude) or a SpatialPolygons* or SpatialLines* object
r
radius of the earth; default = 6378137 m
Value
Numeric. The perimeter or length. Unit is the square of the unit of r.