[R-sig-Geo] overlay SpatialPolygons and SpatialGridDataFrame, overlay

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Wed Dec 23 15:58:43 CET 2009

I am trying to clip a SpatialGridDataframe using a SpatialPolygonsObject 
(actually a simple rectangle, e.g. a region), the ultimate aim being to 
extract the corresponding area to a new SpatialGridDataFrame 
corresponding to the region. I was supposing that I can start doing it 
using the overlay function. Here we are:




I get:

Error in WorldTemp[!is.na(idx), ] :
  (subscript) logical subscript too long

The SpatialGridDataframe has  259200 pixels. Am I too greedy and is 
there really a limitation in length?

A second step would be to compute the upper left coordinates, etc... to 
get the new SpatialGridDataFrame But this is another story...

More information about the R-sig-Geo mailing list