Where can I find a list of all UK _full_ postcodes including street name and their precise coordinates?

北慕城南 提交于 2019-12-03 05:02:49

问题


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


回答1:


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




回答2:


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.




回答3:


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.




回答4:


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.




回答5:


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.




回答6:


Also try here for UK. http://www.freemaptools.com/download-uk-postcode-lat-lng.htm




回答7:


Here is the list in csv

https://raw.githubusercontent.com/Gibbs/uk-postcodes/master/postcodes.csv

More details : https://github.com/Gibbs/uk-postcodes




回答8:


You will have to buy it:

http://www.royalmail.com/portal/rm/jump2?mediaId=400085&catId=400084




回答9:


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")


来源:https://stackoverflow.com/questions/1538743/where-can-i-find-a-list-of-all-uk-full-postcodes-including-street-name-and-the

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!