如何估计地球仪数据的变异函数?
我有相关经度和纬度的数据。如何根据点之间的大圆距离获得该数据的变异函数?
这个简单的示例包含赤道上的所有数据:
require(geoR)
long <- seq(-179, 180)
x <- sin(pi * long / 180) + rnorm(length(long))
V <- variog(data=x, coords=cbind(long, 0))
# variog: computing omnidirectional variogram
plot(V)
第一个点和最后一个点实际上仅相距 1 度,但我天真的尝试导致 variog
认为它们相距 359 度。
I have data with associated longitudes and latitudes. How do I get a variogram for this data based on the great-circle distances between the points?
This simple example has all the data on the equator:
require(geoR)
long <- seq(-179, 180)
x <- sin(pi * long / 180) + rnorm(length(long))
V <- variog(data=x, coords=cbind(long, 0))
# variog: computing omnidirectional variogram
plot(V)
The first and last points are actually only 1 degree apart, but my naive attempt results in variog
thinking they're separated by 359 degrees.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用来自 nmle 的半变异函数。它允许您指定一个距离矩阵,您可以自己轻松计算出该距离矩阵。
You should use the Semi-variogram from nmle. It allows you to specify a distance matrix, which you can trivially work out for yourself.
从 R-sig-geo 上的一篇文章(专用于 R 中空间数据的邮件列表)中,我似乎记得 R 中没有支持大圆距离的现成函数:
http://r-sig-geo.2731867.n2.nabble.com/Great-Circle-distances-in-Automap-Gstat-td6863940.html
我的建议是投影你的数据,然后对投影数据进行插值。
From a post on R-sig-geo (mailing list dedicated to spatial data in R) I seem to remember that there are no ready-to-go functions in R that support great circle distances:
http://r-sig-geo.2731867.n2.nabble.com/Great-Circle-distances-in-Automap-Gstat-td6863940.html
My suggestion would be to project your data and than perform interpolation on the projected data.