地理位置,是否可以从地址获取纬度和经度并本地存储在我的数据库中

发布于 2024-12-15 16:37:15 字数 300 浏览 3 评论 0原文

我希望能够在本地运行查询来比较位置的纬度和经度,以便我可以根据距离对捕获的某些地址运行查询。

我找到了一个免费数据库,其中包含邮政编码的信息,但我想要更具体的地址的信息。我查看了谷歌的地理定位服务,发现将这些值存储在我的数据库中或将它们用于除使用谷歌地图之外的其他任何用途似乎违反了服务条款。 (如果有人对此进行了更深入的研究并且我错了,请告诉我)

我是否可能找到任何(免费或付费)服务可以让我在本地存储这些纬度/经度值?目前我需要的地址数量相当小,但如果我的网站变得流行,它可能会随着时间的推移而扩大到很大的数量。我只需要获取输入一次的每个地址的坐标。

I want to be able to run queries locally comparing latitude and longitude of locations so I can run queries for certain addresses I've captured based on distance.

I found a free database that has this information for zip codes but I want this information for more specific addresses. I've looked at google's geolocation service and it appears it's against the TOS to store these values in my database or to use them for anything other than doing stuff with google maps. (If somebody's looked deeper into this and I'm incorrect let me know)

Am I likely to find any (free or pay) service that will let me store these lat/lon values locally? The number of addresses I need is currently pretty small but if my site becomes popular it could expand quite a bit over time to a large number. I just need to get the coordinates of each address entered once though.

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

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

发布评论

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

评论(3

奶茶白久 2024-12-22 16:37:15

这个问题还没有得到足够的重视......

你是对的——它不能用谷歌的服务来完成,并且仍然符合TOS。为您诚实地寻求遵守服务条款而干杯。

我在一家名为 SmartyStreets 的公司工作,我们处理地址和 验证地址——并对它们进行地理编码。 Google 的条款不允许您存储从 API 返回的数据,并且在限制或切断您的访问之前有相当严格的使用限制。

屏幕抓取带来了许多技术和道德方面的挑战和问题,我想我不会在这里讨论它们。 Giorgio 链接到的 Microsoft 库仅适用于 .NET。

如果您仍然认真地想这样做,我们有一项名为 LiveAddress 的服务,可以从任何平台或语言。它是一个 RESTful API,可以使用 GET 或 POST 进行调用,输出是 JSON,很容易在几乎所有通用语言/平台中进行解析。

我们的条款允许您存储您收集的数据,只要您不重新制造我们的产品或建立您自己的数据库以试图复制我们的产品(或类似的东西)。不过,根据您的描述,这应该不是问题。

如果您对地址地理编码还有其他疑问,请告诉我;我很乐意提供帮助。

顺便说一下,我们的 GitHub 存储库中有一些示例代码:https://github.com/smartystreets/LiveAddressSamples

This question hasn't received enough attention...

You're correct -- it can't be done with Google's service and still conform to the TOS. Cheers to you for honestly seeking to comply with the TOS.

I work at a company called SmartyStreets where we process addresses and verify addresses -- and geocode them, too. Google's terms don't allow you to store the data returned from the API, and there's pretty strict usage limits before they throttle or cut off your access.

Screen scraping presents many challenges and problems which are both technical and ethical, and I don't suppose I'll get into them here. The Microsoft library linked to by Giorgio is for .NET only.

If you're still serious about doing this, we have a service called LiveAddress which is accessible from any platform or language. It's a RESTful API which can be called using GET or POST for example, and the output is JSON which is easy to parse in pretty much every common language/platform.

Our terms allow you to store the data you collect as long as you don't re-manufacture our product or build your own database in an attempt to duplicate ours (or something of the like). For what you've described, though, it shouldn't be a problem.

Let me know if you have further questions about address geocoding; I'll be happy to help.

By the way, there's some sample code at our GitHub repo: https://github.com/smartystreets/LiveAddressSamples

情释 2024-12-22 16:37:15

http://www.zip -info.com/cgi-local/zipsrch.exe?ll=ll&zip=13206&Go=Go 如果您只需要获取一次,可以使用屏幕抓取工具。

http://www.zip-info.com/cgi-local/zipsrch.exe?ll=ll&zip=13206&Go=Go could use a screen scraper if you just need to get them once.

许仙没带伞 2024-12-22 16:37:15

微软也提供这项服务。检查这是否可以帮助您 http://msdn.microsoft.com/en-我们/library/cc966913.aspx

Also Microsoft provides this service. Check if this can help you http://msdn.microsoft.com/en-us/library/cc966913.aspx

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