Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the units of distance in gstat variogram?

Tags:

r

spatial

This is a follow-up to this question. I have now managed to plot variograms of the data using the answers given to that question. The code I am using (where im is a variable containing the dput data given at https://gist.github.com/2780792 is

library(gstat)
point_data <- as(im, 'SpatialPointsDataFrame')
v <- variogram(band1 ~ 1, data = point_data)
plot(v)

This gives me the following plot: enter image description here

As you can see, the numbers on the distance axis range from 0 to around 150. However, the units of the data are degrees:

> head(coordinates(point_data))
             x        y
[1,] -1.849353 52.06165
[2,] -1.759728 52.06165
[3,] -1.401227 52.06165
[4,] -1.311602 52.06165
[5,] -1.221977 52.06165
[6,] -1.132352 52.06165

Given that, what are the units of the distance measures on the X axis? I would expect them to be in the same units as the co-ordinates. It doesn't make sense for them to be metres, I guess they could be km.

I can't find anything in the gstat manual about this, so I'd have assumed they used the underlying data's units, but this doesn't seem to be the case.

Any ideas?

like image 626
robintw Avatar asked May 26 '12 21:05

robintw


1 Answers

I found some people asking similar questions on the mailing lists and rechecked the details of the help files. Your data is unprojected (proj=+longlat). As the documentation and information I found in mailing lists indicate, it should be in km based on great circle distances. Check out the projection (logical) parameter in variogram:

For projected data, Euclidian distances are computed, for unprojected great circle distances (km).

like image 54
Bryan Goodrich Avatar answered Sep 21 '22 15:09

Bryan Goodrich