2个地理编码之间的距离 [英] Distance between 2 geocodes

查看:93
本文介绍了2个地理编码之间的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

计算2个地理编码之间的距离的公式是什么?我已经看到了这个网站的一些答案,但他们基本上都是依靠SQL Server 08的功能,我还没有在08。任何帮助将不胜感激。

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, I'm not on 08 yet. Any help would be appreciated.

推荐答案

使用地球近似值和 Haversine 公式。您可以在以下网址上获取一个JavaScript版本,您可以将其转换为您选择的语言:

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

这是另一种方式: http://escience.anu.edu.au/project/04S2/SE/3DVOT/3DVOT/pHatTrack_Application/Source_code/pHatTrack/Converter.java

这篇关于2个地理编码之间的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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