11

I am trying to find the shapefiles for postcode sector and districts in the UK. Specifically inside London. I know I can go and pay for these but I only really need to use them once. I want to generate my own mapping tiles with the shapes on one version of the tiles. Allowing me to show all the postcode boundaries without overloading the JavaScript on the client side.

I could "redraw" some of shapes myself (tracing from others) but would be great if there were some shapefiles already out there.

Can anyone help?

  • There are plenty of other answers on this, just do a search, but try richardallen.co.uk. – Stev_k Feb 6 '14 at 14:51
7

We've recently released reconstructed postcode boundaries in shapefile format for UK postcode areas, districts and sectors (reconstructed from unit postcode geocodes using Voronoi etc). They are free to use. Obviously the reconstruction is approximate and may not be suitable for all purposes.

They are available at http://www.opendoorlogistics.com/data.

| improve this answer | |
5

Someone has done it using various royalty and copyright free sources of data - see http://random.dev.openstreetmap.org/postcodes/. In my view the best is the Code-Point Opendata as it comes straight from Royal Mail. I don't think it's quite the same as the actual Royal Mail files but it's probably accurate enough. The files don't seem to be available so you could either contact the author or replicate the process, using the provided source code.

An alternative would be to download the OS OpenData Code-Point and run a tool to create Voroni Polygons on them - this is how the polygons linked are created I think. Most GIS programs should be able to accomplish this task.

| improve this answer | |
4

UK postcodes don't cover polygons. They cover a set of individual delivery points which are not necessarily contiguous.

It is certainly possible, given the co-ordinates for these delivery points, to describe a polygon such that all the co-ordinates are within that polygon. However, such a polygon would not be a unique solution - there would be many polygons that could potentially fit the bill. See, Algorithm to find polygons enclosing points.

| improve this answer | |
  • This is incorrect. The OS provide official postcode polygon data - ordnancesurvey.co.uk/business-and-government/products/… – Matt Oct 31 '18 at 11:00
  • @Matt, the page you linked to says "Code-Point with polygons shows the notional shape of every postcode unit in Great Britain". Google defines notional as "existing as or based on a suggestion, estimate, or theory; not existing in reality." – tobyink Nov 26 '18 at 21:17
3

You can create your own from:

Codepoint Open https://www.ordnancesurvey.co.uk/opendatadownload/products.html

Supply format: CSV

Version: 11/2013

Code-Point Open provides a precise geographic location for each postcode unit in Great Britain. The product is a CSV file containing postcodes, grid references, NHS® health and regional health authority codes, administrative ward, district, county and country area codes.

Some of this data is in WGS84 on http://parlvid.mysociety.org/os/

GB Postcode Areas or use the pre-converted (check the age of this source)

Thiessen polygons were generated from all records in OS OpenData Code-Point Open. Resulting coverage was dissolved up to postcode area level and then clipped to GB extent of the realm using OS OpenData Boundary-Line. Names of postcode areas were added from Wikipedia.

https://www.sharegeo.ac.uk/handle/10672/51?show=full

| improve this answer | |
3

If you qualify for the OS PSMA (Public Sector Mapping Agreement) then you can get Codepoint with polygons for free. They provide an excellent service and it's delivered the very next day.

Have a google for PSMA to see if you qualify.

| improve this answer | |
2

https://datashare.is.ed.ac.uk/handle/10283/2597

Even though this question was asked a long time ago, for anyone trying to find it. This website has the recently updated UK Postcode Area, Postcode District and Postcode Sector shapefiles in the 'GB_Postcodes.zip' file.

| improve this answer | |
1

I'm pretty sure that the Postcode data you want is not available for free. I believe Ordnance survey and Royal Mail are still talking about how royalties will be paid/collected when detailed Postcode data is released under the PSMA.

| improve this answer | |
  • This is wrong - OS have already released the Code Point data (which is at individual postcode centre-point detail - sufficient to create broad boundaries). It's available here: ordnancesurvey.co.uk/opendatadownload/products.html – Stev_k Aug 29 '12 at 20:57
  • Very true Stev_k but it doesn't contain all the Royal Mail PAF data. It may be that Charlie doesn't require the PAF data but as someone who uses both I tend to think of them as one and the same, my mistake I know :) – nigellaw Aug 29 '12 at 21:05
  • hey guys, I am interested in creating the boundaries, primararily for Sector / District... @Stev_k how can i do this from the code point data which only includes the centre point? I would have to make assumptions? – Charlie Davies Aug 29 '12 at 23:29
  • You could use Voroni polygons as per my method above. – Stev_k Aug 29 '12 at 23:37
0

You could always get the postal code data from Wikileaks. It is dated now but hey.

https://wikileaks.org/wiki/UK_government_database_of_all_1,841,177_post_codes_together_with_precise_geographic_coordinates_and_other_information,_8_Jul_2009

UK government database of all 1,841,177 UK postcodes together with latitude and longitude, grid references, county, district, ward, NHS codes and regions, Ordnance Survey reference, and date of introduction. The database was last updated on July 8, 2009 and is over 100,000 pages in size.

The database is structured as a plain text file, with each entry taking one line and with distinct fields separated by commas. The very first line specifies the order of the 17 fields of information about each postcode.

I do not endorse the use of leaked data.

| improve this answer | |
  • 3
    The latest version of this data is open now anyway - i.e. freely and legally downloadable. – Open Door Logistics Jan 9 '16 at 18:53
  • That is good news. Only twenty years late... – If you do not know- just GIS Jan 9 '16 at 18:56
  • Care to link us to it, @OpenDoorLogistics? – hd1 Aug 9 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.