Re: [R-sig-Geo] Match polygon and dataframe IDs after raster::extract

2015-11-19 Thread Edzer Pebesma
On 19/11/15 16:36, Loïc Dutrieux wrote: > Thanks Edzer, > > But then, how safe is it to match attributes and geometries based on the > record order? Is there any chance that records get shuffled during the > dataframe manipulation steps, or the raster::extract? Can you think of a reason why

Re: [R-sig-Geo] Match polygon and dataframe IDs after raster::extract

2015-11-19 Thread Loïc Dutrieux
Thanks Edzer, But then, how safe is it to match attributes and geometries based on the record order? Is there any chance that records get shuffled during the dataframe manipulation steps, or the raster::extract? Also one note, SpatialPointsDataFrame() gives a warning, but

[R-sig-Geo] Match polygon and dataframe IDs after raster::extract

2015-11-19 Thread Loïc Dutrieux
Hi all, I'm trying to look at correlation between two raster layers, for different polygons. So I use raster::extract to get all the raster values for every polygon, do the calculation and feed the output back to a SpatialPolygonDataFrame. I got it working, but I have a doubt regarding the

Re: [R-sig-Geo] Match polygon and dataframe IDs after raster::extract

2015-11-19 Thread Edzer Pebesma
On 19/11/15 14:37, Loïc Dutrieux wrote: > Hi all, > > I'm trying to look at correlation between two raster layers, for > different polygons. So I use raster::extract to get all the raster > values for every polygon, do the calculation and feed the output back to > a SpatialPolygonDataFrame. > I