Learn R Programming

geosphere (version 1.3-13)

areaPolygon: Compute the areaPolygon of a polygon

Description

Compute the area of a polygon on a sphere. Polygons should not self-intersect.

Usage

areaPolygon(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* object
...
Additional arguments. One implemented r=6378137, the radius of the earth; default = 6378137 m

Value

  • area. Unit is the square of the unit of r (default is square meter).

References

Bevis, M. and G. Cambareri, 1987. Computing the area of a spherical polygon of arbitrary shape. Mathematical Geology 19: 335-346

See Also

centroid, perimeter

Examples

Run this code
p <- rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60), c(-180,-20))
areaPolygon(p)

Run the code above in your browser using DataLab