[STATSGRASS] problem with kriging not solved but new qestions arise

Jarek Jasiewicz jarekj at amu.edu.pl
Sat Sep 2 01:18:40 EDT 2006


Roger Bivand napisa?(a):
> On Fri, 1 Sep 2006, Jarek Jasiewicz wrote:
>
>   
>> Jarek Jasiewicz napisa³(a):
>>     
>>> I try to krige some data, I do following grass wiki tutorial (that 
>>> with gaiciture)
>>>
>>>       
>> /cut
>>
>>
>> Jarek Jasiewicz napisa³(a):
>>     
>>> I try to krige some data, I do following grass wiki tutorial (that 
>>> with gaiciture)
>>>       
>> /cut
>>
>>
>>  > And I recive the error:
>>
>>  > Error in predict.gstat(g, newdata = newdata, block = block, nsim = 
>> nsim,  :
>>  >  data items in gstat object and newdata have different coordinate
>>  > reference systems
>>
>>
>> After 20 hours of fighting with R I partially solved that problem 
>> removing projection information (proj4) from both spatial data frames (I 
>> set roj4string:Formal class 'CRS' [package "sp"] with 1 slots
>>   .. .. ..@ projargs: chr NA)
>>
>> And all works well
>>
>> so - projection information (EPSG 2173 - Polish, 1965 zone IV) makes 
>> problem?
>>  why?
>> or eny projection makes problem - in fact, tutorial data has no proj4 
>> information
>>     
>
> This has just bitten me too!
>
> predict.gstat() tries to be fussy and check that the projections are 
> equal, but they are not always represented the same way even though they 
> are the same. In my case for Meuse bank I had:
>
>   
>> proj4string(BMcD_grid)
>>     
> [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +no_defs +a=6377397.155 
> +rf=299.1528128 +towgs84=565.036,49.914,465.839,-0.4094,0.3597,-1.86854,-4.0772"
>   
>> proj4string(BMcD)
>>     
> [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs"
>
> So I simply assigned from one to the other to have the same 
> representation before calling gstat():
>
>   
>> proj4string(BMcD) <- CRS(proj4string(BMcD_grid))
>>     
>
> I hope the same will work for you.
>
> Roger
>
>   
>> mayby sombody know???
>>  regards
>> Jarek
>>
>> _______________________________________________
>> statsgrass mailing list
>> statsgrass at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/statsgrass
>>
>>     
>
>   
Yes, work!

thanks a lot
Jarek




More information about the grass-stats mailing list