Http 地理编码器 (Google) 准确度级别
我正在对大量用户输入的地址进行地理编码,并对返回的准确性级别感兴趣。我的目标是获得给定地址的最佳准确性分数。
我按照以下方式调用 geocder api http://maps.google.com/maps/geo?q={地址}&output=csv&sensor=false&key=xx
现在,针对带/不带前提名称的同一地址返回的准确度级别
- q = Key Arena, 305 Harrison Street, Seattle, WA 98109(准确度为 5)
- q = 305 Harrison Street Seattle, WA 98109(准确度为 8)
- q = Key Arena, Seattle, WA 98109(准确度为 9。)
从上面可以明显看出,当街道名称附加前提/地点时,Google 服务器不会返回最佳准确度。
问题是:) 有没有办法传递完整的地址(带有前提名称/即情况1) 并获得最大准确度。 (或者如何告诉谷歌服务器该地址是通过前提/建筑物名称和街道名称传递的)
(如果您在想为什么不只使用案例3,答案是这些是 用户输入地址,可以输入“我妈妈的房子”作为前提,并有准确的街道地址。在这种情况下,我希望准确度为 8 而不是 5)
I am geocoding a large amount of user entered addresses and interested in the accuracy levels returned. My GOAL is to get the BEST POSSIBLE ACCURACY score for a given address.
I call the geocder api following way
http://maps.google.com/maps/geo?q={address}&output=csv&sensor=false&key=xx
now the accuracy levels returned for same address with/without premise name
- q = Key Arena, 305 Harrison Street, Seattle, WA 98109 (Accuracy is 5)
- q = 305 Harrison Street Seattle, WA 98109 (Accuracy is 8)
- q = Key Arena, Seattle, WA 98109 (Accuracy is 9.)
Its obvious from the above that the google servers does not return the best accuracy when street name is appended with premise/venue.
the question is :)
is there a way to pass the complete address ( with premise name / i.e case 1 )
and get the Max Accuracy. ( or how can tell the google server that the address is passed with premise/building name and street name)
( if you are thinking why not just use case 3, the answer is these are
user entered addresses, they could enter "my moms's house" for premise, with accurate street address. in which case i want the accuracy to be 8 not 5)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很简单,只需做一个 if 语句来检查并看看准确性如何。如果它太低,请尝试在没有您的前提名称的情况下进行 goecode。在下面的例子中,我先尝试 addr_2,然后再尝试 addr_3,以考虑用户在 addr_1 上输入名称的情况。
有关我的内容的更多详细信息,请参阅使用 PHP/MySQL 对地址进行地理编码我在 format_address() 和 geocode_address() 中执行操作。
It's pretty easy, just do an if statement to check and see what the accuracy is. If it is too low, try and goecode without your premise name. In my case below, I'm trying addr_2 and then addr_3 to account for the situations where the user entered a name on addr_1.
See Geocoding Addresses with PHP/MySQL for more details on what I'm doing in format_address() and geocode_address().
今天,当我检查地址“Key Arena, 305 Harrison Street, Seattle, WA 98109”时,返回的准确度确实为 9。所以我认为地理编码服务出现了一些故障,或者谷歌改变了他们的算法。
Well today when i checked the address "Key Arena, 305 Harrison Street, Seattle, WA 98109" does return the accuracy as 9. So i assume either there was some glitch with geocoding service or google changed their algo..