在哪里可以找到所有英国_完整_邮政编码的列表,包括街道名称及其精确坐标?

发布于 2024-08-07 07:40:15 字数 119 浏览 7 评论 0原文

在哪里可以找到所有英国完整邮政编码的列表,包括街道名称及其精确坐标? 它们不应该像 AB1、AB23 等,而是 AB1 2AA、AB23 5ZZ 等。

最好是免费的:)

谢谢

Where can I find a list of all UK full postcodes including street name and their precise coordinates?
They should be not like AB1, AB23 etc but AB1 2AA, AB23 5ZZ etc.

Preferably for free :)

Thanks

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

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

发布评论

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

评论(8

最美的太阳 2024-08-14 07:40:15

您现在可以从地形测量局免费获取邮政编码数据
https://www.ordnancesurvey.co.uk /business-and-government/products/code-point-open.html
不过,这不附带街道名称

如果您希望将数据转换为纬度/经度,那么您可以从我的网站获取它
http://www.doogal.co.uk/UKPostcodes.php

You can now get postcode data for free from the Ordnance Survey
https://www.ordnancesurvey.co.uk/business-and-government/products/code-point-open.html
This doesn't come with street names though

If you want the data converted to lat/long then you can grab it from my site
http://www.doogal.co.uk/UKPostcodes.php

七分※倦醒 2024-08-14 07:40:15

您可以从此处完全免费下载包含纬度和经度值的整个 GB 邮政编码数据:

http://download .geonames.org/export/dump/

只需向下滚动到 GB.zip 还有其他国家的邮政编码信息,我使用了德国和波兰的数据,它们也可以。

You can download the entire GB postcode data complete with Lat and Long values from here completely free:

http://download.geonames.org/export/dump/

Simply scroll down to GB.zip There are also other countries postcode info, I have used Germany and Poland data and they are also OK.

自控 2024-08-14 07:40:15

作为 PyQt 自由项目的一部分,我编写了一个算法来获取用户输入的邮政编码并返回其街道名称。对于任何正在寻找商业系统替代方案的人来说,开源且简单的方法可以自由地使用它来解决这个问题。

我用 Python2.7 编写了它,但可以轻松地在新版本或其他语言中复制。

import urllib
from urllib2 import urlopen
import json

try:
    google_map_key = raw_input("please enter your google maps api key: ")
    postcode = raw_input("Please enter a UK Postcode: ")
    postcode = postcode.replace(" ", "")
    url = "https://maps.googleapis.com/maps/api/geocode/json?address="+postcode+"&key="+google_map_key
    response = urlopen(url)
    json_obj = json.load(response)
    counter = 0
    if json_obj['status'] == 'OK':
        for i in json_obj['results']:
            for x in i['address_components']:
                counter += 1
                if counter == 2:
                    print ("Long street name: " + x['long_name'])
                    break
    else:
        print("No results found! Please enter a valid postcode or check your internet connection and google api key")

except:
    print("Unhandle exception")

As part of a freelance project in PyQt I've written an algorithm to get user input of postcode and return the street name for it. For anyone who's looking for an alternative to commercial systems, open-source and straightforward approach to this issue can use it freely.

I've written it in Python2.7 but can easily be replicated in the newer versions or in other languages.

import urllib
from urllib2 import urlopen
import json

try:
    google_map_key = raw_input("please enter your google maps api key: ")
    postcode = raw_input("Please enter a UK Postcode: ")
    postcode = postcode.replace(" ", "")
    url = "https://maps.googleapis.com/maps/api/geocode/json?address="+postcode+"&key="+google_map_key
    response = urlopen(url)
    json_obj = json.load(response)
    counter = 0
    if json_obj['status'] == 'OK':
        for i in json_obj['results']:
            for x in i['address_components']:
                counter += 1
                if counter == 2:
                    print ("Long street name: " + x['long_name'])
                    break
    else:
        print("No results found! Please enter a valid postcode or check your internet connection and google api key")

except:
    print("Unhandle exception")
未蓝澄海的烟 2024-08-14 07:40:15

不幸的是,这是你必须付出代价的,而且它并不是特别便宜!如果您有兴趣,可以通过在线请愿来获取此信息。

商业方面,只需做一个英国邮政编码数据库的谷歌并选择,它们都有很多。

Unfortunately this is something you have to pay for, and it's not particularly cheap! There's an online petition to get this information freed if you are interested.

Commercial wise, just do a Google for uk postcode database and take your pick, they are all much of a muchness.

那小子欠揍 2024-08-14 07:40:15

皇家邮政是英国“官方”邮政编码数据库的供应商 - 他们拥有邮政编码以及邮政编码到 GIS 的映射。它受版权保护,并且需要支付大量许可费。

Postzon 是他们销售的产品,用于将邮政编码链接到 GIS 坐标。

过去有来自欧洲以外的第三方提供商以一小部分成本发布了详细信息,但这是一个非常灰色的区域,然后您就可以咨询律师领域。

The Royal Mail is the supplier of the 'official' Post Code database for the UK - they own the postcodes and postcode to GIS mapping. It's copyrighted and has some significant license fees.

Postzon is the product they sell to link the postcodes to the GIS co-ordinates.

There have been third party providers from outside europe who released details in the past for a fraction of the costs, but it's a very grey area, and you are then in consult a lawyer territory.

执手闯天涯 2024-08-14 07:40:15

操作系统“免费”版本很有用,但它确实有一些限制,例如没有北爱尔兰、马恩岛、根西岛或泽西岛的数据。

我投票支持 Doogal 的带有额外纬度和经度数据的版本,这对于像 OpenLayer 这样的地理地图来说更有用。

The OS "free" version is useful, but it does have a few limitations, for example no data for Northern Ireland, the Isle of Man, Guernsey or Jersey.

I vote for Doogal's version with the extra latitude and longitude data, which is more useful for geo-mapping like OpenLayer.

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