View source: R/get_grids_from_points.R
get_grid5s_from_points | R Documentation |
This function accesses the api endpoint that accepts an array of points and returns the unique identifier of the associated 5-minute grids. The request_body argument must be a data-frame with the columns 'slug', 'dd_lat', and 'dd_lon'. All three fields must be populated. If the request is successful, the function will return an data-frame with the fields 'slug', 'dd_lat', 'dd_lon' and 'grid5_slug'. grid5_slug will identify the grid that the point defined by dd_lat and dd_lon is contained within. If the coordinates are outside the bounds of any known grid, the grid5_slug value will be NA.
get_grid5s_from_points(request_body, to_upper = FALSE)
request_body |
dataframe with the fields 'slug', 'dd_lat', 'dd_lon' |
to_upper |
|
See https://intra.glis.mnr.gov.on.ca/common/grid5s/ for the full list of 5-minute grids
dataframe
Adam Cottrill adam.cottrill@ontario.ca
points <- data.frame(
slug = c("point-A", "point-B", "point-C"),
dd_lat = c(45.0, 43.5, 45.5),
dd_lon = c(-81.4, -81.8, -81.0)
)
grid5s <- get_grid5s_from_points(points)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.