两个地方之间的物理距离 [英] Physical distance between two places

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

问题描述

我需要测量名称以字符串形式提供的两个地方之间的物理距离。由于有时名称的写法略有不同,我正在寻找一个可以帮助我衡量差异的库,然后将其与纬度和经度的度量相结合,以选择正确的匹配。首选语言:Java或PHP。

I need to measure the physical distance between two places whose names are provided as strings. Since sometimes the names are written slightly differently, I was looking for a library that could help me measure the difference and then combine it with a measure of the latitude and longitude to select the correct matches. Preferred languages: Java or PHP.

有任何建议吗?

推荐答案

请查看 Levenshtein距离。这是一种衡量两个字符串彼此不同的方式。

Have a look at the Levenshtein distance. This is a way of measuring how different two strings are from one another.

希望我能正确理解你的问题;在纬度和经度这个句子中使用距离可能会令人困惑!

Hopefully I understood your question correctly; using "distance" in the same sentence as "latitude and longitude" could be confusing!

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

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