Variogram in R with distance in km

532 views Asked by At

I'm doing a spatial analysis on my data and I have their localization in terms of longitude and latitude. I calculated the sample variogram in R with geoR and gstat but what I get is the sample variogram with the distance in grades (longitude and latitude). I would like to have the same information but with the distance in km, like what happens when I calculate the spatio-temporal variogram with variogramST (gstat).

Thank you very much for those who are going to answer, it would help me a lot!

1

There are 1 answers

0
Edzer Pebesma On

You get that with gstat if you specify for your dataset that the coordinates are degrees latitude longitude, e.g. in case you use sp, with proj4string(x) = "+proj=longlat". "distances in degrees" do not exist, they are plane wrong (except on the equator).