Distance between 2 geocodes

前端 未结 9 1450
一生所求
一生所求 2020-12-05 22:10

What is the formula for calculating the distance between 2 geocodes? I have seen some of the answers on this site but they basically say to rely on SQL Server 08 functions,

9条回答
  •  清歌不尽
    2020-12-05 22:39

    Use an approximation of the earth and the Haversine formula. You can get a javascript version on the following url, which you can translate to your language of choice:

    http://www.movable-type.co.uk/scripts/latlong.html

    Here is another way: http://escience.anu.edu.au/project/04S2/SE/3DVOT/3DVOT/pHatTrack_Application/Source_code/pHatTrack/Converter.java

提交回复
热议问题