[R-sig-Geo] From Spatial Points Data Frame to Spatial Polygons Data Frame

2014-01-23 Thread Agustin Lobo
Hi! I'm trying to convert an SPointsDF of a set of points distributed as the centers of the cells of a 4x5 grid into a SPolygonsDF This is because the data actually come from the cell and not just from its center, and want to be able to export as shape and display the polygon grid on top of other

Re: [R-sig-Geo] From Spatial Points Data Frame to Spatial Polygons Data Frame

2014-01-23 Thread Edzer Pebesma
try: x = as(SpatialPixelsDataFrame(tmetad1, tmetad1@data, tolerance=.00086), "SpatialPolygonsDataFrame") spplot(x[2]) On 01/23/2014 02:06 PM, Agustin Lobo wrote: > Hi! > > I'm trying to convert an SPointsDF of a set of points > distributed as the centers of the cells of a 4x5 grid > into

Re: [R-sig-Geo] From Spatial Points Data Frame to Spatial Polygons Data Frame

2014-01-23 Thread Agustin Lobo
Thanks, works perfectly! Much better through SpatialPixelsDataFrame than through grid. This is also simplifying another script. Agus On Thu, Jan 23, 2014 at 3:03 PM, Edzer Pebesma wrote: > try: > > x = as(SpatialPixelsDataFrame(tmetad1, tmetad1@data, tolerance=.00086), > "SpatialPolygonsD