GetEdges: Computing the edges of any n-sided regular polygon on a...

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

View source: R/GetEdges.R

Description

Provides the edges coordinates for one n-sided regular polygon, corrected to account for the earth curvature.

Usage

1
GetEdges(center, radius, nedges, orient = 45)

Arguments

center

The geographical position of the polygon as c(lon, lat) in decimal degrees.

radius

The polygon radius (in meters).

nedges

The number of edges (3 -> triangle, 4 -> square, etc).

orient

The rotation factor of the polygon (in degrees).

Details

Earth-curvature corrections are assuming a sphere, hence expect some deformations near to the poles. In addition, polygons that overlap with the poles will have missing values (i.e. when center coordinates + radius lead to overeach a pole).

Value

Provides an array of coordinates for the n-edges defining the desired polygon (lines = points delimiting the polygon, columns = lon, lat in decimal degrees).

Author(s)

Nils Arrigo, nils.arrigo@gmail.com 2012 EEB, the University of Arizona, Tucson

References

This function was retrieved as a PHP code from http://blog.thematicmapping.org/ This is an amazing blog; the R2G2 dvpt team thanks a lot Bjorn Sandvik for his outstanding implementations in Google Earth, and for sharing his great ideas and resources. GetEdges is actually an R implementation of his material.

See Also

Hist2GE Pies2GE Shapes2GE curvy


R2G2 documentation built on May 29, 2017, 1:41 p.m.