Home Resources Using OS MasterMap® Topography Layer in Quantum GIS

Using OS MasterMap® Topography Layer in Quantum GIS

This page is intended to allow users to quickly get started using OS MasterMap Topography Layer data in Quantum GIS.

QGIS is a fully featured Free and Open Source desktop GIS package. Here we'll describe how to load, view and apply styles to the Topography Layer

Requirements

You'll need the following before starting:

  • A working copy of QGIS 1.5 or later (if you haven't yet installed QGIS you can get it from here)
  • An internet connection (for QGIS to download the Ordnance Survey Translator plugin)

For further information on how to install and use QGIS, visit this page.

Ordnance Survey Translator

The plugin is intended to help users obtain, style and use Ordnance Survey data in QGIS. As the first step, a plugin has been developed to convert OS MasterMap Topography Layer GML files from Ordnance Survey to ESRI shapefile. Working with shapefiles in QGIS is easier and faster compared with GML. A set of qml (QGIS styling) files and SVG files will be provided for styling of MasterMap in accordance to Ordnance Survey's guideline.

We are hoping to add extra functionality and PostGIS support in near future.

OSGeo hosts a wiki page for Ordnance Survey related tools. The page is intended to be a public forum for suggesting new features and ideas.

Installing the Ordnance Survey Translator plugin

Follow this procedure to install the plugin:

  1. Select the Fetch Python Plugins... option from the Plugins menu.
  2. Python plugin menu

    The QGIS Python Plugin Installer dialog should appear.

  3. Click the Repositories tab.
  4. You should now see a list of repositories.

  5. If you only have one repository (QGIS Official Repository), click the Add 3rd party repositories button then click OK.
  6. Python plugin repositories

  7. Click the Plugins tab.
  8. Type translator into the Filter box to quickly locate the plugin.
  9. Select the plugin and click Install plugin.
  10. Click Close.

If you have any problems, see the Troubleshooting section for some possible solutions.

Using Ordnance Survey Translator

The following instructions will demonstrate how to convert Ordnance Survey's MasterMap Topography sample data into Shapefiles which will be opened in QGIS.

  1. Open QGIS and click on the OS Translator button in the Plugins toolbar.
  2. The Ordnance Survey Translator dialog should appear.

  3. Click the top Browse button and locate the folder in which your .gz input files are stored.
  4. In this example, the input .gz file is located in C:\Users\attendee\Documents\GIS\gz Files and output shapefiles will be stored in C:\Users\attendee\Documents\GIS\Converted Shapefiles.

  5. Click the middle Browse button and locate the folder in which to store output shapefiles.
  6. Click Convert.
  7. QGIS may become irresponsive during the conversion process which may take a few minutes to complete. During this process a DOS window may be visible.

  8. The conversion process, will produce several shapefiles (e.g. lines, areas, etc). After conversion is complete, the converted MasterMap shapefiles can be opened in QGIS using the Add Vector Layer button.

Applying styles

Styling vector files in QGIS is very flexible. You can chose different methods of styling based on the attribute table of the vector file. In this example, we will style the TopographicArea.shp and TopographicLine.shp.

Figure below shows the 2 layers in QGIS before styling.

MasterMap with no style

To apply the style to TopographicArea.shp, download and unzip this file. It should contain OSAreasRulesBased.qml. In QGIS, right-click on TopographicArea.shp and select Properties. A new window will open. Click Load Style ... and browse to the OSAreasRulesBased.qml. Click OK.

For TopographicLine.shp, download and unzip this file. You should have OSLinesRulesBased.qml.  In QGIS, right-click on TopographicLine.shp, select Properties and click on Load Style.... Browse to OSLinesRulesBased.qml. Click OK.

MasterMap with style

Troubleshooting

QGIS can't connect to any of the plugin repositories

This may happen if your network requires you to use a proxy server to access the internet. If this is the case, you'll need to configure your proxy server settings. To do this:

  1. Select Options from the Settings menu
  2. Click the Network tab
  3. Enable the Use proxy for web access option and enter your proxy server settings
  4. Click OK

© 2009 - 2013 Lutra Consulting unless otherwise stated. All rights reserved.