如何编写没有外部依赖项的地理编码器

发布于 2024-11-29 09:28:34 字数 653 浏览 0 评论 0原文

geocoder.usGoogle 地理编码 API;然而,这些都是有速率限制的。如何在不依赖这些服务(特别是输入地址并获取一组坐标)的情况下自己编写其中一个?

总体目标是使用 Haversine 公式 等公式计算两个地址之间的距离差。我过去使用半正矢来定位给定邮政编码特定距离内的邮政编码,但现在我需要深入到街道地址级别(基本上检查给定地址是否在另一个给定地址的特定范围内)。

最明显的事情是找到不受费率限制的付费服务。有人知道有这样的服务吗?在街道地址级别编写这样的内容似乎比邮政编码级别麻烦得多(尤其是一直在创建新的街道)。

目前,我只关注美国(大陆)。

编辑:我刚刚注意到 geocoder.us是开源的。这可能是一个很好的起点。

There are services such as geocoder.us and the Google Geocoding API; however, these are rate limited. How would one go about writing one of these on their own without having to rely on these services (specifically inputing an address and getting a set of coordinates)?

The overall goal would be to calculate the difference in distance between two addresses with a formula like the Haversine Formula. I've used haversine in the past to locate zipcodes within a specific distance of a given zipcode, but now I need to go down to street address level (basically checking if a given address is within a certain range of another given address).

The most obvious thing would be to find a paid service which is not rate limited. Does anybody know of such a service? Writing something like this at street address level seems a lot more cumbersome than zipcode level (especially with new streets being created all the time).

For the time being, I am only focusing on the (Continental) United States.

Edit: I just noticed that geocoder.us is open source. That may be a good place to start.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

£烟消云散 2024-12-06 09:28:34

似乎 geocoder.us 从可用的 美国人口普查 Tiger/Line® 文件下载。在互联网上浏览了一段时间后,我发现了一个名为 JGeocoder 的项目,其中详细介绍了从人口普查和基于该数据的地理编码

It seems like geocoder.us imports their data from the available U.S. Census Tiger/Line® file download. After poking around the internet for a while I found a project called JGeocoder with details on importing data from the census and geocoding based on that data.

不及他 2024-12-06 09:28:34

在我们公司,我们使用 Microsoft 的 MapPoint API。返回纬度/经度的 Web 服务,甚至尝试提供精确的地址。

此链接提供了一个示例调用: http://msdn.microsoft.com/en- us/library/bb545004.aspx

认为我们每个月支付固定费率(我在一家相当大的公司工作,所以也许我们会得到一笔批量交易 - 但我不认为我们 做。)
它返回的结果完全准确。无论是在美国还是国际上。

我认为他们已经将其重新命名为 Bing atm。

At our company, we use Microsoft's MapPoint API. A WebService which returns Lat/Lon, and even tries to offer a precise address.

This link gives an example call: http://msdn.microsoft.com/en-us/library/bb545004.aspx

I think we pay a fixed rate each month (I work for a fairly big company, so maybe we get a bulk deal - but I don't think we do.)
And the results that it returns are totally fine and accurate. Both in the US and internationally.

I think they've rebranded it under Bing atm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文