Creating single-space postcodes
Centroids and polygons
Outward and inward bound representation
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.
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
Single-space postcodes
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.
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.
Last updated
Was this helpful?












