I have been tasked with getting OS Mastermap topography data into QGIS system to compliment our other map layers. The data comes in .gz format. Which I am told needs to be decompressed before I can do anything further? After decompressing it using WINRAR it turns it into a file which has no file type? I assume it is supposed to be .gml?

I have read I then need to convert it into shape file format so that QGIS can read it, so I use OS GML to OGR python plug in. Which seems to do nothing...or says "processing stage failed with code 1".

Can anyone give me any advice or a brief walkthrough on how to get OS Mastermap data into QGIS?

  • Mastermap is in GML format - but delivered in compressed format.
    – Mapperz
    Aug 15, 2012 at 14:59

8 Answers 8


We have a new tool which you can load large number of Ordnance Survey's MasterMap into PostGIS. The tool is written from scratch and is pretty fast compared with others:



  • 2
    Welcome to gis.stackexchange! While we do not forbid advertising products which solve the specific problem described in a thread, it is generally recommended to provide specific details and - if appropriate - code/screenshots to back up your claims rather than a couple of links to some product website.
    – underdark
    Mar 25, 2015 at 13:11
  • 3
    This is a free and open source plugin for qgis, so not much of an advertisement. All the description and steps required are within the links and I avoided duplication.
    – Lutra
    Mar 31, 2015 at 8:07
  • 1
    This is in fact legit.
    – songololo
    Jun 20, 2015 at 18:49
  • Any plans to add the OS Sites Layer schema?
    – Jamie Bull
    Sep 5, 2016 at 11:15
  • Great QGIS plugin this, loads OS MasterMap way faster than anything else I've seen
    – Matt
    Sep 27, 2016 at 15:17

I just tried it with the sample data from here:


The QGIS import plugin asks for compressed files (*.gz), so just start it up, define input and output folders, choose your output format, and press "convert". It should work right away.

EDIT: The file within the *.gz frome the example I linked doesn't have an extension either, but I opened it with a text editor and it does contain GML syntax.

  • Yeah that worked fine, although the formatting and colours are all over the place. How would you do the same thing if you had 4 different folders with a number of .gz files in each?
    – Adam
    Aug 15, 2012 at 14:52
  • 3
    I'm not too familiar with GML and have no knowledge on Mastermap data, but I suppose it's just like any pure vector data (like shape) and thus doesn't contain any styling by default - that would be your job (maybe there are some pre-defined stylings in the web somewhere?). Also, QGIS can copy-paste styles from one layer to another, that might be handy. Regarding the multiple folders: As far as it looks, the GML plugin converts ALL *.gz files within the input folder and puts them in accordingly named output subfolders, so you just would have to run the process four times?
    – SAnderka
    Aug 15, 2012 at 15:00

I have found the OS GML Tools plugin to be a bit strange when I specify the same input and output directories. Try specifying different input and output directories (I usually create folder called gml and one called shp and use those.

The file that has no extension can be renamed to .gml and it will be fine.

Their is a guide on this website on how to use the OS GML Tools plugin.


In terms of styling you can download QGIS qml files from that site as well (direct download links included below):

For lines:


For areas:



I just tested it and you can just drag and drop the compressed gml into QGIS and then choose which layer to import. Works fine with Quantum GIS 1.8 Lisboa.


To convert the MasterMap files use this free software 'OSM2MIF' from Oxford Boleian Library Map Room.

{dead link}://www.bodley.ox.ac.uk/guides/maps/translat.htm#o2m alt:http://freemappingtools.yolasite.com/osm2mif.php

You can load the tab files into QGIS after conversion.

MasterMap is in GML format. Versions of MapInfo prior to v 8.0 do not support the full import of OS gml. OSM2MIF translates MasterMap data files into MapInfo MIF (MapInfo Interchange Format). MIF files can then be imported and opened in MapInfo. Once the files have been imported, they are saved as MapInfo tables (.tab files).

Features: OSM2MIF translates all three layers (topographic, address and ITN). Attribute data is maintained (currently not all routing data in the ITN layer is supported, but this may be improved in a later release). Update versions of MasterMap include Departed Members and a list of these can be extracted using OSM2MIF. Single or batch file processing is possible.

useful information on http://iss.leeds.ac.uk/info/285/datasets/333/digimap_collections_technical_information/4


I maintain https://github.com/AstunTechnology/Loader which the Lutra QGIS plugin uses under the hood to do the translation. Loader is a command line application that allows you to translate KML and GML data (optionally compressed) in to one of the many formats supported by OGR (Shape, MapInfo Tab, PostGIS, SQL Server etc.).

Install instructions and usages examples are available on the project wiki including instructions for loading data suitable for QGIS. Installation and configuration is more involved than the QGIS plugin but it provides greater flexibility.

Currently configuration is provided for the following Ordnance Survey products:

  • AddressBase Plus
  • AddressBase Standard
  • OS MasterMap ITN
  • OS MasterMap Topography
  • VectorMap Local

You really need to know the type of the file before it was compressed (and I'm afraid I'm not familiar with how OS MasterMap files are distributed).

You might find the uncompressed file is already a shapefile and so can be easily opened in QGIS. Why not try adding the .shp extension to the uncompressed file and trying to open it in QGIS?

  • It is GML. Unzip the file, and add the .gml to the end. Can be opened no problem in QGIS. Mar 25, 2015 at 11:33

Faunalia provide a plugin to handle OS Mapping. The plugin is available in the Faunalia Repository.

To add Faunalia repository: From the main menu, select Plugins > Fetch Python Plugins A new window will appear. Select Repositories tab, and then click on Add ... A new window will appear again. For name, type: Faunalia Repository and for URL: http://www.faunalia.it/qgis/plugins.xml

  • Sorry. Plugin is called OS Translator.
    – nigellaw
    Aug 15, 2012 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.