arcs: Function to plot a set of great circle arcs between points

arcsR Documentation

Function to plot a set of great circle arcs between points

Description

Low level plotting of great circle arcs with lines

Usage

arcs(x, ...)

## S4 method for signature 'matrix'
arcs(x, breaks = 100, breakAtDateline = TRUE, plot = TRUE, ...)

Arguments

x

A matrix of longitude and latitude points (WGS 84 longlat)

...

Arguments passed to lines (par)

breaks

the number of points inserted between every points to draw great circle arcs.

breakAtDateline

Logical to indicate whether the lines are to be broken at the dateline.

plot

Logical value whether the plotting should be done at all (in case returned values are needed).

Value

Invisible return of a matrix of coordinates. If breakAtDateline = TRUE, then NA missing values will be inserted between coordinates where the lines cross the dateline.

Examples

# generate random points
set.seed(0)
example <- rpsphere(10, output="polar")

# plotting
plot(NULL, NULL, xlim=c(-180, 180), ylim=c(-90,90))
points(example)
text(label=1:nrow(example), example, pos=2)
arcs(example, col="red", breaks=200)

adamkocsis/icosa documentation built on Aug. 20, 2024, 1:35 a.m.