earth.poly: Calculating a Minimum Convex Polygon

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculate a minimum convex polygon for a collection of points without knowing what points form the vertices.

Usage

1
earth.poly(lats)

Arguments

lats

a table with a longitude and latitude column respectively as the first two columns, or a SpatialPoints object with longitude/latitude

Details

This function will calculate the area of a minimum convex polygon/convex hull for a spherical surface (ie points on a globe).

Value

The function will return a list consisting of the area in $km^2$ (\$area) and a vector with the row numbers of the vertices (\$vertices)

Author(s)

Matthew Vavrek

See Also

earth.tri

Examples

1
2
3
#1/8th the surface area of the earth
a <- matrix(c(0, 0, 0, 90, 90, 0, 25, 25), 4, 2, byrow = TRUE)
earth.poly(a)

Example output

Loading required package: sp
Loading required package: maps
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

$area
[1] 63794049

$vertices
[1] 1 2 3

fossil documentation built on March 23, 2020, 5:06 p.m.