Basic lookup function of coordinates on an icosahedral grid
Usage
locate(x, y, ...)
# S4 method for trigrid,matrix
locate(x, y, randomborder = FALSE, output = "ui")
# S4 method for trigrid,numeric
locate(x, y, ...)
# S4 method for trigrid,data.frame
locate(x, y, ...)
# S4 method for trigrid,sf
locate(x, y, ...)
# S4 method for trigrid,SpatialPoints
locate(x, y, ...)
# S4 method for trigrid,SpatialPointsDataFrame
locate(x, y, ...)
# S4 method for hexagrid,matrix
locate(x, y, output = "ui", randomborder = FALSE, forceNA = FALSE)
Arguments
- x
(
trigrid
,hexagrid
) Icosahedral grid object.- y
(
matrix
,data.frame
,numeric
orSpatial
) Coordinates of individual points. Can be either a two-dimensional matrix of long-lat coordinates, a three-dimensional matrix of XYZ coordinates, or a set of points with classSpatialPoints
orSpatialPointsDataFrame
.- ...
Arguments passed to class specific methods.
- randomborder
(
logical
) Defaults toFALSE
. IfTRUE
, then the points falling on vertices and edges will be randomly assigned, otherwise they will be kept asNA
s.- output
(
character
) Either"ui"
or"skeleton"
."ui"
returns the face names used in the user interface, while"skeleton"
returns their indices used in back-end procedures.- forceNA
(
logical
) Suppressing the recursive lookup of points falling on subface boundaries.