Calculate (signed) distances between coordinates
.find_dists(
grid,
names = NULL,
longlat = TRUE,
origin = 1L,
return_grid = FALSE,
lon_ref,
lat_ref
)List of signed distances.
A matrix of 2D points, first column x/longitude, second column y/latitude.
Names of locations.
Logical, if TURE Great Circle (WGS84 ellipsoid) distance; if FALSE, Euclidean distance.
Optional; used when longlat is TRUE. An integer index
indicating the reference location which will be used as the origin.
Logical; used when longlat is TRUE. If TRUE the mapped
coordinates on a 2D plane is returned.
Reference longitude when computing the longitudinal distances.
Default is the mean of longitudes in grid.
Reference latitude when computing the latitudinal distances.
Default is the mean of latitudes in grid.