Dear All, I am trying to construct a variogram map from a SptialPolygonsDataFrame. I am not sure where to start as I would need a SpatialPoints and not Polygons. Is there a way to coerce it into points? I have tried as.SpatialPoints.ppp and as.SpatialPointsDataFrame but neither works (I have my matrix of coordinates `coords`). Bests, Ale
how to construct a variogram map
2 messages · Alessandra Carioli, Edzer Pebesma
3 days later
On 04/11/2014 03:14 PM, Alessandra Carioli wrote:
Dear All, I am trying to construct a variogram map from a SptialPolygonsDataFrame. I am not sure where to start as I would need a SpatialPoints and not Polygons. Is there a way to coerce it into points? I have tried as.SpatialPoints.ppp and as.SpatialPointsDataFrame but neither works (I have my matrix of coordinates `coords`). Bests, Ale
It depends whether your polygons represent a constant property throughout the polygons, e.g. like soil or geology maps do, or aggregate properties over an area, such as population over administrative regions. In the former case, you could use spsample to sample points within the polygons; in the second case you may want to assign the attribute values to polygon centroids, e.g. if your object is called pol, by SpatialPointsDataFrame(coordinates(pol), as.data.frame(pol))
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795