Skip to content
Prev 22630 / 29559 Next

Problem clipping SpatialPolygonDataFrame

Luciano,
The extent you are using to crop is the same as the extent of the
entire extent, so it does not surprise me that there is no change.
Here is an example that works:

library(raster)
library(rgeos)
g <- getData('GADM', country='ARG', level=1)
e <- extent(-63.6, -55.1, -32.8, -27.6)
x <- crop(g, e)
plot(g)
plot(x, add=TRUE, border='blue', lwd=2)

Robert


On Thu, Apr 23, 2015 at 7:36 AM, Luciano La Sala
<lucianolasala at yahoo.com.ar> wrote: