Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Code-Point with Polygons is available in the following formats:
Shapefile
MapInfo MID / MIF
MapInfo TAB file
Vector tiles (MBTiles)
GeoPackage (GPKG)
Code-Point with Polygons is supplied as a zip file in the Data folder, either downloaded from the OS Data Hub or on a DVD (TAB, Shapefile and MID / MIF formats only). The Code-Point polygon files contain substantial amounts of information, which in shapefile, MID / MIF, TAB and vector tiles formats necessitate that file compression be used.
The vector tile and GeoPackage formats of the product are not available as a DVD supply option.
The polygon data coverage is Great Britain. The shapefile, TAB and MID / MIF formats are split into 120 files where each file represents the notional geometry for a postcode area. The vector tiles and GeoPackage formats are supplied as one national file.
File sizes for Great Britain are approximately:
Shapefile: 610 MB
TAB: 524 MB
MID / MIF: 564 MB
Vector tiles (MBTiles): 457 MB
GeoPackage (GPKG): 708 MB
The following two CSV text files accompany the polygon data:
Vertical_streets: 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, a block of flats where there is more than one postcode within a single building.
Discard_files: 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). The discard file also contains a list of PO Box postcodes as none of these will have been used in the creation of the polygon set.
The associated Code-Point coverage is for the United Kingdom, provided as 121 comma-separated value (CSV) files, as it includes Northern Ireland postcodes. Polygons are not provided for Northern Ireland postcodes. Code-Point contains georeferenced postcode unit data, with associated metadata such as address counts and quality indicators. It also provides the health and administrative area codes related to each postcode.
The following text files that are associated with the Code-Point data provide:
The full-text equivalents of the administrative area codes.
The number of postcode units in each postcode area.
This technical specification provides detailed technical information about Code-Point with Polygons. It is targeted at technical users and software developers.
This technical specification provides detailed technical information that is designed to help you fully understand the data structure of Code-Point with Polygons.
Code-Point with Polygons is a dataset that contains the notional area of postcode units, allowing customers to display and analyse any data collected at the postcode level. The polygons within the product are derived from georeferenced Royal Mail Postal Address File (PAF) delivery addresses.
For full details on the Code-Point product data structure, see the Code-Point Technical Specification.
Code-Point with Polygons is a data product and does not include software for analysis but can be used with a variety of programs. Code-Point with Polygons can be loaded into a GIS (geographical information system) for display and analysis of the data. Consult your GIS documentation to establish actual system requirements.
Most proprietary GIS packages will suffice, for example, MapInfo, ESRI or QGIS products.
The polygon data coverage is Great Britain, the associated Code-Point coverage is for United Kingdom, as it includes Northern Ireland postcodes.
Updates will normally be quarterly in January, April, July, and October and are a complete resupply of the national dataset.
Code-Point with Polygons is available in the following formats, the preferred choice of which will be influenced by the software used:
ESRI Shapefile is a simple, non-topological format for storing the geometric location and attribute information of geographic features. A Shapefile is one of the spatial data formats that can be utilised in ArcGIS.
The Shapefile format defines the geometry and attributes of geographically referenced features in as many as six files with specific file extensions that should be stored in the same project workspace.
They are:
.shp – the file that stores the feature geometry.
.shx – the file that stores the index of the feature geometry.
.dbf – the dBASE file that stores the attribute information of features.
.prj – the projection file that provides the information on the coordinate reference system.
When a Shapefile is added as a theme to a view, this file is displayed as a feature table.
.sbn and .sbx – the files that store the spatial index of the features.
The last two files will only exist if you perform theme on theme selection, spatial joins, or create an index on a theme's SHAPE field.
The shapefile has two attributes (FID and SHAPE) that are virtual columns created by ArcGIS when accessing the table contents but are not visible in the attribute table. The FID column uniquely identifies each object stored in the table. The SHAPE column provides information about the feature geometry.
The transfer format is as defined by the MapInfo Professional User's Guide: MIF Export. MapInfo Interchange Format (MIF) is an ASCII file format that can fully describe a MapInfo database. Both graphic and tabular data are exported into MIF files. The graphic data is in a file with a .mif extension, and the tabular data is in a file with a .mid extension.
TAB files (MapInfo tables) are the native format of MapInfo. They consist of a number of files with extensions such as .DAT, .ID, .MAP and .TAB; all of these files need to be present and kept together for the table to work.
Code-Point with Polygons is supplied as a national vector tiles set in a single MBTiles file (combined from individual PBF tiles). This is a lightweight set of tiles that are efficient to render in supported software, provide high-resolution data and give a seamless experience when zooming in and out. The data is supplied in Web Mercator projection (ESPG: 3857).
Code-Point with Polygons is also supplied as GeoPackage. This is an open, standard, platform-independent, portable, self-describing, compact format for the transfer of geospatial data. GeoPackage is an SQLite container, the contents of which are governed by GeoPackage Encoding Standards.
Since a GeoPackage is a database container it supports direct use. This means that the data in the GeoPackage can be accessed and updated in a 'native' storage format without the need for intermediate format translations. It will effectively 'plug and play' in most GIS packages.
Code-Point with Polygons is supplied via the following options:
Shapefile, MID / MIF and TAB formats are available either on DVD or downloaded via the OS Data Hub.
Vector tiles and GeoPackage are only available through download via the OS Data Hub.
File sizes for Great Britain are approximately:
Shapefile: 610MB
TAB: 524MB
MID / MIF: 564MB
Vector tiles (MBTiles): 457MB
GeoPackage (GPKG): 708MB
Each edition of Code-Point with Polygons will have a version number showing the release month for the year (for example, April) followed by the release year (for example, 2023).
The version for each quarterly release will be in this format:
April_2023
July_20223
October_2023
January_2024
The Code-Point data packaged alongside the postcode polygon data will be the data from the most recent Code-Point product release. Typically, this is the Code-Point release from two months prior. For example, the October 2023 release of Code-Point with Polygons will be supplied alongside the August 2023 release of Code-Point.
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.
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.
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).
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:
For information, the attribute headers in GeoPackage are lowercase; the data structure is the same.
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.
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.
Example: "UB1 1ET","VUB00001"
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.
Example: "CB1 0AH","POBOX"
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.
Code-Point with Polygons is a dataset that contains the notional area of postcode units, designed to allow customers to display and analyse any data collected at the postcode level. Polygons within this product are derived from georeferenced Royal Mail Postal Address File (PAF) delivery addresses and processed using a Thiessen process to create mathematically consistent boundaries between distinct postcode groups as a notional boundary set.
This product is updated quarterly
Codepoint with Polygons provides notional extents for every postcode unit in GB for easy visualisation and analysis at a national scale.
Vertical street polygons allow easy identification of multiple postcodes within the same building.
Postcode polygons created using the addresses we can locate the most precisely creating high confidence in the accuracy of the polygon data.
Access: Download
Data theme: Administrative and Statistical Units
Data structure: Vector - Polygons
Coverage: Great Britain
Scale: 1:1 250 to 1:10 000
Format: MapInfo MID/MIF, MapInfo TAB
Ordering area: All of Great Britain
Publication months: January, April, July, October
OS Data Hub plan: Public Sector Plan, Premium Plan, Energy & Infrastructure Plan
Code-Point is created by taking the average of the coordinates of all the individual addresses in a postcode (provided we have any of sufficient quality), then snapping to the nearest of those addresses. Code-Point then delivers the coordinates of that address, as representative of the whole postcode, to a resolution of 1 metre.
The accuracy of a Code-Point Open record could be expressed as, that the coordinated position will always be within the notional geographical extent of the postcode. The accuracy of each postcode unit coordinate pair is defined by the positional quality indicator (PQI) which provides a quality statement of a Code-Point record.
Access to this product is free for PSGA members. Find out if you are a PSGA member or try out a sample of Code-Point with Polygons data by accessing the product page here with links to all of the relevant resources. Alternatively, you can try out the full product by applying for a Data Exploration license.
This getting started guide provides instructions for using Code-Point with Polygons in different software applications. Users with limited technical knowledge will be able to follow this guide.
Code-Point with Polygons is a dataset that contains the notional area of postcode units, allowing customers to display and analyse any data collected at the postcode level.
The polygons within the product are derived from georeferenced Royal Mail Postal Address File (PAF) delivery addresses. A process is undertaken to create a set of polygons around individual address records within a postcode. This is called a Thiessen process and the polygons are the result of a mathematical computation that creates polygons from point data. In this way, mathematically consistent boundaries are created between distinct postcode groups, creating this notional boundary set.
Postcode unit boundaries are, by definition, only the delivery point or collection of delivery points that constitutes the postcode units. The boundary is therefore a notional one, the position of which is arbitrary. What has been created, however, is a set of boundaries that follows a consistent logic and portrays the notional footprint of each postcode unit. The boundary encloses every delivery address for which positional data of sufficient quality is available, and which follows major physical features that could reasonably be regarded as part of the postcode boundary.
This getting started guide focuses on using the product in Shapefile, TAB and MID / MIF formats. For guidance on using the product in vector tiles or GeoPackage formats please see the following getting started guides:
This overview introduces Code-Point with Polygon, giving context for all users – highlighting key features, providing examples of uses, and listing details such as file sizes, supply formats, etc.
Code-Point with Polygons is a dataset that contains the notional area of postcode units, allowing customers to display and analyse any data collected at the postcode level.
The polygons within the product are derived from georeferenced Royal Mail Postal Address File (PAF) delivery addresses. A process is undertaken to create a set of polygons around individual address records within a postcode. This is called a Thiessen process and the polygons are the result of a mathematical computation that creates polygons from point data. In this way, mathematically consistent boundaries are created between distinct postcode groups, creating this notional boundary set.
Postcode unit boundaries are, by definition, only the delivery point or collection of delivery points that constitutes the postcode units. The boundary is therefore a notional one, the position of which is arbitrary. What has been created, however, is a set of boundaries that follows a consistent logic and portrays the notional footprint of each postcode unit. The boundary encloses every delivery address for which positional data of sufficient quality is available, and which follow major physical features that could reasonably be regarded as part of the postcode boundary.
The key features of the Code-Point with Polygons product are as follows:
A set of 120 postal-area-based files that provide a set of boundaries for the postcode units in Great Britain for shapefile, TAB and MID/MIF supply formats. For vector tiles and GeoPackage supply formats, a single national file is provided.
Vertical_streets: A list of polygons for locations that contain more than one postcode, for example, office blocks and flats.
Corresponding Code-Point information providing the number of delivery addresses and the health and administrative area codes related to each postcode.
The quality of this polygon creation allows the polygons to be used for a wide range of applications. This will include analysis of geographically based information or statistics by postcode, and the pictorial display of information that has been analysed or sorted by postcode.
Ordnance Survey measures the data in its products in one or more of the ways set out in the definitions of data measures table below.
Data measure | Definition | Sub-measure | Definition |
---|
* When testing the data according to the dataset specification against the ‘real world’ or reference dataset.
There are two main components of a postcode:
The outward code (also called outcode): The first two to four characters of the postcode constitutes the postcode area and the postcode district. It is the part of the postcode that enables mail to be sent from the accepting office to the correct area for delivery.
The inward code (also called incode): The last three characters of the postcode constitutes the postcode sector and the postcode unit. It is used to sort mail at the local delivery office.
For example:
Outward | Inward |
---|
When used in an address, the incode should be separated from the outcode by a single space. The following table is a list of the valid formats of postcodes (an A indicates an alphabetic character; an N indicates a numeric character):
Outcode | Incode | Example postcode |
---|
Postcode polygons are produced by the tessellation of georeferenced PAF coordinates for individual Royal Mail delivery addresses. Only addresses having a positional quality value indicating the location is within a building are used to create the polygons file. Postcodes of addresses of lower quality will be included in the discard files.
Due to the nature of postcode geography, the polygons representing some postcode units are unavoidably split. Every effort has been made to ensure the absolute minimum of postcodes is represented by multiple polygons. These split polygons representing a single postcode remain a single object with one set of attributes.
Each polygon is assigned a unique identifier. The identifier will be a 16-digit series. These identifiers are not reused should a polygon be deleted.
The polygon dataset contains non-overlapping polygon coverage of Great Britain, originally constrained by the extent of realm (EOR) coastline from Ordnance Survey’s Boundary-Line data and postcode polygons. Should any addresses fall outside the constraining datasets, the postcodes should be included in the discard files.
For Shapefile, TAB and MID / MIF supply formats the data is divided into 120 postcode area files, each file named with a one or two letter postcode area code, and for vector tiles and GeoPackage supply formats, the data is provided as one national file.
Postcodes that are vertically stacked, that is, 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. These polygons have a special series of identifiers, all commencing with the letter V.
A separate vertical streets lookup table is provided with the polygons and lists the postcodes with the 20-digit unique identifier that are represented by each special polygon. Where these distinctive polygons are crowded closely together, they are reduced in size to prevent overlaps hiding some of the polygons.
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 is no location data of sufficient quality.
Postcodes for which there is no data that lies within the extent of the realm coastline.
Postcodes that relate to PO Boxes.
GeoPlace geocode the PAF data from Royal Mail, using source coordinates from Local Authorities in England, Wales and Scotland and Ordnance Survey. GeoPlace then provide the georeferenced PAF data to Ordnance Survey.
BNG uses the OSGB36 geodetic datum and a single Transverse Mercator projection for the whole of Great Britain. Positions on this projection are described using Easting and Northing coordinates in units of metres. The BNG is a horizontal spatial reference system only; it does not specify a vertical (height) reference system.
Updates are supplied quarterly in January, April, July and October, and are a complete resupply of the national dataset.
Each edition of Code-Point with Polygons will have a version number showing the release month for the year (for example, April) followed by the release year (for example, 2022).
The version for each quarterly release will be in this format:
April_2022
July_2022
October_2022
January_2023
The Code-Point data packaged alongside the postcode polygon data will be the data from the most recent Code-Point product release. Typically, this is the Code-Point release from two months prior. For example, the October 2022 release of Code-Point with Polygons will be supplied alongside the August 2022 release of Code-Point.
The current specification represents the postcodes in a set format that defines the postcodes as having an inward and outward postcode ‘code’. Code-Point and Code-Point with polygon postcodes have 0, 1 or 2 spaces between the in and out code.
The table below identifies how postcodes are currently shown in the data.
Postcode structure | Number of spaces |
---|
The Code-Point and Code-Point with polygons postcodes are currently represented as above; however, there may be a user requirement to represent each postcode in a uniformed single-space format.
The aim of this section is to offer some guidance on how to process the Code-Point and the related Code-Point with polygons data to generate postcodes with a single space.
The single-space instructions are applicable to both the postcode point and unit polygon products. Microsoft Excel, Microsoft Access, MapInfo, ESRI and QGIS GIS formats have been included to provide guidance when using comma-separated values (CSV) and other formats.
The underlying theory for all of the methods is principally the same, in that all current spaces are removed and then a single space added before the third character from the right.
The NTF format is not included in this chapter as it is not compatible to a single-space format.
These instructions apply to postcode units only, and not to vertical streets (which are only found in the Code-Point with polygons dataset). To ensure that the vertical street references are not corrupted, remove them from your data before applying these instructions.
Field name | Type | Width | Description |
---|---|---|---|
Field name | Type | Width | Description |
---|---|---|---|
Field name | Type | Width | Description |
---|---|---|---|
The Coordinate Reference Systems (CRS) of the polygon data is provided in British National Grid (BNG), (EPSG: 27700), with the exception of the vector tile polygon data which is provided in Web Mercator Projection (EPSG: 3857) For more information on the Code-Point CRS, see the .
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.
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
POSTCODE
Char
8
Full postcode from Code-Point.
ID
Char
8
Unique polygon identifier (including four leading zeros).
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.
Completeness | Presence and absence of features against the specified data content* | Omission | Features representing objects that conform to the specified data content but are not present in the data. |
Commission | Features representing objects that do not conform to the specified data content but are present in the data. |
Logical consistency | Degree of adherence to logical rules of data structure, attribution and relationships | Conceptual consistency | How closely the data follows the conceptual rules (or model). |
Domain consistency | How closely the data values in the dataset match the range of values in the dataset specification. |
Format consistency | The physical structure (syntax): how closely the data stored and delivered fits the database schema and agreed supply formats. |
Topological consistency | The explicit topological references between features (connectivity) – according to specification. |
Positional accuracy | Accuracy of the position of features | Absolute accuracy | How closely the coordinates of a point in the dataset agree with the coordinates of the same point on the ground (in British National Grid EPSG: 27700 for shapefile, TAB, MID/MIF and GeoPackage formats, and Web Mercator projection EPSG: 3857 for vector tile format). |
Relative accuracy | Positional consistency of a data point or feature in relation to other local data points or features within the same or another reference dataset. |
Geometric fidelity | The ‘trueness’ of features to the shapes and alignments of the objects they represent*. |
Temporal accuracy | Accuracy of temporal attributes and temporal relationships of features | Temporal consistency | How well-ordered events are recorded in the dataset (life cycles). |
Temporal validity (currency) | Validity of data with respect to time: the amount of real-world change that has been incorporated in the dataset that is scheduled for capture under current specifications. |
Thematic accuracy (attribute accuracy) | Classification of features and their attributes | Classification correctness | How accurately the attributes within the dataset record the information about objects*. |
NW | 6 | 4 | DP |
Unit |
Sector |
District |
Area |
AN | NAA | M2 5BQ |
ANN | NAA | M34 3AB |
AAN | NAA | DN5 7XY |
AANN | NAA | DN16 9AA |
ANA | NAA | W1A 4WW |
AANA | NAA | EC1A 1HQ |
AANNNAA | 0 spaces (represented as AANNNAA) for example: PO143RW |
ANN NAA | 1 space (represented as ANN<>NAA) for example: PO14 3RW |
AN NAA | 2 spaces (represented as AN<><>NAA) for example: B1 5AP |