Given a spatial extent (for example
cbind(c(0,0),c(10,10)),I want to see whether there is a part of a SpatialPolygons falls in this extent? How can I do this? Thank you very much!
Expanding on spacedman's suggestion, here is how you can get the intersection of two extents (NULL if not intersecting). 'sp' is a Spatial* object
But it may indeed be, as whuber points out, that the polygon is in fact not inside extent e. If you need to know that, do
For large problems, it may be efficient to do