G'day All,
I have been struggling to figure out an answer to this question and wasn't sure
where else to ask, so here goes. I have a large amount of presence/absence
point data (~125,000) with lon/lat coordinates. Like this:
Lat lon abs/pres
Have a look at ?sp::over
regards,
Tom
Am 02.02.2012 06:13, schrieb ADAM PETER CARDILINI:
G'day All,
I have been struggling to figure out an answer to this question and wasn't sure
where else to ask, so here goes. I have a large amount of presence/absence
point data (~125,000) with lon/lat
Hi Adam,
Here is code for something very similar that I was doing, which should help
with what you want to do. In this case, I made grids of varying resolution
to cover the extent of the area defined by my points, and then collected
the grid ids for each resolution and bound them to the
SpatialPoi
Adam,
Assuming your data are in a data.frame 'd'
library(raster)
r <- raster()
res(r) <- 1/120
cellID <- cellFromXY(r, d[, c('lon', 'Lat')] )
Robert
On Wed, Feb 1, 2012 at 9:13 PM, ADAM PETER CARDILINI wrote:
> G'day All,
>
>
>
> I have been struggling to figure out an answer to this question