perimeter

0th

Percentile

Compute the perimeter of a polygon

Compute the perimeter of a polygon (or the length of a line) on a sphere

Keywords
spatial
Usage
perimeter(x, ...)
Arguments
x
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
...
Additional arguments. One implemented r=6378137, the radius of the earth; default = 6378137 m
Value

  • Numeric. The perimeter or length. Unit is that of r (default is m).

See Also

area, centroid

Aliases
  • perimeter
  • perimeter,matrix-method
  • perimeter,data.frame-method
  • perimeter,SpatialPolygons-method
  • perimeter,SpatialLines-method
Examples
xy <- rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60), c(-180,-20))
perimeter(xy)
Documentation reproduced from package geosphere, version 1.2-15, License: GPL

Community examples

Looks like there are no examples yet.