ptcirc: Draw circles around a Lat/Long point

Description Usage Arguments Details Value See Also Examples

View source: R/ptcirc.R

Description

ptcirc creates a data frame of points forming a circle around a point.

Usage

1
ptcirc(lonlatpoint, radius)

Arguments

lonlatpoint

Numeric vector. A set of longitude and latitude pairs (decimal degrees), in that order. Can be a data frame or matrix, but the first column must be the longitude and the second must be latitude.

radius

Numeric. Radius of desired circle, in m.

Details

The function was adopted from an answer on R-Help, 20061107, by Arien Lam https://stat.ethz.ch/pipermail/r-help/2006-November/116851.html. Each point is the place where you end up if you travel a certain distance along a great circle, which is uniquely defined by a point (your starting point) and an angle with the meridian at that point (your direction).

Value

Output is a data frame with longitude, latitude, and "circle" columns. The circle column demarcates circles belonging to different Lon/Lat pairs.

See Also

GEcircle

Examples

1
2
ptcirc(c(-75, 37), 1609)
ptcirc(data.frame(lon = c(-76, -80), lat = c(34, 37)), 2000)

mhpob/TelemetryR documentation built on Sept. 28, 2020, 11:33 a.m.