Eurêka !
--
View this message in context:
http://r-sig-geo.2731867.n2.nabble.com/Clip-SpatialGridDataFrame-with-SpatialPolygons-tp7581998p7582001.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
___
R-sig-Geo mailing list
R-sig-Geo@r-
On 12/18/2012 04:59 PM, Nathalie Morin wrote:
> Hello again,
>
> Actually, I found the answer to my own question :
> clip <- D.tls.SPGDF[g,]
fullgrid(D.tls.SPGDF) = FALSE
clip <- D.tls.SPGDF[g,,drop=TRUE]
# and, if you want:
fullgrid(clip) = TRUE
gridparameters(clip)
>
> The problem is that t
Hello again,
Actually, I found the answer to my own question :
clip <- D.tls.SPGDF[g,]
The problem is that the coordinates and cells dimension remain unchanged
after the process !?
> summary(clip)
Object of class SpatialGridDataFrame
Coordinates:
minmax
[1,] 828049.000 828191
Hello!
I have already searched the Forums archives and sp documentation, but the
answer is still unclear to this basic question : how can you clip a
SpatialGridDataFrame with a SpatialPolygons and return a new clipped
SpatialGridDataFrame (not a vector !).
Here is my data as an example :