Description Usage Arguments Details Value Note
The function returns a vector of distances between a single 2D point
(pts_x
, pts_y
) and a set of 2D points, provided as two double
vectors, pts_x
and pts_y
.
The distance calculation can be either the Great Circle distance (WGS84
ellipsoid, longlat = TRUE
), or the Euclidean distance (longlat = FALSE
).
1 |
pt_x |
A |
pt_y |
A |
pts_x |
A |
pts_y |
A |
longlat |
A |
This function is a thin R wrapper around the C function fishy_dists
. This
function performs no checking on the input, and arguments are passed down
to the C implementation as is. This means you should not use this function
if you do not know what you are doing.
A double
vector of distances in the original metric of the points.
The code is based on the source of sp::spDistsN1. We adapted and included sp::spDistsN1 in this package because of two reasons: (i) to avoid a dependency to sp, as this is the only function used from that package; and (ii) to adapt its prototype to accept vectors instead of matrices, as that fitted better in our workflow.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.