Postcode Data

Generation Method

These maps are generated from the ONS postcode points database. The first thing we do is remove the BT postcode area points which cover Northern Ireland as these have not been released as Open Data yet. We also drop all but one of the postcodes if we find two or more that cover exactly the same point. From the February 2015 release, we filter the co-incident points to try to remove those used for PO Boxes and use the most appropriate postcode. We then generate Voronoi (or Thiessen) polygons from these points.

Contains National Statistics data, Ordnance Survey data © Crown copyright 2014 Contains Royal Mail data © Royal Mail 2014 

The polygons created have boundaries that are equal distances from the nearest points and the area within the polygon is the area that is nearest each of the postcode points; pick any point within the NG1 3QS polygon and the nearest postcode point will be NG1 3QS.

The next thing we do is clip these polygons to the coastline, otherwise those next to the coast would extend out into the sea for ever. For Great Britain we use the Ordnance Survey Meridian 2 "county_region" layer to clip against. It was easier to join these together to get the coastline than to use the actual coastline layer which is made up of lines.

We then join these individual postcode polygons together to form the postcode sectors, districts and areas. Finally, for the areas we add in the BE, GU, IM and JE postcode areas using the European Environment Agency's (EEA) Coastline data and Department of Energy & Climate Change (DECC) boarder data.

The follow pages have a good comparison of postcodes produced using this method to the actual geographies.

The main pieces of software we use to create these postcodes areas are GEOSPostgis and QGIS. All of which are open source, so many thanks to the contributors to those projects.