Thank you very much Edzer.

I need to project "rich".

Best,

Manuel

On 08/11/2010 12:55 a.m., Edzer Pebesma wrote:
>
> 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.


-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspin...@una.ac.cr
mspinol...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río 
<https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to