Skip to content
Prev 8937 / 29559 Next

clip a SpatialPolygonsDataFrame

On Thu, 5 Aug 2010, Laetitia Blanc wrote:

            
The answer is no, you cannot clip such an object in the way you want. You 
can subset to choose (manually) the member Polygons objects in your 
subset, but you cannot change their borders by clipping. Typically, 
clipping for display is done simply by using the xlim= and ylim= arguments 
to plotting functions, and for most cases this is sufficient, because the 
clipped objects are not needed for analysis.

It may be, before long, that you will be able to clip using an object 
describing your clipping window and the input object, using rgeos, now in 
development on R-Forge. The output object will, however, have to be 
without attributes, because the attributes of clipped Polygons objects 
cannot be assumed to be unchanged.

Hope this helps,

Roger