Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks

share|improve this question
    
Mastermap is in GML format - but delivered in compressed format. –  Mapperz Aug 15 '12 at 14:59
add comment

7 Answers 7

I just tried it with the sample data from here:

http://www.ordnancesurvey.co.uk/oswebsite/products/try-now/sample-data.html

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.

share|improve this answer
    
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 '12 at 14:52
2  
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 '12 at 15:00
add comment

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

http://www.bodley.ox.ac.uk/guides/maps/translat.htm#o2m

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

share|improve this answer
add comment

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.

http://www.lutraconsulting.co.uk/resources/ostranslator

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

For lines:

http://www.lutraconsulting.co.uk/downloads/OSLinesRulesBased.zip

For areas:

http://www.lutraconsulting.co.uk/downloads/OSAreasRulesBased.zip

share|improve this answer
add comment

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?

share|improve this answer
add comment

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

Hope this helps Nige

share|improve this answer
    
Sorry. Plugin is called OS Translator. –  Nigel Law Aug 15 '12 at 18:51
add comment

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.

share|improve this answer
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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