离线反向地理编码解决方案
我有一个带有纬度/经度的地点数据库,并且我有带有纬度/经度的传入请求。我想在数据库中找到与传入请求最接近的纬度/经度。是否有任何现有的库或算法可以做到这一点?在线搜索不断将我指向谷歌的反向地理编码库,这并不完全是我想要的。
一如既往,任何帮助都会受到极大的赞赏。 :)
I have a database of places with lat/lng and I have incoming requests with lat/lng. I'd like to find the closest lat/lng in the database to the incoming request. Is there any existing library or algorithm for doing this? Searching online keeps pointing me to Google's reverse geocoding library which isn't quite what I had in mind.
As always, any help is absurdly appreciated. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您实际上并不需要为此提供在线服务。只需应用正确的数学公式即可。
请参阅此处的一些示例(在 JavaScript 等中)...
http://www .movable-type.co.uk/scripts/latlong.html
另一个替代公式在这里...
http://wiki.answers.com/Q/What_is_the_formula_for_distance_using_latitude_and_longitude
You dont really need an online service for this. Just apply the correct mathematical formula.
See here for some examples (in JavaScript etc)...
http://www.movable-type.co.uk/scripts/latlong.html
Another alternative formula is here...
http://wiki.answers.com/Q/What_is_the_formula_for_distance_using_latitude_and_longitude