Skip to content
Prev 4413 / 29559 Next

subsetting

Hi,

Which version of R and sp are you using? I'm asking this because I had a 
similar problem as you had with a raster of 50.000+ points and some 7000 
polygons (not sure if this is comparable to your dataset). Doing the 
overlay took far too long, but after a question about this to the 
r-sig-geo list, Roger Bivand extended the code for point.in.polygon to 
first make a subset of the polygons based on the bounding boxes of the 
polygons (fast operation) and then perform a point in polygon operation. 
I'm not really sure from which version of sp this feature is included, 
but it should be included in the latest version (Roger?). Maybe an 
upgrade would solve your problem, it did mine.

hope this helps,
Paul
Pieter Beck wrote: