[R-sig-Geo] problem in krige function
Roger Bivand
Roger.Bivand at nhh.no
Thu Apr 5 15:08:31 CEST 2007
On Thu, 5 Apr 2007, 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
If:
proj4string(el1)
proj4string(mask_SG)
differ, the function will stop you predicting from data declared to be in
one projection to newdata points in a different projection. You can set
them by:
proj4string(mask_SG) <- CRS(proj4string(el1))
(untried). If this does not work, post the commands you used to create the
objects.
Roger
>
> how can I solve this problem ?
>
> regards
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list