Many thanks for the fast replies,



@ Roger : polygons and raster are ok (see attached file).

@  Johannes : I have already try this but the result was not satisfying, using 
a SpatialPointsDataFrame do not solve the problem as the points are not  inside 
the polygon (see attached file).

I guess the problem arises because of the raster resolution that is to large 
....

Any suggestion would be appreciated,

Please find attached a plot showing the raster (image), the polygon and the 
centroid of the raster cells : 

image(grid, axes=TRUE)
plot(pol, add=TRUE)
points(coordinates(grid))

Regards,

Laure.
                                          
_________________________________________________________________
[[elided Hotmail spam]]

<<attachment: ex.jpg>>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to