Takes a spatial points data.frame and a grid and gets the overlay IDs.
getGridIDs(x, grid, idcol = "id")
a SpatialPointsDataFrame ('sp') or sf ('sf') (with the observations).
a SpatialPolygon object ('sp') or sf ('sf') (a grid is expected) defining the maximum extent of visits effort.
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.