These guidance notes provide information on Code-Point data, that being:
The notes pick out the major aspects of Code-Point, as described in the Ordnance Survey's Code-Point User Guide and the Code-Point with Polygons User Guide but cover other issues that are relevant to Digimap users.
Postcodes are maintained by the Royal Mail and designed by them primarily for the efficient delivery of mail, not as a geospatial reference for spatial analysis or as boundaries to be used in thematic mapping. However, because postcodes are a UK wide system of reference designed in a manageable hierarchical structure and can be related to other geographic units (e.g. wards, districts), many researchers find it convenient to reference their spatial data by Postcode. They may also wish to display these data on a map using postcode centroids or postcode based polygons.
Because the use of postcode data goes beyond mail delivery, different organisations have in the past created added-value postcode based products for the user community. However, this inevitably led to duplication and inconsistency in the datasets. To address this problem, a number of organisations formed the Gridlink Consortium and began working together to create postcode related products which are consistent and so constitute a core set of 'joined up' geographical products. These core products are all branded as Gridlink and include the following products and information:
The members of the Gridlink Consortium are:
The Postcode is familiar to many, as it appears on most of the mail we send or receive. It is an abbreviated address which in the case of a small user postcode is unique to an average of 15 properties, though the maximum number of addresses in a post code is 100. One building can contain more than one postcode (as with a block of flats, known as a Vertical Street). A large user postcode is allocated to addresses receiving a large amount of mail, so that postcode is unique to only one address.
The postcode is usually written as two sections separated by a space, e.g. TF10 7HN. The two sections are called the Outward Code and the Inward Code respectively and have distinct purposes and format:
The postcode is further split into 4 levels of geographic unit: area; district; sector; unit postcode. The Outward and Inward Codes each represent two of these geographic levels, as shown in the following table:
|IN/OUT Code||Geographic Unit||Example||Number in UK (August 2002)*|
|Outward Code||Postcode Area||TF||124|
|Outward Code||Postcode District||TF10||2927|
|Inward Code||Postcode Sector||TF10 7||9724|
|Inward Code||Unit Postcode||TF10 7HN||1.7 million approx.|
* figures from ONS Geography.
HINT: When trying to remember the order of the postcode hierarchy, it is useful to note that the 4 levels occur in alphabetic order from the largest to the smallest: Area; District; Sector and Unit postcode.
Back to top
Code Point is derived from Gridlink and provides a National Grid reference for each unit postcode in the United Kingdom to a resolution of 1 metre. Each Grid Reference point is known as the Code-Point Location Coordinate (CPLC).
To generate each CPLC, the mean position of each delivery point in a unit postcode is calculated and the CPLC is allocated the ADDRESS-POINT (an Ordnance Survey Gridlink product) coordinates which fall nearest to this mean. Some of the delivery points used will appear in the Landline product (available through Digimap) as building seeds though others, such as PO boxes, Caravan parks, buildings under railway arches and house boats will not.
Although each postcode is allocated a grid reference, the grid reference may be shared by more than one postcode. For example, if a block of flats ( a Vertical Street) contains more than one postcode, each postcode will be allocated with the same grid reference as its CPLC.
Administrative and NHS area codes are allocated to each Code-Point record (created using NHS and O.S. Boundary-line Gridlink products). The code allocated depends on where the CPLC falls, rather than the postcode itself. So for example, if a postcode falls within two neighbouring administrative areas, the postcode will be given the code for only the administrative area in which its CPLC falls.
This section provides information on the content and formatting of Code-Point.
As discussed above in the Introduction of Postcode Geography, A postcode is usually written with a single space separating the outward and inward codes, e.g. TF10 7HN. In Code-Point, the postcode code have 0, 1 or 2 space between the inward and outward code.
This is because the postcode is held in a seven character field but the length of the outward code can vary between 2 and 4 alphanumeric characters. In the example given above, TF10 7HN, the outward code contains its maximum 4 characters so the postcode is seven characters long excluding the space, so in Code-Point it would appear as 'TF107HN'. Here are some other examples:
|Example postcode||formatting in Code-Point|
|M2 5BQ||M2 5BQ : two spaces|
|M34 3AB||M34 3AB : one space|
|EC1A 1HQ||EC1A1HQ : no space|
The postcode position in Code-Point is represented by the Code-Point Location Coordinate CPLC, described above. The quality of these CPLC positions can vary significantly. Some will be within the delivery point closet to the postcode mean, while others will be approximate to 50 or 100 metres. The quality depends on the information that is available for estimating the Code-Point position.
It is important that you check the positional quality of Code-Point data you are working with. Using the data without an awareness of quality could lead to inappropriate or misleading results.
Every Code-Point record has a Positional Quality Indicator (PQI), which indicates a record's specific positional quality. There are seven PQI values which appear in the "PQ" (NTF data) or "Positional Quality" (CSV data) field in the Code-Point data. These are all listed in the Table of Code-Point Attributes below.
Code Point data does not contain several Feature Codes like the other Ordnance Survey mapping products do. When the NTF Code-Point data is converted to a shape file (for example) there is a 'FEATCODE' field but this gives the value of "2801" for all records. It contains a number of columns of attributes which provide information about each postcode unit, including its Code-Point location coordinate (CPLC). The following table lists the Code-Point attribute field names present in the NTF and CVS files available for download through Digimap, with descriptions of what the attributes represent. Note that the CSV file contains field names which correspond with the table's Attribute column, while the NTF file has fieldnames that correspond with the Attribute Code column.
|Attribute Code (NTF)||Attribute (CSV)||Description||Further Information|
|PC||Postcode||A form of abbreviated address, which contains elements for postal area, district, sector and unit||e.g. TF10 7HN
|PQ||Positional Quality||Indicates the positional quality of the Code-Point National Grid Reference, determined by the best available data in ADDRESS-POINT. The value is referred to as the Positional Quality Indicator (PQI)||
|PR||PO box indicator||Indicates whether or not the postcode is used for a PO box||
|TP||Total delivery points||County||Code|
|Northern and Yorkshire||Y01|
Back to top
Postcode unit boundaries are a type of synthetic boundary. The postcode unit is a collection of delivery points with the same postcode, while the 'boundary' can be drawn anywhere, so long as it contains all delivery points. The postcode unit boundary does not exist in the real world. Where the boundary lines fall makes no difference to the postman, only the delivery points matter. In other words, there is no such thing as a correct postcode boundary. The Code-Point unit boundaries however, have been created to best represent the postcode unit footprint in a way that allows the dataset to be used for many different applications.
ADDRESS-POINT delivery points with sufficient positional quality were used to create the postcode unit polygons. A Thiessen polygon is created around each delivery point, then these tessellating polygons are dissolved to leave only the outer 'boundary' of the unit postcode. These boundaries are then further edited to follow major physical features but still enclose each delivery point in the correct postcode unit. Some postcode units do not contain enough delivery points with sufficient positional quality to create an acceptable polygon 'footprint'. These have been left out of the Code Point polygon dataset and are listed separately in a 'Discards' look-up table.
Due to the nature of postcode geography, some unit postcode polygons will be split into two or more distinct polygons. All polygons representing one unit postcode will always remain as a single object with one set of attributes. Therefore if one polygon is selected in a geographical information system (GIS) all other polygons representing that postcode will also be selected. The Ordnance Survey have done all they can to keep these split polygons to a minimum but some are unavoidable.
The Code-point polygons are available for download as Shapfiles (ESRI format) and MID/MIF (MapInfo exchange format). The data are divided up into 120 postcode area files. These are named with the relevant one or two letter area code (e.g. TF [Telford], B [Birmingham], PH [Perth]).
Each postcode unit polygon (or group of split polygons which make up a unit postcode) has associated attributes, which will can be displayed in a GIS and used for labelling, querying and joining the postcode polygons to the Code-Point records or other postcode referenced data. The Code-Point Polygon attributes are described in the following table:
|POSTCODE||Character||8||Full Postcode from Code-Point (or Vertical Street code*)||HG1 1BA|
|UPP||Character||20||Unique Polygon Identifier||00004000000000590783|
* The DESCRIPTION field will usually contain the full unit postcode. However where there is a vertical street containing a number of postcodes, the vertical street reference code will be in the DESCRIPTION field.
Often, tower blocks or similar buildings will be assigned with more than one postcode. Such buildings are called vertical streets and are represented in the polygon dataset as small squares, because it is not possible to spatially represent all the postcodes in that vertical street in any other way. A separate look-up table links postcodes to vertical streets using a unique vertical street reference code.
The vertical street look-up table is a comma delimited text file which is automatically downloaded along with the Code-Point Polygons. The name of the look-up table text file will be prefixed with the Postcode Area to which it refers, e.g. the vertical street look-up table for TELFORD is called tf_vstreet_lookup.txt. There is a separate vertical street look-up table for each Code-Point polygon data file (i.e. one for each Postcode area, e.g. "TF", "B", "NE").
The look-up table contains unit postcodes and their associated vertical street reference number (comma separated), which also appears in the DESCRIPTION field in the Code-Point polygon dataset. Here is a sample of what you will see in a vertical street look-up table (e.g. is from tf_vstreet_lookup.txt):
Using the Vertical Street look-up table, the postcodes present in a block of flats (for example) can be linked to the Code-Point polygon dataset using the vertical street reference code.
PO Boxes can not be represented by a polygon in Code-Point polygons because they do not have a spatial extent. Therefore postcodes that refer to PO Boxes are omitted from the Code-Point polygon dataset.
The omitted PO Box postcodes are listed in a separate text file, which is automatically downloaded with the Code-Point polygon data. The file includes two fields: Postcode (postcode that has been omitted from the polygon dataset) Reason (in this case, the reason is always "POBOX". The name of the file will be prefixed with the postcode area code to which it refers, e.g., the PO Box text file for TELFORD is tf_po_boxes.txt.
Note: PO Box postcodes are included in the standard Code-Point CSV and NTF files.
Code-Point polygons are created from delivery points in the Ordnance Survey ADDRESS-POINT dataset. However, not all the delivery points in ADDRESS-POINT have sufficient positional accuracy to allow the Ordnance Survey to create a useful unit postcode polygon. It would not be appropriate for the O.S. to create a postcode polygon from ADDRESS-POINT data that was not of sufficient positional accuracy. The resulting polygon would not be a reasonable representation of the spatial extent of the unit postcode and the quality and usability of the entire dataset would be compromised.
Consequently, some postcodes are missing from the Code-Point polygon dataset because there was no sufficiently accurate information available to create polygons to represent their spatial extent. The postcodes omitted from the Code-Point polygons for this reason are listed in a separate discards text file. This comma delimited text file lists those postcodes that are omitted from the Code-Point polygon dataset because there were no ADDRESS-POINT records of sufficient positional quality to create a useful postcode polygon.
The file includes two fields:
Back to top
An Ordnance Survey product which matches Royal Mail Postcode Address File (PAF) addressed properties in Great Britain to the National Grid. ADDRESS-POINT is also used to create the GridLink product.
A type of large user postcode which is allocated to a small number of organisations who receive an exceptionally large amount of mail. These postcodes are still related to a geographical area but may overlap other sector areas or be scattered.
A National Grid reference for each Unit Postcode. It is a two dimensional coordinated point to a resolution of one metre. Coordinates are attributed from ADDRESS-POINT.
A Royal Mail defined point to which mail is delivered. This may be a property, organisation, PO box or the name of an individual.
Gridlink is the name given to a joined-up government initiative involving Royal Mail, the Office for National Statistics, the General Registry Office (Scotland), Ordnance Survey (Northern Ireland) and Ordnance Survey (GB). All these organisations are involved in the georeferencing of postcodes and the relating of postcodes to administrative and National Health areas.
The last three characters of the postcode, identifying the postcode sector and the postcode unit (e.g. 7HN). This part of the postcode is used to sort mail at the local delivery office.
A large user postcode is allocated when:
Allocated to single organisations who receive an exceptionally large amount of mail. These are included in Code-Point but cannot be included as a Code-Point polygon because they have no spatial extent.
The first two to four characters of a postcode, identifying the postcode area and postcode district (e.g. TF10). This part of the postcode enables mail to be sent from the accepting office to the correct area for delivery.
An abbreviated form of address made up of a combination of between five and seven alphanumeric characters. These are split into two main components - the outward code (e.g. TF10, representing the postcode area and district) and the inward code (7HN, representing the postcode sector and unit). A postcode covers between 1 and 100 addresses. The average number of addresses per postcode is 15.
An area given a unique alphabetic coding by the Royal Mail for the efficient delivery of mail. The first one or two characters in a postcode define the postcode area, for example "B" of B1 2JP refers to the Birmingham postcode area and "TF" of TF10 7HN refers to the Telford postcode area. There are currently 120 postcode areas. Code-Point data is downloaded from Digimap by postcode area.
A sub-area of the postcode area, represented by the latter half of the first part of a postcode, following the postcode area code. For example "10" of TF10 7HN is a postcode district within the Telford postcode area ("TF") and "1A" is a district code within W1A 4WW. The district code can be numeric, alphabetic or alphanumeric. There are approximately 2,800 postcode districts in Great Britain.
A sub-area of the postcode district, represented by the number 3rd from the end of a full postcode. For example, "7" is the postcode sector in TF10 7HN. There are approximately 9,000 postcode sectors in Great Britain.
A sub-area of postcode sector and the smallest of the hierarchy of postcode areas. The postcode unit is represented by the final two alphabetic characters in the postcode. For example "HN" is the postcode unit in TF10 7HN, though the full post code (e.g. TF10 7HN) fully represents a postcode unit. For more information see Postcode.
A non-geographic address allocated with a number by the Post Office
A file marketed by the Post Office that allocates a National Grid reference to each postcode unit. This coordinate is derived from a 100 metre square that contains the first of the range of addresses that form the unit postcode.
Back to top