Visualising OS MasterMap® Topography Layer Building Height Attribute in QGIS

Introduction

Background information on OS MasterMap® Topography Layer Building Height Attribute and details of the attributes supplied by Ordnance Survey can be found on the Building Height Attribute Overview page.

BHA data is available from Digimap in the File Geodatabase format, which can be read by QGIS without requiring any processing. It is easy to visualise BHA in File Geodatabase format using a freely available QGIS plugin. The following steps describe the process in detail.

Getting started

Download the following datasets for your area of interest from Digimap using the OS Data Download application:

  1. BHA data (BHA data is found in the 'OS MasterMap' group): select 'File Geodatabase' as the format;
  2. OS Terrain™ 5 DTM: this will be used as the base (surface) heights for the area to provide a more accurate terrain model than is available by default in ArcGlobe;
  3. Optionally download any additional data you may wish to use as a backdrop, such as OS VectorMap® Local Raster or 1:25 000 Scale Colour Raster;

Visualising the data in 3D

Visualising the data in 3D in QGIS is achieved using the Qgis2ThreeJS plugin, which can be installed using the QGIS plugin manager if you don’t have it already. The steps below describe how to use the plugin to create a 3D model:

  1. Ensure you have all the data loaded in to your QGIS project that you wish to include in the 3D model, as a minimum you should have your DTM, the BHA dataset and a suitable map layer to drape over the DTM.
  2. Turn off all layers in the Layers panel apart from the surface you wish to drape over the DTM; the buildings will be styled using the Qgis2ThreeJS plugin.
  3. Launch the plugin, which can be found on the Web toolbar.
  4. Using the ‘DEM’ panel of the plugin select your DTM data as the ‘DEM Layer’, leave all other settings at their default values. Tip: by default the surface has a vertical exaggeration of 1.5, if you wish to reduce or increase this, the setting is configured on the ‘World’ panel of the plugin.

    QGIS 2 Three JS plugin window
  5. In the ‘Polygon’ panel of the plugin select your BHA dataset and complete the following settings:
  6. Optionally specify an ‘Output HTML file path’ to save the resultant files. Whilst you’re experimenting we recommend you leave this blank and the plugin will save the data in a temporary location, when you’re happy with the result you can use this setting to save your final visualisation.
  7. Press ‘Run’ to create the 3D model. Once it’s finished processing the model will open in your default web browser.
  8. If you get an error when running the plugin, see the Tips section below.

The plugin outputs an HTML file, along with a small number of accompanying files. The HTML file requires a WebGL compatible browser (WebGL is a method of generating dynamic 3D graphics using JavaScript), most modern browsers are WebGL compatible including IE 11, FireFox, Chrome, Safari and Opera, the Can I Use site offers further information on browser compatibility.

As the files are output as a web page, you can share the results of your work with colleagues without them needing to have any specialist GIS software, however you are not permitted to make the website publicly available as the html and javaScript files contain map data rather than just images of maps.  The Licence does not permit the sharing of licensed data from Digimap with anyone other than registered users of the service: Digimap Licence.

Tips

 

3D visualisation with extruded buildings and trees

OS VectorMap® Local Raster draped on top of OS Terrain™ 5, with buildings from OS MasterMap® Topography Layer Building Height Attribute and Positioned Non Coniferous Trees extruded on top

The finished visualisation

The screen grab below shows the final visualisation centred on the south side of Edinburgh using OS 1:25,000 Colour Raster as the surface layer.

3d visualisation

1:25 000 Scale Colour Raster draped on top of OS Terrain™ 5, with buildings from OS MasterMap® Topography Layer extruded on top using Building Height Attribute data.