Takes a spatial points data.frame and a grid and gets the overlay IDs.
getGridIDs(x, grid, idcol = "id")
| x | a sf ('sf') or a SpatialPointsDataFrame ('sp') (with the observations). |
|---|---|
| grid | a sf ('sf') or a SpatialPolygon object ('sp') (a grid is expected) defining the maximum extent of visits effort. |
| idcol | column name for the grid names or ids |
A vector of the same length as the number of rows (observations) as x with a unique number corresponding to the grid's ID.