View source: R/geodesic_fast.R
| geodesic_direct_fast | R Documentation |
These functions provide the same geodesic calculations as geodesic_direct(),
geodesic_inverse(), etc., but use a series approximation that is slightly
faster at the cost of reduced precision (accurate to ~15 nanometers vs
full double precision for the exact versions).
For most applications, the difference is negligible and these faster versions are recommended.
geodesic_direct_fast(x, azi, s)
geodesic_inverse_fast(x, y)
geodesic_path_fast(x, y, n = 100L)
geodesic_distance_fast(x, y)
geodesic_distance_matrix_fast(x, y = NULL)
x |
A two-column matrix or data frame of starting coordinates (longitude, latitude) in decimal degrees. |
azi |
Numeric vector of azimuths (bearings) in degrees, measured clockwise from north. |
s |
Numeric vector of distances in meters. |
y |
A two-column matrix or data frame of ending coordinates (longitude, latitude) in decimal degrees. |
n |
Integer number of points to generate along the path (including start and end points). |
Same as the corresponding exact geodesic functions.
geodesic_direct(), geodesic_inverse() for exact versions
# Fast inverse: London to New York
geodesic_inverse_fast(c(-0.1, 51.5), c(-74, 40.7))
# Compare to exact version
geodesic_inverse(c(-0.1, 51.5), c(-74, 40.7))$s12
geodesic_inverse_fast(c(-0.1, 51.5), c(-74, 40.7))$s12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.