Message-ID: <4614F0E5.5050005@geo.uu.nl>
Date: 2007-04-05T12:51:49Z
From: Edzer Pebesma
Subject: problem in krige function
In-Reply-To: <4615448D.5050705@deprem.gov.tr>
temiz wrote:
> following the topic GRASS and R kriging interpolation from grass6 tutorial
>
> I came here without problems
>
> But here:
>
> zz <- krige(z ~ 1, locations = el1 , newdata = mask_SG , model = efitted)
> Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, :
> var1 : data item in gstat object and newdata have different
> coordinate reference systems
>
> how can I solve this problem ?
>
How about making sure they are equal? If you know they are equal, do
proj4string(el1) = CRS(proj4string(mask_SG))
else use spTransform from rgdal to re-project.
gstat checks that the projection strings are exactly equal; this is a
check too strong, and should be replaced by some check that they
represent exactly the same projection. Does anyone know how to perform
this check?
--
Edzer