邮政编码 +国家/地区到地理坐标

发布于 2024-08-18 01:46:51 字数 1094 浏览 12 评论 0原文

获取给定国家/地区的给定邮政编码/邮政编码的坐标(纬度/经度)的最完整、精确和可靠的方法是什么?我需要发出大量请求,因此高 API 限制率(甚至可能不存在)会很有用。

GeoNames 转储会很酷,但它似乎有太多重复的坐标(示例),而且他们的数据库似乎还缺少一些 ZIP /特定国家的邮政编码。

还有其他(可靠的)替代方案吗?


虽然我正在阅读元问题,我遇到了这个链接:

http://query.yahooapis.com/v1/public/yql?q=select%20%2A%20from%20geo.places%20where%20text%3D%22Jyv%C3%A4skyl%C3%A4%22&format=xml

我以前听说过YQL,但我不知道我可以用它来对地址进行地理编码,所以我搜索了一下并我发现了这条非常有趣的信息

使用限制

每个应用程序限制(由 您的访问密钥):每 100,000 次调用 日

每个 IP 限制:/v1/public/:1,000 每小时通话次数; /v1/yql/: 10,000 每小时调用次数

有人知道在哪里可以获取使用 YQL 进行地理编码地址的更多具体信息吗?

What is the most complete, precise and reliable way to get the coordinates (latitude / longitude) of a given ZIP / Postal Code of a given country? I need to make a lot of requests, so a high API limit rate (maybe even absent) would be useful.

GeoNames dumps would be cool, but it seems to have way too many duplicate coordinates (example) and it also seems that their database is missing some ZIP / postal codes for specific countries.

Are there any other (reliable) alternatives?


While I was reading a Meta question, I came across this link:

http://query.yahooapis.com/v1/public/yql?q=select%20%2A%20from%20geo.places%20where%20text%3D%22Jyv%C3%A4skyl%C3%A4%22&format=xml

I had heard of the YQL before but I had no idea I could use it to GeoCode addresses, so I searched a little and I found this very interesting piece of information:

Usage Limits

Per application limit (identified by
your Access Key): 100,000 calls per
day

Per IP limits: /v1/public/: 1,000
calls per hour; /v1/yql/: 10,000
calls per hour

Does anyone know where I can get more specific info in using YQL to GeoCode addresses?

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

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

发布评论

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

评论(4

熊抱啵儿 2024-08-25 01:46:51

雅虎! GeoPlanet 将为您提供邮政编码的质心纬度/经度点。根据我的经验,他们是可靠的。 API 限制为每天 50,000 个请求。我不确定他们的缓存结果政策是什么。我的印象是,如果您联系雅虎!,您可以安排更高的请求限制,尽管这可能会花费一些钱。

他们还允许您根据知识共享许可下载其大部分数据,但是不幸的是,这似乎仅限于 WOEID 关系和国家/地区名称。

Yahoo! GeoPlanet will give you centroid lat/long points for postal codes. They've been reliable in my experience. The API limit is 50,000 requests per day. I'm not sure what their policy on caching results is. I get the impression that if you contact Yahoo!, you can set up an arrangement with a higher request limit, though it may cost some money.

They also let you download a substantial portion of their data under a Creative Commons license, but unfortunately that appears to be limited to the WOEID relationships and country names.

冷情 2024-08-25 01:46:51

我认为您的选择可能取决于您每天打算进行多少次 API 调用。免费 Google Maps API 的每日限制是每个 IP 地址 15,000 个请求。 (来源:Google Maps API 常见问题解答。)

您可以使用以下命令进行地理编码Google Maps API 使用以下 HTTP 请求:

简单 CSV:

http://maps.google.com/maps/geo?q=W1A+1AA,+London&output=csv&sensor=false

更复杂的 XML:

http://maps.google.com/maps/geo?q=W1A+1AA,+London&output=xml&sensor=false

只需更改“q”参数以及要进行地理编码的邮政编码和国家/地区。

但是,我认为将地理编码结果永久存储在数据库中可能会违反 Google Maps API 条款和条件。您可能需要查看有关这些限制的更多信息。

I think that your choice will probably depend on how many API call you intend to make per day. The daily limit of the free Google Maps API is 15,000 request per IP address. (Source: Google Maps API FAQ.)

You can do geocoding with Google Maps API using the following HTTP request:

Simple CSV:

http://maps.google.com/maps/geo?q=W1A+1AA,+London&output=csv&sensor=false

More Complex XML:

http://maps.google.com/maps/geo?q=W1A+1AA,+London&output=xml&sensor=false

Simply change the "q" parameter with the postcode and country to geocode.

However, I think that storing the geocoding results permanently in your database may be a violation of the Google Maps API terms and conditions. You may want to check for more information about these restrictions.

贩梦商人 2024-08-25 01:46:51

最简单的方法当然是找到一个没有请求限制的高质量服务提供商。为什么不向谷歌询问报价呢?据我所知,他们对商业客户相当灵活。

如果这不是一个选择,您当然可以获得单独的数据文件,并且在许多国家/地区票价比 33 格兰德便宜。我很确定德国和奥地利以 3 位数的价格出售数据文件,而英国则有 邮政编码地址文件 (PAF) 这是来自皇家邮政的数据,我认为质量不会比这更好。
当然,除了成本和麻烦之外,还有大量的转换工作需要处理来自不同邮局的 26 个单独的文件等等 - 我不会羡慕任何人的工作:) 如果你有预算,它可能是与谷歌或雅虎交谈最便宜。

The easiest way would of course be finding a high-quality service provider with no request limit. Why not ask Google for an offer? From what I hear, they are quite flexible towards business customers.

If that's not an option, you will certainly be able to get individual data files, and fare cheaper than 33 grand in many countries. I'm quite sure German and Austrian sell data files at 3-figure prices, and for the UK there's the Postcode Address File (PAF) it's data from the Royal Mail, I don't think quality gets better than that.
Of course, in addition to the cost and hassle, there would be a lot of converting work to do with 26 individual files from different Post offices and whatnot - work I wouldn't envy anybody for :) If you have the budget, it's probably cheapest to talk to Google or Yahoo.

仲春光 2024-08-25 01:46:51

这实际上是一个非常棘手的问题,因为邮政编码实际上并不是一个多边形区域,而是一组聚合在一起的线(请参阅 如何获取美国邮政编码的边界坐标? 对此有非常详细的解释.)

在美国,人口普查局维护着一份近似邮政编码边界的列表,称为“五位数邮政编码制表区域”(ZCTA5)。您可以直接下载这些并按照您喜欢的方式处理它们。有几种地理编码工具可以帮助您开始使用此工具;我使用 PostGIS (http://postgis.net/),但还有其他的,最重要的是开放街道地图数据 ( http://www.openstreetmap.org),覆盖全世界。

That's actually a really tough problem since a ZIP code is not actually a polygonal region, but a set of lines aggregated together (see the best anser to How to get the bounding coordinates for a US postal(zip) code? for a very detailed explanation of this.)

Within the United States, the Census Bureau maintains a list of approximate Zip Code boundaries called the "Five digit Zip Code Tabulation Areas" (ZCTA5). You can download these directly and process them however you like. There are several geocoding tools which can get you started with this; I use PostGIS (http://postgis.net/) but there are others, most importantly the Open Street Maps data (http://www.openstreetmap.org), which covers the world.

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