Specification
Content
Code-Point with Polygons contains:
The OS Code-Point product which contains georeferenced postcode unit data, alongside associated metadata such as address counts and quality indicators. Also provided are the health and administrative area codes related to each postcode. The coverage of the Code-Point data is the whole of the UK and it is provided in both comma-separated values (CSV) format and GeoPackage format.
Also provided, in association with the Code-Point data, is a text file that provides the full text equivalents of the administrative area codes, and another that provides the numbers of postcode units in each postcode area.
Postcode unit polygons depicting notional boundaries around each postcode unit in Great Britain. This data is supplied in either Shapefile, TAB, MID / MIF, vector tiles, or GeoPackage formats
Also provided, in association with the polygon data, are two sets of CSV text files containing Vertical Street, and Discard data.
Product structure
Shapefile, MID / MIF, TAB and vector tiles
The Code-Point with Polygons product contains two sets of data in two different folders:
Code-Point – This contains the OS Code-Point product, details of which can be found in the Code-Point Overview, Getting Started Guide, and Technical Specification documents.
Polygons – The Polygons folder contains the following text file:
Licence.txt – Licence, copyright and specification change information And two sub-folders: Docs and Data.
The Docs folder contains the following file:
Order Details.txt – Notes about the data
The Data folder contains the following sub-folders:
Polygons – Contains polygon data in 120 postcode area files for Shapefile, MID / MIF and TAB formats, or one national file for vector tiles format.
Discard_files – A lookup list of 120 text files of the postcodes that have not been included in the polygon creation process because either there are no AddressBase records of sufficient
PQ classification, or they are PO Box postcodes.
Vertical_streets – A lookup table of 120 text files of vertical street reference codes and the postcodes contained in them.
GeoPackage
The Code-Point with Polygons GeoPackage format contains the following text files:
Codepoint Licence.txt – Licence information.
Codepoint with Polygons Licence.txt – Licence information.
And three sub-folders: Codepoint_Resources, Data and Docs:
The Codepoint_Resources folder contains text files relating to the Code-Point product, details of which can be found in the Code-Point Overview, Getting Started Guide, and Technical Specification documents.
The Data folder contains the following sub-folders:
Data – Code-Point with Polygons GeoPackage (following the convention Geopackage_MMM_YYYY.gpkg, where MMM_YYYY are the month and year of release, respectively).
DISCARD_FILES – A lookup list of 120 text files of the postcodes that have not been included in the polygon creation process because either there are no AddressBase records of sufficient
PQ classification, or they are PO Box postcodes.
VERTICAL_STREETS – A lookup table of 120 text files of vertical street reference codes and the postcodes contained in them.
The Docs folder contains the following text file:
Order Details.TXT – Notes about the data (this file).
Data specification
Polygons
The file contains polygon data in 120 postcode area files in the chosen format.
The following table represents the structure of the data in Shapefile, TAB and MID / MIF formats:
Field name | Type | Width | Description |
---|---|---|---|
FID1* | N/A | N/A | Feature identifier added by the software. |
Shape * | Polygon | N/A | Feature geometry. |
POSTCODE | Char | 8 | Full postcode from Code-Point. |
UPP | Char | 20 | Unique polygon identifier (including 4 leading zeros). |
PC_AREA | Char | 2 | The Postcode area, for example, SO. |
For information, the attribute headers in GeoPackage are lowercase; the data structure is the same.
Example in TAB and MID / MIF: ”TA15 1PL”,00004000000001389232”,”TA”
Example of Shapefile “0”,”Polygon”,”TA15 1PL”,00004000000001389232”,”TA”
The vector tiles format contains a single file with a national set of postcode polygons in vector tiles format. The vector tiles schema is detailed in the table below. In the zoom levels columns within the table, the letter N indicates that the specified layer and attribute is not mapped within that zoom level, whereas the letter Y indicates that the specified layer and attribute is mapped within that zoom level.
Postcode | N | N | N | N | N | Y | Y |
UPP | N | N | N | N | N | Y | Y |
PC_Area | N | N | N | N | N | Y | Y |
Vertical street lookup
Vertical streets is a list of polygons, identified by a serial number that is prefixed by the letter V, which contain more than one postcode. This situation can occur in, for example, blocks of flats where there is more than one postcode within a single building.
The Vertical Street lookup contains 120 postcode area text files of vertical street reference codes and the postcodes contained in them.
* Denotes presence in Shapefile format only.
Field name | Type | Width | Description |
---|---|---|---|
POSTCODE | Char | 8 | Full postcode from Code-Point. |
ID | Char | 8 | Unique polygon identifier (including four leading zeros). |
Example: "UB1 1ET","VUB00001"
Discard files
Discard files is a list of the postcodes for which polygons have not been included because there is no data of sufficient quality to use in the polygon creation, or because their constituent addresses lie outside the extent of the realm (coastline). Also in the discard file are PO Boxes – a list of the PO Box postcodes, none of which will have been used in the creation of the polygon set.
The Discard File lookup contains 120 postcode area text files of the postcodes.
Field name | Type | Width | Description |
---|---|---|---|
POSTCODE | Char | 8 | Full postcode from Code-Point |
REASON | Char | 7 | The reason for the postcode not having representative polygon geometry. This will either be POBOX or QUALITY. |
Example: "CB1 0AH","POBOX"
Data coverage
The Code-Point product contains a point reference for every postcode unit in England, Scotland, Wales, and Northern Ireland that is contained in Royal Mail’s PAF product at the time of creation of the dataset. For further information about the Code-Point product, please refer to the Code-Point Overview, Getting Started Guide, and Technical Specification documents.
The polygon set contains a polygon for every postcode in England, Scotland, and Wales that is contained in Royal Mail’s PAF product, with the following exceptions:
Postcodes for which there are no delivery point addresses of sufficient quality.
Postcodes for which there are no delivery point addresses that lie within the extent of the realm coastline.
Postcodes that relate to PO Boxes.
Postcodes that are vertically stacked, i.e. two or more postcodes within a single building that are represented by a single large-scale building seed. In these situations, a single square polygon represents all the postcodes attributed to the single building seed.
Last updated