Re: [R-sig-Geo] gstat variogram & great circle distance

2008-04-30 Thread Timothy W. Hilton
Hi Edzer, I am still having some trouble with the great distance calculations in 'variogram'. Your suggestion below works, but the distances are not correct (at least, not in kilometers, meters, or miles). I do not have proj.4 or gdal libraries installed, nor do I have the R packages proj4 or

Re: [R-sig-Geo] gstat variogram & great circle distance

2008-04-30 Thread Timothy W. Hilton
This works great, Edzer. I expected there was a simple solution. Many thanks! -Tim On Wed, Apr 2008, 30 at 07:42:36AM +0200, Edzer Pebesma wrote: > Timothy, for some reason the projected argument was not meant to be set > by users at this level of abstraction; I'll look into it. The following

Re: [R-sig-Geo] gstat variogram & great circle distance

2008-04-29 Thread Edzer Pebesma
Timothy, for some reason the projected argument was not meant to be set by users at this level of abstraction; I'll look into it. The following seems to work: > proj4string(foo)=CRS("+longlat") > proj4string(foo) [1] "+longlat" > variogram(z~1,foo) np distgamma dir.hor dir.ver i

[R-sig-Geo] gstat variogram & great circle distance

2008-04-29 Thread Timothy W. Hilton
Hello, I am trying to use gstat to compute a semivariogram for data whose coordinates are latitude/longitude pairs. I would like to use the great circle distance between pairs. The documentation implies that gstat can do this, but I am not having any success. If anyone could suggest the corr