Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This technical specification provides detailed technical information about AddressBase. It is targeted at technical users and software developers.
AddressBase provides an address product containing both residential and commercial addresses where a Local Authority address has been matched to a Royal Mail PAF address. This allows users to link additional information about a property to a single address. The product also provides enhancements to the Royal Mail PAF data by assigning an X and Y coordinate on British National Grid and an ETRS89 projection, as well as a primary level classification, and a representative point code describing the positional quality.
This technical specification includes the following sections:
All AddressBase products include the Unique Property Reference Number (UPRN) and are based on same coordinate reference systems.
Please see the General AddressBase information section for additional information that applies across all AddressBase products.
The following section provides example records for both the CSV and GML supplies. Please note that the data given is to provide an example only and should not to be used as accurate data.
Please note how not all attributes are provided where the field is null.
The primary supply mechanism of AddressBase data is referred to as non-geographic chunks. This is a way of dividing up the data into chunks that are supplied in separate volumes, which have a fixed maximum number of records. The supply is not supplied with any reference to the geographic position of records.
Public Sector Geospatial Agreement (PSGA) customers can order Geographic chunks (5km tiles) as well as non-geographic chunks, although geographic chunks are not considered the main form of supply.
All customers are also able to take a complete supply (referred to as a Managed Great Britain Set: MGBS) or an Area of Interest (AOI) as a full supply or a COU supply.
If you receive your data as non-geographic chunks, the filename will be constructed as follows:
productName_supply_ccyy-mm-dd_vvv.format
Where:
ProductName is AddressBase.
supply is defined as FULL
or COU
.
ccyy-mm-dd is the date the file was generated.
vvv is the volume number of the file.
format is the format of the files received, for example, csv
or gml
.
For example:
AddressBase_FULL_2013-05-28_001.gml
(GML full supply)
AddressBase_COU_2013-05-28_001.csv
(CSV COU supply)
If the data has been provided in a ZIP file, the filename will be constructed as follows:
productName_supply_ccyy-mm-dd_vvv_format.zip
For example:
AddressBase_FULL_2013-05-28_001_gml.zip
(GML full supply zipped)
If you receive your data as geographic chunks (PSGA customers only), the filename will be constructed as follows:
productName_supply_ccyy-mm-dd_ngxxyy.format
Where:
ProductName is AddressBase.
supply is defined as FULL
or COU
.
ccyy-mm-dd is the date the file was generated.
ngxxyy is the four-digit grid reference belonging to the 1km south-west corner of the 5km chunk.
format is the format of the files received, for example, csv
or gml
.
For example:
AddressBase_FULL_2013-05-28_NC4040.gml
(GML full supply)
AddressBase_COU_2013-05-28_NC4040.csv
(CSV COU supply)
If the data has been provided in a ZIP file, the filename will be constructed as follows:
productName_supply_ccyy-mm-dd_ngxxyy_format.zip
For example:
AddressBase_COU_2013-05-28_NC4040_csv.zip
(CSV COU supply zipped)
AddressBase is available as a full or COU supply.
A COU supply of data contains records or files that have changed between product refresh cycles. The primary benefit in supplying data in this way is that data volumes are smaller therefore reducing the amount of data that requires processing when compared to a full supply.
COU data enables a user to identify three types of change:
Deletes (CHANGE_TYPE ‘D’) are objects that have ceased to exist in your AOI since the last product refresh.
Inserts (CHANGE_TYPE ‘I’) are objects that have been newly inserted into your AOI since the last product refresh.
Updates (CHANGE_TYPE ‘U’) are objects that have been updated in your AOI since the last product refresh.
A COU file for non-geographic chunked data can be identified by its naming convention. Any change record will be provided as a full record with the appropriate change type, as listed above.
A geographic chunked COU is not supplied as per the non-geographic chunked COU outlined above. Its file naming convention can be found above. If a single record has changed within a specified 5km tile, the entire 5km tile containing all features will be supplied. This means the user will need to remove all features that previously existed in the provided tile(s) and insert the entire new tile(s) in its place.
When users are deleting, inserting or updating features, it is up to the user to consider their archiving requirements. If deleted records are important to your business requirements, you must take appropriate action to archive previous records.
This address record follows the lifecycle of a Postcode Address File (PAF) record matched to a Local Authority record. As a matched record is inserted, deleted and updated within PAF, these changes are incorporated into the AddressBase product. Similarly, if the matched Local Authority address record updates an attribute contained within the AddressBase product, this change will be reflected.
The following sub-sections provide details about the attributes included with this feature, their data types in the different output formats, and other important metadata about them.
The following sub-sections provide details about the attributes included with the Address feature type.
Unique Property Reference Number (UPRN) assigned by the LLPG Custodian or Ordnance Survey.
Attribute Name: uprn (GML), UPRN (CSV)
Data Type: Integer (GML), Integer (CSV)
Multiplicity: [1]
Size: 12
Source: Contributing Local Authority / Ordnance Survey
Unique identifier provided by Ordnance Survey.
Attribute Name: osAddressTOID (GML), OS_ADDRESS_TOID (CSV)
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 20
Source: Ordnance Survey
Royal Mail’s Unique Delivery Point Reference Number (UDPRN).
Attribute Name: udprn (GML), UDPRN (CSV)
Data Type: Integer (GML), Integer (CSV)
Multiplicity: [1]
Size: 8
Source: Royal Mail
The organisation name is the business name given to a delivery point within a building or small group of buildings. For example: TOURIST INFORMATION CENTRE
This field could also include entries for churches, public houses and libraries.
Attribute Name: organisationName (GML), ORGANISATION_NAME (CSV)
Condition: Organisation Name or PO Box Number must be present if Building Name or Building Number are all not present.
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 60
Source: Royal Mail
For some organisations, department name is indicated because mail is received by subdivisions of the main organisation at distinct delivery points. For example, Organisation Name: ABC COMMUNICATIONS or RM Department Name: MARKETING DEPARTMENT
Attribute Name: departmentName (GML), DEPARTMENT_NAME (CSV)
Condition: If a Department Name is present, an Organisation Name must also be present.
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 60
Source: Royal Mail
Post Office Box (PO Box) number.
Attribute Name: poBoxNumber (GML), PO_BOX_NUMBER (CSV)
Condition: Organisation Name or PO Box Number must be present if Building Name or Building Number are all not present.
Data Type: CharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 6
Source: Royal Mail
The sub-building name and/or number are identifiers for subdivisions of properties.
For example: Sub-building Name: FLAT 3, Building Name: POPLAR COURT, Thoroughfare: LONDON ROAD
If the above address is styled 3 POPLAR COURT, all the text will be shown in the Building Name attribute and the Sub-building Name will be empty. The building number will be shown in this field when it contains a range, decimal or non-numeric character (see Building Number).
Attribute Name: subBuildingName (GML), SUB_BUILDING_NAME (CSV)
Condition: If a Sub Building Name is present, a Building Name or Building Number must also be present.
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 30
Source: Royal Mail
The building name is a description applied to a single building or a small group of buildings, such as Highfield House. This also includes those building numbers that contain non-numeric characters, such as 44A.
Some descriptive names, when included with the rest of the address, are sufficient to identify the property uniquely and unambiguously, for example, MAGISTRATES COURT.
Sometimes the building name will be a blend of distinctive and descriptive naming, for example, RAILWAY TAVERN (PUBLIC HOUSE) or THE COURT ROYAL (HOTEL).
Attribute Name: buildingName (GML), BUILDING_NAME (CSV)
Condition: Building Name must be present if Organisation Name or Building Number or PO Box Number are all not present.
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 50
Source: Royal Mail
The building number is a number given to a single building or a small group of buildings, thus identifying it from its neighbours, for example, 44. Building numbers that contain a range, decimals or non-numeric characters do not appear in this field but will be found in the buildingName or the sub-BuildingName fields.
Attribute Name: buildingNumber (GML), BUILDING_NUMBER (CSV)
Condition: Building Number must be present if Organisation Name or Building Name or PO Box Number are all not present.
Data Type: Integer (GML), Integer (CSV)
Multiplicity: [0..1]
Size: 4
Source: Royal Mail
A thoroughfare in AddressBase is fundamentally a road, track or named access route on which there are Royal Mail delivery points, for example, HIGH STREET.
Attribute Name: thoroughfare (GML), THOROUGHFARE (CSV)
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 80
Source: Royal Mail
The town or city in which the Royal Mail sorting office is located which services this record. There may be more than one, possibly several, sorting offices in a town or city.
Attribute Name: postTown (GML), POST_TOWN (CSV)
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [1]
Size: 30
Source: Royal Mail
This is used to distinguish between similar thoroughfares or the same thoroughfare within a dependent locality. For example, Millbrook Industrial Estate and Cranford Estate in this situation: BRUNEL WAY, MILLBROOK INDUSTRIAL ESTATE, MILLBROOK, SOUTHAMPTON and BRUNEL WAY, CRANFORD ESTATE, MILLBROOK, SOUTHAMPTON.
Attribute Name: doubleDependentLocality (GML), DOUBLE_DEPENDENT_LOCALITY (CSV)
Data Type: LocalisedCharacterString (GML), char (CSV)
Condition: If a Double Dependent Locality is present, a Dependent Locality must also be present.
Multiplicity: [0..1]
Size: 35
Source: Royal Mail
Dependent locality areas define an area within a post town. These are only necessary for postal purposes and are used to aid differentiation where there are thoroughfares of the same name in the same locality. For example, HIGH STREET in SHIRLEY and SWAYTHLING in this situation: HIGH STREET, SHIRLEY, SOUTHAMPTON and HIGH STREET, SWAYTHLING, SOUTHAMPTON.
Attribute Name: dependentLocality (GML), DEPENDENT_LOCALITY (CSV)
Data Type: LocalisedCharacterString (GML), char (CSV)
Multiplicity: [0..1]
Size: 35
Source: Royal Mail
A postcode is an abbreviated form of address made up of combinations of between five and seven alphanumeric characters. These are used by Royal Mail to help with the automated sorting of mail. A postcode may cover between 1 and 100 addresses.
There are two main components of a postcode, for example, NW6 4DP:
The outward code (or ‘outcode’). The first two–four characters of the postcode constituting the postcode area and the postcode district, for example, NW6. 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 (or ‘incode’). The last three characters of the postcode constituting the postcode sector and the postcode unit, example, 4DP. It is used to sort mail at the local delivery office.
Attribute Name: postcode (GML), POSTCODE (CSV)
Data Type: CharacterString (GML), char (CSV)
Multiplicity: [1]
Size: 8
Source: Royal Mail
Describes the address as a small or large user as defined by Royal Mail.
Attribute Name: postcodeType (GML), POSTCODE_TYPE (CSV)
Condition: If PO Box number is present Postcode Type must be ‘L’.
Multiplicity: [1]
Size: 1
Source: Royal Mail
A value in metres defining the x and y location in accordance with the British National Grid.
Attribute Name: position (GML), X_COORDINATE, Y_COORDINATE (CSV)
Data Type: GM_Point (GML), Float (CSV)
Multiplicity: [1]
Size: X_COORDINATE (precision, scale) – (8, 2), Y_COORDINATE (precision, scale) – (9, 2)
Source: Contributing Local Authority/Ordnance Survey
A value defining the Longitude and Latitude location in accordance with the ETRS89 coordinate reference system.
Attribute Name: positionLatLong (GML), LATITUDE, LONGITUDE (CSV)
Data Type: GM_Point (GML), Float (CSV)
Multiplicity: [1]
Size: LATITUDE (precision, scale) – (9, 7), LONGITUDE (precision, scale) – (8, 7)
Source: Ordnance Survey
Representative Point Code. This code is used to reflect positional accuracy.
Attribute Name: rpc (GML), RPC (CSV)
Multiplicity: [1]
Size: 1
Source: Contributing Local Authority
The country in which a record can be found.
Attribute Name: country (GML), COUNTRY (CSV)
Multiplicity: [1]
Size: 1
Type of Record Change – please see Section 4 for more information.
Attribute Name: changeType (GML), CHANGE_TYPE (CSV)
Multiplicity: [1]
Size: 1
The date on which the address record was inserted into the database in the CCYY-MM-DD format.
Attribute Name: laStartDate (GML), LA_START_DATE (CSV)
Data Type: Date (GML), Date (CSV)
Multiplicity: [1]
Source: Contributing Local Authority
Date on which the Royal Mail address was loaded into the NAG (National Address Gazetteer in the CCYY-MM-DD format – as maintained by Geoplace) hub.
Attribute Name: rmStartDate (GML), RM_START_DATE (CSV)
Data Type: Date (GML), Date (CSV)
Multiplicity: [1]
Source: Royal Mail
The date on which any of the attributes on this record were last changed in the CCYY-MM-DD format.
Attribute Name: lastUpdateDate (GML), LAST_UPDATE_DATE (CSV)
Data Type: Date (GML), Date (CSV)
Multiplicity: [1]
Primary classification of the address record. For example, identifying the record as commercial (value of ‘C’) or residential (value of ‘R’).
Attribute Name: class (GML), CLASS (CSV)
Data Type: CharacterString (GML), char (CSV)
Multiplicity: [1]
Size: 1
Source: Contributing Local Authority
This section describes the features (one for CSV and two for GML) which make up the AddressBase product, giving the following information about each attribute.
The name of the attribute and what it is describing.
A condition associated with this attribute (optional).
The nature of the attribute, for example a numeric value or a code list value.
Describes how many times this element is expected to be populated in the data. An attribute may be optional or mandatory within the AddressBase product. These are denoted by:
‘1’ – there must be a value.
‘0..1’ – population is optional but a maximum of one attribute will be returned These values may be used in combination.
AddressBase is structured as a flat file. The data structure in this document is described by means of Unified Modeling Language (UML) class diagrams.
The AddressBase product is constructed as per the following UML diagrams.
Definition: This address record follows the lifecycle of a Postcode Address File (PAF) record matched to a Local Authority record. As a matched record is inserted, deleted and updated within PAF, these changes are incorporated into the AddressBase product. Similarly, if the matched Local Authority address record updates an attribute contained within the AddressBase product, this change will be reflected.
The UML model of AddressBase in CSV format can be seen in the UML diagram below; classes from the Ordnance Survey product specification are coloured orange; all code lists are coloured blue, while enumerations are coloured green.
Definition: This address record follows the lifecycle of a Postcode Address File (PAF) record matched to a Local Authority record. As a matched record is inserted, deleted and updated within PAF, these changes are incorporated into the AddressBase product. Similarly, if the matched Local Authority address record updates an attribute contained within the AddressBase product, this change will be reflected.
The UML model of AddressBase in GML format can be seen in the diagram below. In the UML diagram, classes from the Ordnance Survey product specification are orange, all code lists are coloured blue and enumerations are green.
The AddressBase product will be distributed as a comma-separated values (CSV) file or Geography Markup Language (GML) version 3.2. Both of these formats can either be supplied as a full supply or a change-only update (COU) supply.
The CSV supply of AddressBase means:
There will be one record per line in each file.
Fields will be separated by commas.
String fields will be delimited by double quotes.
No comma will be placed at the end of each row in the file.
Records will be terminated by Carriage Return / Line Feed.
Double quotes inside strings will be escaped by doubling.
Where a field has no value in a record, two commas will be placed together in the record (one for the end of the previous field and one for the end of the null field). Where the null field is a text field double quotes will be included between the two commas, for example - , “”,
AddressBase CSV data will be transferred using Unicode encoded in UTF-8. Unicode includes all the characters in ISO-8859-14 (Welsh characters). Some accented characters are encoded differently.
The transfer will normally be in a single file, but the data can be split into multiple files using volume numbers. Most files will only be split where there are more than one million records.
The header row for the CSV is supplied separately and can be downloaded from the product support pages.
The GML Encoding standard is an Extensible Markup Language (XML) grammar for expressing geographical features. XML schemas are used to define and validate the format and content of GML. The XML specifications that GML is based on are available from the World Wide Web Consortium (W3C) website: More information can be found in the Open Geospatial Consortium (OGC) document, Geography Markup Language v3.2.1: The GML 3.2.1 specification provides a set of schemas that define the GML feature constructs and geometric types. These are designed to be used as a basis for building application-specific schemas, which define the data content.
A GML document is described using a GML Schema. The AddressBase schema document (addressbase.xsd), defines the features in AddressBase GML.
The application schema uses the following XML namespaces, for which definitions are available as given here:
Each feature within the AddressBaseSupplySet:FeatureCollection
is encapsulated in the following member element according to its feature type:
The UPRN of the feature is provided in the XML attribute of the gml:id
In the GML supply you can determine the extent of your supply by the <gml: Envelope>
. For example:
Code List Name:
Code List Name:
Code List Name:
Code List Name:
It imports the GML 3.2.1 schemas which rely on XML as defined by W3C at:
Prefix | Namespace Identifier | Definition available at |
---|
Information about Unicode and UTF-8, the character encoding we have chosen, is available on the Unicode Consortium website:
Member Element | Feature Type |
---|
See for specific GML examples.
|
|
This feature is formally known as the GML feature collection and is used to define a collection of features.
This is not supplied as part of the CSV supply. Please see Model Overview CSV and Model Overview GML for more information.
The following sub-sections provide details about the attributes included with this feature, their data types in the different output formats, and other important metadata about them.
Time the data was extracted from the database.
Attribute Name: queryTime (GML), Not provided (CSV)
Data Type: DateTime (GML)
Multiplicity: [1]
Size: 1
The date given as part of a change-only query.
Attribute Name: queryChangeSinceDate (GML), Not provided (CSV)
Data Type: Date (GML)
Multiplicity: [1]
Size: 1
gml |
xsi |
xlink |
There are many Date columns within the AddressBase product. Where a type format of Date has been used in the above attribute tables the data will be defined in the following format.
Value | Type | Notes |
---|---|---|
The naming of attributes between GML and CSV will be different due to the requirements of the file formats. For convenience the following table maps the CSV attribute name to the GML attribute name.
CSV | GML |
---|---|
Built into XML –
Xlink –
2007-10-24
Date
Date columns will follow the structure: CCYY-MM-DD
UPRN
uprn
OS_ADDRESS_TOID
osAddressTOID
UDPRN
udprn
ORGANISATION_NAME
organisationName
DEPARTMENT_NAME
departmentName
PO_BOX_NUMBER
poBoxNumber
SUB_BUILDING_NAME
subBuildingName
BUILDING_NAME
buildingName
BUILDING_NUMBER
buildingNumber
DEPENDENT_THOROUGHFARE
dependentThoroughfare
THOROUGHFARE
thoroughfare
POST_TOWN
postTown
DOUBLE_DEPENDENT_LOCALITY
doubleDependentLocality
DEPENDENT_LOCALITY
dependentLocality
POSTCODE
postcode
POSTCODE_TYPE
postcodeType
X_COORDINATE
position
Y_COORDINATE
LATITUDE
positionLatLong
LONGITUDE
RPC
rpc
COUNTRY
country
CHANGE_TYPE
changeType
LA_START_DATE
laStartDate
RM_START_DATE
rmStartDate
LAST_UPDATE_DATE
lastUpdateDate
CLASS
class