What are the units of distance in gstat variogram?
Asked Answered
B

1

10

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?

Brunhilde answered 26/5, 2012 at 21:20 Comment(2)
I don't know for certain but they may be great circle distances in km (the distance between the first two observations is ~10km for example).Tragic
If you want to check the distances manually, this blog may help you set up functions to run those calculations: r-bloggers.com/great-circle-distance-calculations-in-r PS: There is a gis.stackexchange.com for GIS related questions. It's a much smaller community than SO, but there are definitely some R users over there!Pylon
P
13

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).

Pylon answered 26/5, 2012 at 21:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.