Description Usage Arguments Details Value Author(s) Examples
View source: R/ArcIntersection.R
Given two arcs returns point(s) at which they intersect on a sphere.
1 2 3 4 5 6 7 8 9 10 11 12 | ArcIntersection(
longitude_1,
latitude_1,
longitude_2,
latitude_2,
longitude_3,
latitude_3,
longitude_4,
latitude_4,
type = c("arc", "arc"),
EarthRad = 6367.4447
)
|
longitude_1 |
Decimalised longitude of first point on first arc. |
latitude_1 |
Decimalised latitude of first point on first arc. |
longitude_2 |
Decimalised longitude of second point on first arc. |
latitude_2 |
Decimalised latitude of second point on first arc. |
longitude_3 |
Decimalised longitude of first point on second arc. |
latitude_3 |
Decimalised latitude of first point on second arc. |
longitude_4 |
Decimalised longitude of second point on second arc. |
latitude_4 |
Decimalised latitude of second point on second arc. |
type |
Vector to indicate if elements are arcs or Great Circles. |
EarthRad |
Earth radius in kilometres. |
Assumes shortest distance between points describes arc. Can define Great Circle-arc intersection with type
option.
Matrix of longitude-latitude points at which intersection(s) occur.
Graeme T. Lloyd graemetlloyd@gmail.com
1 2 3 4 5 6 7 8 9 10 | longitude_1 <- stats::runif(1, -180, 180)
longitude_2 <- stats::runif(1, -180, 180)
longitude_3 <- stats::runif(1, -180, 180)
longitude_4 <- stats::runif(1, -180, 180)
latitude_1 <- stats::runif(1, -90, 90)
latitude_2 <- stats::runif(1, -90, 90)
latitude_3 <- stats::runif(1, -90, 90)
latitude_4 <- stats::runif(1, -90, 90)
ArcIntersection(longitude_1, latitude_1, longitude_2, latitude_2,
longitude_3, latitude_3, longitude_4, latitude_4, EarthRad = 6367.4447)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.