Description Usage Arguments Details Value
View source: R/nearest_gridpoint.R
Calculates nearest point on a grid to a reference point in longitude, latitude degree decimal.
1 | nearest_gridpoint(lon, lat, grid, measure = c("euclidian","haversine"))
|
lon, lat |
longitude and latitude of the reference point in degrees decimal. |
grid |
matrix or data.frame with at leats two columns named |
measure |
method for distance calculation. Currently |
The distance of each point on grid
is calculated either as a euclidian distance, or with the Haversine Formula, which computes the great-circle distance between two points on a sphere.
An list with components:
idx |
index of the point nearest to coordinates |
lon |
longitude of reference point on |
lat |
latitude of reference point on |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.