Skip to content

kriging shapefiles

3 messages · Leynnard Rey Matillano, Michael Sumner, Paul Hiemstra

#
It is perhaps easier than you think, see the example in gstat:

library(gstat)
?krige

After this is run "meuse" is a SpatialPointsDataFrame:

coordinates(meuse) = ~x+y

Any point shapefile read with readOGR from rgdal (or the alternative
functions in maptools) will also be SpatialPointsDataFrames, and so
the code will work much the same.

To use other kriging functions that perhaps use data.frames, just use
as.data.frame(x) to convert a SpatialPointDataFrame to the non-spatial
version.

Cheers, Mike.


On Wed, Oct 5, 2011 at 8:07 PM, Leynnard Rey Matillano
<silverstein_yellowcard at yahoo.com> wrote: