Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The October 2024 release note for the OS MasterMap Topography Layer – Building Height Attribute product
Building Height Attribute (BHA) is an enhancement to, and forms part of, OS MasterMap Topography Layer. It provides a set of height attributes with a buildings theme within OS MasterMap Topography Layer.
Total tiles: 9 985
New tiles: 0
Deleted tiles: 2 (NM7545 and NN4075)
The October 2024 BHA release contains building heights for 47 585 802 unique buildings, tanks, chimneys, and glasshouses across the entirety of Great Britain.
The total number of features is 47 769 527, including duplicate TOIDs. These are recorded when features overlap at tile edges.
Some building TOIDs (Topographic Identifiers) in OS MasterMap Topography Layer will have no corresponding height values in the BHA data in areas of coverage. This can occur because of different update cycles or in instances when a building was constructed after the capture of the source BHA data. This is also the case when a building has failed quality validation checks and there is no existing data to replace it.
Building height values are generated from a fully automated process and, as such, the accuracy of the values is subject to tolerances governed by the process. Ordnance Survey specifically disclaims any warranty that OS MasterMap Topography Layer – BHA is of satisfactory quality or fitness for a particular purpose. We further disclaim any warranty that OS MasterMap Topography Layer – BHA is error free or accurate.
The next release of OS MasterMap Topography Layer – BHA is scheduled for April 2025.
The April 2025 release will include an updated ‘BHA_ProcessDate’ for each OS_TOPO_TOID as improvements are being made as part of our continuous work to improve the data.
The April 2024 release note for the OS MasterMap Topography Layer – Building Height Attribute product
Building Height Attribute (BHA) is an enhancement to, and forms part of, OS MasterMap Topography Layer. It provides a set of height attributes with a buildings theme within OS MasterMap Topography Layer.
Total tiles: 9 987
New tiles: 2 (NH1010 and NN5080)
Deleted tiles: 0
The April 2024 BHA release contains building heights for 47 350 827 buildings, tanks, chimneys, and glasshouses across the entirety of Great Britain.
Some building TOIDs (Topographic Identifiers) in OS MasterMap Topography Layer will have no corresponding height values in the BHA data in areas of coverage. This can occur because of different update cycles or in instances when a building was constructed after the capture of the source BHA data. This is also the case when a building has failed quality validation checks and there is no existing data to replace it.
Building height values are generated from a fully automated process and, as such, the accuracy of the values is subject to tolerances governed by the process. Ordnance Survey specifically disclaims any warranty that OS MasterMap Topography Layer – BHA is of satisfactory quality or fitness for a particular purpose. We further disclaim any warranty that OS MasterMap Topography Layer – BHA is error free or accurate.
The next release of OS MasterMap Topography Layer – BHA is scheduled for October 2024.
The tile reference corresponds to the OS MasterMap Topography Layer 5 km tile to which the Building Height Attribute data applies. For consistency, the tile reference attribute will follow the 5 km naming convention adopted by OS MasterMap Topography Layer and Building Height Attribute data, for example:
TQ2060 for TQ26SW
TQ2065 for TQ26NW
TQ2560 for TQ26SE
TQ2565 for TQ26NE
Building Height Attribute data contains the unique feature references, or topographic identifiers (TOIDs), from the OS MasterMap Topography Layer. This enables associated Building and Structure Height data to be joined to the Topographic Area features within OS MasterMap Topography Layer.
The TOID is a persistent and unique identification string published in the OS MasterMap Topography Layer product. These identifiers have a prefix of ‘osgb’, are either 13 or 16 digits in length, and are allocated sequentially when a new building feature is created. TOIDS are retained throughout their lifecycle and are never re-assigned to a different feature. In order for these TOIDs to be consistent across all OS products, the identifier should not be altered in any way.
On occasion, a building TOID in OS MasterMap Topography Layer may have no corresponding height values in the Building Height Attribute data. This can occur due to the two products having different update cycles or in cases where a building has been constructed after the capture of the source Building Height Attribute data.
The TOID version attribute represents the version of the OS MasterMap Topography Layer TOID for which the height values were calculated. The Building Height Attribute production process means that in certain cases the version number for a given TOID in the Building Height Attribute data may differ from the version number in the latest Topography holding. As the two products (OS MasterMap Topography Layer and OS MasterMap Topography Layer – Building Height Attribute) have different release schedules, this issue with version numbers can occur when a Topography Layer feature has been modified since the Building Height Attribute data values were calculated or because the most up-to-date version of OS MasterMap Topography Layer is not being used.
The Building Height Attribute process date represents the date when the Building Height Attribute data was created.
Due to the derived nature of Building Height Attribute data using multiple capture methods and the current limitation of only being able to apply one height metric to a building or structure, we are aware there are circumstances where data accuracy may be impacted. Such circumstances include, but are not limited to, the following:
Where a building or structure is situated on a hill
Where a building or structure has multiple heights or is in direct proximity to another feature (for example, a tree or a river) that could impact the height reading
Where a DSM is variable in the immediate area, such as in rural areas and mountains and moorland areas
Multiple quality checks are made on the data before release to mitigate any errors, and confidence levels are high on the dataset, but please verify or contact OS if any of the data does not look correct. We are confident that this is best dataset of its kind available in Great Britain, and the data is being constantly improved, but you may want to liaise with your appointed OS Technical Consultant if you want to use the data on a large-scale project where accuracy is key.
This overview introduces OSMM Topography Layer – BHA and gives context for all users – highlighting key features, providing examples of potential uses, and listing details such as file sizes.
OS MasterMap Topography Layer – Building Height Attribute is an enhancement to, and forms part of, the OS MasterMap Topography Layer product. It provides a set of height attributes for Topographic Area features with a buildings theme within OS MasterMap Topography Layer. This initial set has been further enhanced with the inclusion of Tanks, Chimney Stacks and Glasshouses. To use the Building Height Attribution data, it must first be joined to the OS MasterMap Topography Layer holding using the topographic identifiers (TOIDs). The Getting Started Guide will assist you with this process.
The OS MasterMap Topography Layer – Building Height Attribute product was developed in response to customer demand for height information for buildings and select structures. This additional attribution can be used to make simple 3D visualisations of buildings and structures and to assist users with a range of analytical applications across both public and commercial sectors.
OS MasterMap Topography Layer – Building Height Attribute can be used to enhance the information obtained from OS MasterMap Topography Layer in a range of applications. It can also be integrated with other Ordnance Survey products such as OS Terrain 5 and OS MasterMap Imagery Layer. Potential applications include, but are not limited to, the following:
To visualise urban landscapes, aiding both planning decisions and the formulation and communication of planning policy.
To model the impact of development projects rapidly and with increased efficiency.
To help in emergency planning and risk assessment by enabling the appropriate resources to be deployed more rapidly.
To help companies understand issues associated with installing and maintaining utilities and services to customers, for example, performing water and gas pressure calculations, and installing smart meters in properties.
To use in insurance calculation models through using the heights as a proxy for the number of levels in a building.
To use in calculations of radio signal propagation and the planning of wireless networks.
To identify appropriate sites upon which to build renewable energy infrastructures.
This Overview includes the following sections:
OS MasterMap Topography Layer – Building Height Attribute data is generated from photogrammetrically derived Digital Terrain Models (DTMs) and Digital Surface Models (DSMs). That is, information gathered from aerial surveys as part of our cyclical revision programmes. DTMs show the bare ground surface, having extruded features such as buildings, trees, etc, whereas DSMs depict the elevations of the top surfaces of buildings, trees, towers and other features elevated above the bare earth.
Absolute height values represent absolute heights against Ordnance Datum Newlyn (ODN) at three distinct points within the building structure. The absolute heights require the use of additional terrain height information to provide context to these heights, such as by using them in conjunction with the OS Terrain 5 DTM product. The absolute heights are denoted with the prefix ‘Abs’. The unit of measurement used for absolute heights is metres.
AbsHMin (Absolute Height Minimum) represents the lowest point extracted from the DTM within the footprint of the building as represented in OS MasterMap Topography Layer. This aims to represent the lowest absolute height of the intersection of the external building walls and the underlying ground surface.
AbsHMax (Absolute Height Maximum) represents the highest point of the building extracted from the DSM within the footprint of the building or structure as represented in OS MasterMap Topography Layer. The highest point could be represented by any structure on top of the building, provided it is of sufficient size to be captured in the DSM source data. This may include industrial chimney stacks, machinery and any substantial structures that may be present on top of the building. Smaller structures like chimney stacks as found on residential buildings will be excluded from the AbsHMax measurement.
AbsH2 (Absolute Height 2) is a calculated value which aims to represent the lowest point where the roof intersects the alignment of the external vertical walls of the principal part of the building. This is usually referred to as the building eaves.
The principal part of the building is defined as the main structure, excluding elements at higher or lower elevations. In buildings with multiple heights (for example, a main two-storey building with a smaller single-storey extension), the eave height is calculated from the largest building extent.
The two relative building height values are generated from the differences between the absolute elevation values. The relative heights can be used in isolation to provide a third dimension to buildings, while all other features will be flat as they refer only to the height of the building, rather than the height above Ordnance Datum Newlyn (ODN). Relative heights are denoted with the prefix ‘Rel’. These attributes are also applicable to the Tank, Glasshouse and Chimney Stack structures included in the data. The unit of measurement used for relative heights is metres.
RelHMax (Relative Height Maximum) is the derived value from the calculation of AbsHMax, the calculated absolute value for the building height, minus AbsHMin, the calculated absolute value for ground height (i.e. RelHMax = AbsHMax – AbsHMin).
RelH2 (Relative Height 2) is the derived value from the calculation of AbsH2, the calculated absolute value for the eave height, minus AbsHMin, the calculated absolute value for ground height (i.e. RelH2 = AbsH2 – AbsHMin).
OS MasterMap Topography Layer – Building Height Attribute is designed to be joined to and then used as part of the OS MasterMap Topography Layer. The guide on gives guidance on how to join this data to your Topography Layer holding.
As it is a part of the OS MasterMap Topography Layer, Building Height Attribute is designed for use in a digital map within geographic information systems (GIS) and database systems. For details of Ordnance Survey’s Licensed Partners who can assist you with incorporating Building Height Attribute data in their systems, please see the .
Ordnance Survey does not recommend either suppliers or software products as the most appropriate system will depend on many factors, such as the amount of data being taken, resources available within the organisation, the existing and planned information technology infrastructure and last but by no means least, the applications that the data will be used for. However, as a minimum, the following elements will be required in any system:
A means of reading the data, either in its native format or by translating it into a file format or for storage in a database
A means of storing and distributing the data, perhaps in a database or through a web-based service
A way of visualising and/or querying the data, typically a GIS
You are advised to copy the supplied data to a backup medium before following the steps in this guide.
For reading purposes, it is recommended that users store the data on a single hard disc as this will speed up the ability of your computer to read the data. The uncompressed file size for the full supply of Great Britain (GB) is 2.6 Gb.
Building Height Attribute data is supplied in comma-separated values (CSV) file format. Files will not be compressed.
Data will be refreshed every six months.
OS MasterMap Topography Layer – Building Height Attribute is supplied as an online download. You can download data in CSV format from the .
The product is currently still available for customers to request through .
OS MasterMap Topography Layer – Building Height Attribute data will be supplied in 5 km tiles. Data will be uncompressed and file sizes will vary significantly depending on the number of buildings and structures contained within the 5 km² area. For customers with a full holding of OS MasterMap Topography Layer, a full Great Britain (GB) set is also available. For those customers who do not have a full OS MasterMap Topography Layer supply, only tiles that intersect OS MasterMap Topography Layer holdings may be downloaded.
Each 5 km² tile will contain Building Height Attribute data for any building that is partly or wholly contained within that tile. As such, buildings that traverse tile boundaries will be duplicated in contiguous holdings.
Release notes listed here provide information about the releases of OS MasterMap Topography Layer – Building Height Attribute product over the last year
Building Height Attribute data is supplied in comma-separated values (.csv) file format. Files will not be compressed.
OS MasterMap Topography Layer – Building Height Attribute is supplied as an online download. You can download data in .csv format from the .
The product is currently still available for customers to request through .
OS MasterMap Topography Layer – Building Height Attribute is an enhancement to, and forms part of, the product. It provides building height properties to help manage assets, plan works and visualise urban density. To use the Building Height Attribution data, it must first be joined to the OS MasterMap Topography Layer holding using the topographic identifiers (TOIDs) as detailed in the .
This product is updated every six months.
Building Height Attribute is an enhancement to, and forms part of, OS MasterMap Topography Layer. It provides a set of height attributes with a buildings theme within OS MasterMap Topography Layer. It has further been enhanced with the inclusion of tanks, chimney stacks and glasshouses.
This product has been developed in response to customer demand for height information for buildings and select structures. It can be used to make simple 3D visualisations of buildings and structures and can be used to assist a range of analytical applications across both public and commercial sectors.
Building Height Attribute can be used to model heat loss, regulate requirements including high-rise gas safety, help with smart meter roll-out and perform line of sight analysis for small cell planning. It can also help to manage overhead cable routing and assist in planning and maintaining water pressure to high-rise properties.
This enhancement to OS MasterMap Topography Layer can also aid architects to visualise building designs early in the planning phase. It also models the impact of development projects rapidly and can help in emergency planning and risk assessment, by allowing the appropriate resources to be deployed more rapidly.
OS MasterMap Building Height Attribute data can also be used by the government for modelling air pollution, siting solar panels, visualising planning applications in the context of surrounding buildings and also for urban density. Emergency services can also use it to know when and where to deploy specialist equipment.
OS MasterMap Topography Layer – Building Height Attribute can be used to make simple 3D visualisations of buildings and structures to:
Model heat loss
Regulate requirements
Help with smart meter roll-out
Analyse line of sight for small cell planning
Manage overhead cable routing
Assist in planning and maintaining water pressure to high-rise properties
Visualise building designs early in the planning phase
Help in emergency planning and risk assessment
Model air pollution
Site solar panels
Visualise planning applications
Access: Download
Data theme: Buildings
Data structure: Vector – Polygons
Coverage: Great Britain
Scale: 1:1 250 to 1:10 000
Format: CSV
Ordering area: All of Great Britain or customisable area (5km² tiles)
Publication months: April, October
OS Data Hub plan: Premium Plan, Public Sector Plan, Energy & Infrastructure Plan
Building Height Attribute data is derived from the latest source Digital Terrain Model (DTM) and Digital Surface Model (DSM).
For the purposes of simplifying the merging process, the individual 5 km² tiles are supplied without header information. Instructions on the merging process can be found in the .
The format and structure of the individual columns within the data will be consistent (see table below).
The Building Height Attribute header file can be downloaded from the 'Supporting documents' section of the of the OS website.
All heights have been calculated in metres to one decimal place (decimetre).
The Building Height Attribute dataset uses Ordnance Datum Newlyn (ODN) as the national height datum for all height values across mainland Britain. Other British height datums (for example, Lerwick for the Shetland Islands) are used where applicable. All height datums are incorporated within the National Geoid Model OSGM15.
There are two resources available that will help you gain further insight into coordinate systems in Great Britain:
Building Height Attribute can be used to enhance the information obtained from OS MasterMap Topography Layer in a range of applications. It can also be integrated with other OS products, such as and .
Access to this product is free for PSGA Members. Find out if you are a PSGA Member or try out a sample of OS MasterMap Topography Layer – Building Height Attribute data by with links to all of the relevant resources. Alternatively, you can try out the full product by applying for .
(BNG)
OS_Topo_ TOID | OS_Topo_TOID_ Version | BHA_Proces sDate | Tile Ref | AbsH Min | Abs H2 | AbsH Max | Rel H2 | RelH Max | BHA_ Conf |
This technical specification provides detailed technical information about OS MasterMap Topography Layer – Building Height Attribute. It is targeted at technical users and software developers
OS MasterMap Topography Layer – Building Height Attribute is a dataset containing absolute and relative height values for buildings and selected structures contained within OS MasterMap Topography Layer. It is an enhancement to, and forms part of, OS MasterMap Topography Layer.
Building Height Attribute contains height values for buildings, tanks, chimneys (industrial) and glasshouses, specifically for Topographic Area features with the theme of ‘Buildings’ within OS MasterMap Topography Layer. It is necessary to join the Building Height Attribute data to the corresponding OS MasterMap Topography Layer feature to which it belongs, identified by the building topographic identifier (TOID). As such, an OS MasterMap Topography Layer licence is required to use the Building Height Attribute data.
The Building Height Attribute data provides full national coverage.
This technical specification includes the following sections:
The Building Height Attribute product can be loaded into several databases. This section describes how to load it into commonly used databases, including PostgreSQL and Oracle. For more information on other databases that the Building Height Attribute product is compatible with, please speak to your OS Technical Consultant.
Further information about the Building Height Attribute product (including FAQs) can be found on the Product Support page for OS MasterMap Topography Layer on the OS website
This getting started guide provides instructions for using OSMM Topography Layer – BHA in different software applications. Users with limited technical knowledge will be able to follow this guide.
OS MasterMap Topography Layer – Building Height Attribute is an enhancement to the OS MasterMap Topography Layer product. The enhancement is supplied in a comma-separated values (.csv) format and is supplied separately from OS MasterMap Topography Layer’s Geography Markup Language (GML) data files. Therefore, if you want to use the Building Height Attribute data, you will need to join the two files first.
No schema changes to OS MasterMap Topography Layer are required to use the Building Height Attribute data.
The Building Height Attribute dataset is derived from and dependant on multiple other data sources, so is reliant on their accuracy. In addition, if a building has multiple heights or is in close proximity to an extreme landscape change (if it is on a hill or by a river, for example), then this may affect the data quality. Multiple quality checks are made on the data before release to mitigate any errors, and confidence levels are high on the dataset, but please verify or contact OS if any of the data does not look correct.
This Getting Started Guide is designed to walk you through the steps you need to take to join the Building Height Attribute data with OS MasterMap Topography Layer data within a geographic information system (GIS). The guide also outlines how to load the data into a database.
Within this guide, there are parts showing you how to re-structure the unique topographic identifier (TOID). We would advise against this as doing so means you will be unable to confidently match the feature in the dataset to other OS products or datasets using TOIDs or OpenTOIDs as their feature identifier.
First, you will need to check the format of your TOIDs in your translated OS MasterMap Topography Layer data and compare it to the format of the TOIDs in the Building Height Attribute data. The format of the TOIDs needs to be the same so that the Building Height Attribute data can be joined with the OS MasterMap Topography Layer data. The step-by-step instructions on how to do this can be found in managing .CSV data.
If you will be using the data in a GIS, you will then need to load the Building Height Attribute data into your GIS and join it with the OS MasterMap Topography Layer data. The step-by-step instructions on how to do this can be found in loading data into a GIS and Joining to a OSMM Topography layer.
If you will be using the Building Height Attribute data in a database environment, then the data will need to be imported into a database. The step-by-step instructions on how to do this can be found in importing data into a database.
This Getting Started Guide includes the following sections:
The Building Height Attribute product can be loaded into several geographic information systems (GIS). This section describes how to load it into commonly used GIS. For more information on other GIS that the Building Height Attribute product is compatible with, please speak to your OS Technical Relationship Consultant.
The format of the TOIDs in your .csv may have an impact on how you import the .csv into a GIS. If you have not had to alter the TOID format, GIS software should read the OS_TOPO_TOID column in the .csv file as a text string automatically, which should match your OS MasterMap Topography Layer TOIDs.
Therefore, you do not have to carry out any extra steps when importing your .csv file into a GIS, so you may wish to move on to the next section.
However, if you have had to alter the OS_TOPO_TOID in the Building Height Attribute .csv by removing the ‘osgb’, this attribute may be read as a number by a GIS; this will mean that any leading zeroes added will be deleted and the TOID field in the .csv will be incompatible with the TOID field in the OS MasterMap Topography Layer data which is formatted as a text string. We have outlined some steps which will allow the user to specify the field types for .csv files being imported to some GIS environments. The processes described in the following blocks will work with individual or merged versions of the .csv data.
A code list is a controlled set of values for an attribute. This section identifies the code lists used within OS Open Rivers and describes their values.
Unique feature identifier of the topographicArea building polygon taken from OS MasterMap Topography Layer.
Type: CharacterString
Length: 20
Multiplicity: [1]
The version number of the TOID for which the height values have been calculated.
Type: Integer
Length: 3
Multiplicity: [1]
The date that the Building Height Attribute values were calculated for the given OS_TOPO_TOID. Dates will follow the structure YYYY-MM-DD.
Type: Date
Length: 10
Multiplicity: [1]
The 5km² tile reference within which the Building Height Attribute is located.
Type: CharacterString
Length: 6
Multiplicity: [1]
AbsHMin is the absolute minimum height of the intersection of the external building walls and the underlying ground surface.
Type: Real
Length: 4.1
Multiplicity: [1]
AbsH2 is the absolute height of the base of the roof, that is, where the roof intersects the principal part of the building. The principal part of the building is defined as the main structure.
Type: Real
Length: 4.1
Multiplicity: [0..1]
AbsHMax is the absolute height of the highest point on the building and can include any structure, such as chimneys, plant housings and machinery.
Type: Real
Length: 4.1
Multiplicity: [0..1]
RelH2 = AbsH2 – AbsHMin. RelH2 is the relative building height from the base of the building (AbsHMin) to the height of the base of the roof (AbsH2).
Type: Real
Length: 4.1
Multiplicity: [0..1]
RelHMax = AbsHMax – AbsHMin. RelHMax is the relative building height from the base of the building (AbsHMin) to the height of the highest point on the building (AbsHMax).
Type: Real
Length: 4.1
Multiplicity: [0..1]
A qualitative assessment of the confidence of the height statistics for each topographicArea building polygon.
Type: BHA_ConfValue
Length: 2
Multiplicity: [1]
The Building Height Attribute .csv contains the attribute OS_TOPO_TOID, which is the topographic identifier (TOID) from OS MasterMap Topography Layer. This TOID is the attribute that is used to join the data to your OS MasterMap Topography Layer data. More information about TOIDs is available in the OS MasterMap Topography Layer Product Guide and the product's Technical Specification.
TOIDs are stored in GML as a character string, with the prefix ‘osgb’, and can be comprised of either a 13-digit integer or a 16-digit integer after ‘osgb’ (for example, osgb1000001799480255). Ordnance Survey recommends that TOIDs are stored in this format.
The changing of a TOID format means that you will not be able to confidently match features with other Ordnance Survey products or with datasets created by third parties using TOIDs or OpenTOIDs as the key feature identifier. We would therefore recommend that, except where absolutely necessary, you do not make changes to the identifier format.
Some of the methods available to translate OS MasterMap Topography Layer from GML alter the TOID from the format in which it is supplied in the GML. We have tested a small sample of these methods to ascertain how the TOID is dealt with during some translation processes. The following table details how some of the translators we tested deal with TOIDs; please look at your own data to investigate how your translation process will affect the TOIDs in your data.
Translator | Processing of TOIDs |
---|---|
It is recommended that the OS_TOPO_TOID attribute in the OS MasterMap Topography Layer – Building Height Attribute .csv files be edited if it is found that the OS MasterMap Topography Layer TOID has been altered during the translation process, although how TOIDs are managed is up to your discretion. To aid this process, we have created some script that can be run alongside a gawk application that will alter TOIDs in the .csv files in two different ways. It is recommended that you create a backup copy of your .csv file before you make any changes to it.
If your TOID column requires altering the steps to do so are outlined in the importing data into a database page - detailing how this can be achieved in a database environment. This can also be achieved using the gawk process outlined below.
There are several options which will allow the user to reformat the TOID attribute before joining it with the TOID field in OS MasterMap Topography Layer.
For smaller amounts of data, the simplest option is to use the free open-source text editor called Notepad++. Using this text editor, simply load up the Building Height Attribute .csv data and then, using the search and replace option, simply replace the 'osgb' part of the TOID name with either nothing or three leading zeroes ('000'). Remember to save the file with a new name once this procedure has been carried out.
The following sub-sections detail other steps that you can take to reformat the TOID attribute in the Building Height Attribute .csv, so that the format matches that of the TOID attribute in your translated
OS MasterMap Topography Layer, Topographic Area data. The reformatting of TOID is a very quick option which will take five minutes to set up and process on a national set of data for OS MasterMap Topography Layer – Building Height Attribute.
If the format of the TOIDs in your translated OS MasterMap Topography Layer data matches that in the Building Height Attribute .csv, please skip to loading data into a GIS.
Two script reformatting options are presented below:
Script to remove ‘osgb’ from Building Height Attribute TOIDs: Recommended for use if your translator removes ‘osgb’ from your OS MasterMap Topography Layer TOIDs but does not add any leading zeroes to shorter 13-digit TOIDs.
Script to remove ‘osgb’ and add ‘000’ to 13-digit Building Height Attribute TOIDs: Recommended for use if your translator removes ‘osgb’ from your OS MasterMap Topography Layer TOIDs and adds three leading zeroes to shorter 13-digit TOIDs.
In order to use either reformatting fix, you will need to download gawk, a tool that uses pattern-matching principles to do simple data re-formatting tasks.
Download the gawk tool and save the zip file in any location.
Extract the ‘gawk.exe’ file to a directory containing the Building Height Attribute .csv file you wish to alter (this must contain only the .csv to alter and no other files). There must be no spaces in the entire file path to that directory as this will cause the process to fail.
Both reformatting processes require you to create an .awk file and a .bat file alongside the gawk application. These need to be saved in the same directory as the gawk application and Building Height Attribute .csv file you wish to alter. The structure of the .awk file specified in the following sub-section remains unchanged regardless of which of the two script reformatting options you are using. Unlike the .awk file, the content of the .bat file is different for both reformatting options. The format to use in both instances is described after the .awk file detail below.
Copy and paste the following code into a new text editor document (such as Notepad++):
Save the file as bha_fixTOID.awk in the same directory as the gawk application and Building Height Attribute .csv file.
This code refers to the file name of this .awk file. If you choose to name your .awk file differently to our suggested name, please change the code to reflect the name of the .awk
If using the first reformatting option (i.e. Script to remove 'osgb' from TOIDs), please copy the following text into a new text editor document and save the document with a .bat extension in the same directory as the gawk application, .awk file and .csv file:
This code refers to the file name of this .awk file. If you choose to name your .awk file differently to our suggested name, please change the code to reflect the name of the .awk file you are using. The .bat file does not have to have a specific name, only the .awk file has to have a specific name because the .bat file refers to the name of the .awk file.
If using the second reformatting option (i.e. Script to remove ‘osgb’ and add ‘000’ to 13-digit Building Height Attribute TOIDs), please copy the following text into a new text editor document and save the document with a .bat extension in the same directory as the gawk application, .awk file and .csv file:
This code refers to the file name of this .awk file. If you choose to name your .awk file differently to our suggested name, please change the code to reflect the name of the .awk file you are using. The .bat file does not have to have a specific name. Only the .awk file has to have a specific name because the .bat file refers to the name of the .awk file.
For both reformatting options, navigate to the directory where the .bat file is saved and execute it by double clicking the file. An MS-DOS window will appear.
Once the process is complete, press the return key to close the window.
The directory should now contain a new Building Height Attribute .csv file with the same name as the original but starting with an underscore. This .csv file will contain a copy of the original with the TOID attribute altered.
If you wish to check how this process has altered the TOID attribute, do not open the .csv file with Microsoft Excel because Excel will reformat the TOID and read it as a number field. Instead, open the .csv file in a text editor as this will keep the TOID correctly formatted.
It is likely that the user will wish to merge 5 X 5km2 tiles together to create an area of interest before loading into a GI application. The following procedure can be followed to undertake this operation:
Place all the .csv files into an empty folder.
Copy and paste the following script into a text editor (such as Notepad++), and, once copied, give the file a name which explains its function. In this case, we have called the file mergedBHAdata.bat.
Navigate to the directory where the .bat file is saved and execute by double clicking the file. This will create a new file called mergedBHAdata.csv from all the component .csv files in the folder.
Delete the original 5 X 5km2 from the folder, leaving just the newly created mergedBHAdata.csv file in the folder.
Copy and paste the following script into a text editor (such as Notepad++), and, once copied, give the file a name which explains its function. In this example, we have called the file Append_BHA_Header.bat.
Download the Building Height Attribute header file from the 'Links and downloads' section of the OS MasterMap Topography Layer Product Support page on the OS website.
Place the downloaded header file for Building Height Attribute data into the same folder as the merged Building Height Attribute data file, along with the batch file that was created in Step 4.
Run the batch file. A new merged .csv file containing the header will be created called BHA_Data.csv.
In order to use the Building Height Attribute data within GIS it must first be joined to OS MasterMap Topography Layer. This page describes this process for some commonly used GIS.
The .csv data should be loaded into your GIS with the TOID column formatted as it is in your OS MasterMap Topography Layer data holdings (see managing .csv data and loading data into a GIS pages for more details).
A join between these two datasets will link them together based on the unique identifier between the two datasets: the TOID. This will result in the buildings in your OS MasterMap Topography Layer data holdings being associated with a set of building heights.
Users should be aware that in Building Height Attribute data, features are not broken at tile edges. Therefore, once the .csv files have been merged and then joined with features in the OS MasterMap Topography Layer Topo_Area table, duplicate records will exist in the data. Depending upon which GI application is being used, tools are available within the application to remove duplicate features.
ESRI ArcGIS: In ArcGIS, use the option Geoprocessing > Dissolve to remove the duplicate features within the merged data. The output can be saved into file geodatabase, created as described earlier in this section.
QGIS: In QGIS, use the option Vector > Geoprocessing > Dissolve to remove the duplicate features within the merged data. The output will be a shapefile containing the de-duplicated data.
MapInfo Professional: There are several ways to remove duplicate features in MapInfo Professional. The following article from precisely.com details how to use the Delete Duplicates tool in MapInfo Professional to remove duplicate records but retain map objects:
OS MasterMap Topography Layer – Building Height Attribute consists of three absolute height values and two relative height values for each building polygon. The included structures – tanks, chimneys (industrial) and glasshouses – are not distinguished from the buildings in this dataset. As such, they are subject to the same attribution and parameters. The unit of measurement used for absolute and relative building heights is metres.
The absolute building heights describe the height of the buildings and selected structures at three distinct points. They are measured against Ordnance Datum Newlyn (ODN) and require the use of other height products (for example, ) to give meaningful heights to the building features. If we have been unable to calculate a valid value or have insufficient confidence in a value for any of these attributes, the fields will be populated as NULL.
Relative building heights have been generated from the absolute height values. These provide height values that can be utilised without the use of other height products. If we have been unable to calculate a valid value or have insufficient confidence in a value for any of these attributes, the field will be populated as NULL.
The Unified Modeling Language (UML) model of OS MasterMap Topography Layer – Building Height Attribute in CSV format can be seen in the figure below:
This section describes the single feature type that makes up the OS MasterMap Topography Layer – Building Height Attribute product. The Building Height Attribute feature type has 10 attributes. The following information is given about each attribute:
The name of the attribute and what it is describing.
The nature of the attribute. The following values may occur:
Type | Description |
---|
Describes how many times this element is expected to be populated in the data. An attribute may be optional or mandatory within the product as denoted by the following:
[1] indicates that the attribute is mandatory and can only occur once.
[0..1] indicates that the attribute is optional; if present, it only occurs once.
Building Height Attribute data is supplied in comma-separated values (CSV) file format. Files will not be compressed.
OS MasterMap Topography Layer – Building Height Attribute is supplied as an online download. You can download data in CSV format from the .
The product is currently still available for customers to request through .
Building Height Attribute is supplied in 5 km² geographic chunks. Each 5 km² chunk will contain Building Height Attribute values for any building polygon that intersects that area. As such, any Building Height Attribute values that fall across tile boundaries in contiguous tiles will be duplicated.
Tiles are supplied with all available data contained within them. Not all 5 km² tiles will have complete coverage.
The CSV files are named as the 5km2 chunks they correspond to, for example:
TQ2060 for TQ26SW
TQ2065 for TQ26NW
TQ2560 for TQ26SE
TQ2565 for TQ26NE
Miso InterpOSe
Removes ‘osgb’ from the beginning of TOIDs and adds three leading zeroes to 13-digit TOIDs.
Astun Loader
Preserves raw GML TOID format but renames column from TOID to fid.
Pitney Bowes MapInfo
Removes ‘osgb’ from the beginning of TOIDs.
QGIS
Preserves raw GML TOID format.
10 | High | Buildings that are represented well by the Building Height Attribute values and for which we have high confidence in the geometric accuracy of the values. |
20 | Moderate | Buildings that are represented well by the Building Height Attribute values but where we do not have a high confidence in the geometric accuracy of the height values. |
30 | Low | Buildings that have a complex geometry which cannot be accurately represented using the Building Height Attribute values. |
90 | Incomplete | Buildings for which we have not been able to calculate some or all of the Building Height Attribute values. |
99 | Not Assessed | Buildings for which the confidence level of the Building Height Attribute values has not been assessed. |
Date | Specifies a day within the Gregorian calendar in the format YYYY-MM-DD. |
Integer | Any positive or negative whole number or zero. |
Real | A floating point number. |
CharacterString | An ordered set of characters. |
The header file for OS MasterMap Topography Layer – Building Height Attribute is available to download from the product page of the OS website (under the 'Supporting documents' section).