查找由distVincentyEllipsoid

问题描述

我有2个数据帧:

A

ID     long      lat 
1 -89.92702 44.19367 
2 -89.92525 44.19654 
3 -89.92365 44.19756 
4 -89.91949 44.19848 
5 -89.91359 44.19818 

B

ID      LAT       LON
1  43.06519 -87.91446
2  43.14490 -88.07172
3  43.08969 -87.91202

然后我计算了两个数据帧之间的距离,

mat <- distm(A[,c('long','lat')],B[,c('LON','LAT')],fun=distVincentyEllipsoid)

使用distVincentyEllipsoid中的geoshpere

A$dist <- max.col(-mat)

返回距离值列表。

根据geosphere,此距离应以米为单位。

对吗?

我之所以问,是因为我从实际数据中获取的值似乎对米单位没有意义。如果距离很远,它们会更有意义...

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...