We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
邮政编码位置数据现在免费提供。请参阅此答案:
https://www.ordnancesurvey.co.uk/opendatadownload/products.html
您想要的是“代码-点开”。
Postcode location data is available free now. See this answer:
https://www.ordnancesurvey.co.uk/opendatadownload/products.html
The one you want is "Code-Point open".
这里是。转储 SQL 表,其中包含邮政编码、LAT/LON、X/Y 坐标:)
下载 zip (英国邮政编码.zip) 和
有关更多信息,请阅读 [same-website]/guides/article.php?article=64 :)
我还没有测试过它,但它应该可以工作,小伙子 :)
快乐编码 ^^
Here it is. Dumped SQL table full of Postcodes, LAT/LON, X/Y coordinates :)
Download zip (UK-Postcodes.zip) and
for more info read [same-website]/guides/article.php?article=64 :)
I haven't tested it, but it should be working, lad :)
Happy coding ^^
也许 Nominatim 应该可以解决问题。唯一的问题是它可能不是最新的。
Maybe Nominatim should do the trick. The only problem is that it might not be up to date.
Geonames.org 提供免费的可下载数据库。您可以尝试 Bing API 或其他商业产品,但它们对在一段时间内可以进行多少次查询以及如何使用它有相当严格的条款和条件(需要律师来解释它们的细微差别)。
我发现 Geonames.org 足以满足我的需求。
Geonames.org offers a free downloadable database. You could try Bing API or other commercial offerings but they have rather restrictive T&C in how many queries you can make within a time period, how you can use it (needs a lawyer to interpret their nuances).
I found Geonames.org to be more than sufficient for my needs.
对于邮政编码数据库,不幸的是我无法帮助你。
但对于 Google...您知道,您不必每次都对每个邮政编码执行此操作。您可以将这些值缓存在数据库中,并且只需为每个新邮政编码执行一次。尽管这需要一些时间,但这是可能的。
是啊,还是很烂。但总比没有好。
For postcode database, unfortunately I cannot help you.
But for Google... You know, you don't have to do this for EVERY postcode EACH time. You can cache the values in your database and do it only once for each new postcode. Although this will take some time, it's possible.
Yeah, it still sucks. But better than nothing.
http://www.freethepostcode.org/ 提供您可能会觉得有用的信息。
http://www.freethepostcode.org/ provides information you may find useful.
我只在商业软件的本地数据库中看到过这种情况,可能是因为皇家邮政对其邮政编码数据施加了许可限制。
不过,有些具有相当高速率限制的 API 可以对英国邮政编码进行地理编码。雅虎的地理编码 API 每天的点击次数被限制为 5,000 次,但这意味着您可以在四天内完成整个数据库,将纬度/经度存储在数据库中,然后使用它来添加新地址。
另外——您需要的信息有多准确?如果您只需要一个大概的位置,您可以对出站进行地理编码(例如“BS1”);我在网上看到过一些用户来源的数据库,其合法性至少是有争议的。
I've only seen this done from a local database with commercial software, possibly because of the licensing restrictions the Royal Mail put on their postcode data.
There are APIs with reasonably high rate limits that can geocode UK postcodes, though. Yahoo's geocoding API is restricted to 5,000 hits a day, but that means you could have your entire database done in four days, store the lat/lon in the database, and just use it to add new addresses as they come in, say.
Also -- how accurate do you need the information? If you just need a rough location, you could geocode to the Outbound (e.g. "BS1"); I've seen user-sourced databases of at least arguable legality around the net for that.