Haversine公式还是Vincenty公式更适合计算距离? [英] Is the Haversine Formula or the Vincenty's Formula better for calculating distance?

查看:872
本文介绍了Haversine公式还是Vincenty公式更适合计算距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在计算两个纬度/经度点(Haversine公式或Vincenty公式)之间的距离哪个更合适?为什么?

Which is better for calculating the distance between two latitude/longitude points, The Haversine Formula or The Vincenty's Formula? Why?

显然是在地球上计算距离. WGS84与GCJ02坐标是否会影响计算或距离(文森特公式考虑了WGS84轴)?

The distance is obviously being calculated on Earth. Does WGS84 vs GCJ02 coordinates impact the calculation or distance (The Vincenty's formula takes the WGS84 axis into consideration)?

例如,在Android中, Google Map Utils 中使用Haversine公式,但是android.Location对象(Location.distanceBetween())使用Vincenty公式.

For example, in Android, the Haversine Formula is used in Google Map Utils, but the Vincenty Formula is used by the android.Location object (Location.distanceBetween()).

推荐答案

Haversine 是一种更简单的计算,但不能提供Vincenty提供的高精度.

Haversine is a simpler computation but it does not provide the high accuracy Vincenty offers.

Vincenty 更准确,但计算量也更大因此会降低速度并增加电池使用量.

Vincenty is more accurate but is also more computationally intensive and will therefore perform slower and increase battery usage.

对于任何更好"的事情,都取决于您的特定应用程序.对于您的应用程序,Vincenty可能是比Haversine更好的选择,但是对于不同的应用程序,Haversine可能是更好的选择.您将必须查看用例的详细信息,并根据在其中找到的内容进行确定.

As with anything "better" is a matter of your particular application. For your application, Vincenty may be a "better" choice than Haversine, but for a different application, Haversine may be a better choice. You will have to look at the particulars of your use cases and make a determination based upon what you find there.

这篇关于Haversine公式还是Vincenty公式更适合计算距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆