Skip to content
Prev 11849 / 29559 Next

Converting Spatial Polygons to data frame for krige.conv

G'day,

I'm re-running some old models with new data, but in the same location as previously. In the past I had a text file with the border coordinates, but this is no longer anywhere to be found - thus I'm coming unstuck with krige.conv() and the borders option.

I have otherwise moved very happily into using sp classes for everything, so can load a set of boundaries from PostGIS in using rgdal but although I find discussion about this (see below) for SpatialPoints, I am stumped for a method to convert Spatial Polygons to a list of coordinates - I guess I could manually split the object into it's component polygons and then iterate through the coords ... but I was hoping that there might be a method that I've overlooked.

I confess I have also forgotten how I originally created the text file I had - there must have been a method, but I'm not sure I can remember where it was. (> 5years ago). I thought it was maptools, but all the maptools functions seem to read into sp classes...

cheers

Ben
On 25/08/2010, at 8:53 PM, Edzer Pebesma wrote: