[R-sig-Geo] Error with krige function
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Mon Nov 8 07:55:36 CET 2010
On 11/07/2010 11:58 PM, Manuel Spínola wrote:
> Dear list members,
>
> I got this error when running function krige:
>
> rich.vgm = variogram(N ~ 1, data = rich)
>
> rich.fit = fit.variogram(rich.vgm, model = vgm(8.8, "Ste", 0.003))
>
> > rich.kriged = krige(N~1, rich, as(r, "SpatialGridDataFrame"), model =
> rich.fit)
> Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, :
> var1 : data item in gstat object and newdata have different
> coordinate reference systems
>
First thing I would do after seeing this error message is to compare
their respective projections:
proj4string(rich)
proj4string(as(r, "SpatialGridDataFrame"))
as krige apparently would like these two to be identical.
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list