QGIS
Last updated
These instructions are based on QGIS version 3.22.4 and assume you have set the default coordinate reference system to British National Grid (EPSG 27700).
There are two ways to load the GML supply into QGIS: You can use drag and drop or the Data Source Manager.
To load the GML supply using drag and drop:
Open an existing QGIS project or create a new one.
In the file system on your computer system (for example, in Windows Explorer), select the GML data (.gz file).
Drag and drop the file directly into the QGIS UI.
In the Select Items to Add dialog:
If you use multiple screens, this dialog may open on another screen.
Select each required layer or click Select All to select all layers.
Check the Add layers to a group option.
This groups the layers by OSMM Topography Layer tile reference.
Click Add Layers.
The GML data will now display in both the Layers panel and the map area.
To load the GML supply into QGIS using Data Source Manager:
Open an existing project or create a new one.
In the Layer menu, click Data Source Manager.
In the Data Source Manager dialog:
Select Vector from the data menu on the left.
In Source > Vector Dataset(s), click ‘…’, navigate to and select the GML on your computer.
Click Add.
In the Select Items to Add dialog:
If you use multiple screens, this dialog may open on another screen.
Select each required layer or click Select All to select all layers.
Check the Add layers to a group option.
This groups the layers by OSMM Topography Layer tile reference.
Click Add Layers.
The data will now display in both the Layers panel and the map area.
Data is typically grouped by tile reference in the Layers panel. If you open two or more OSMM Topography Layer layers simultaneously (for example, TopographicArea and BoundaryLine), you may need to reorder the layers to see the data correctly.
You can reorder layers using drag and drop. We recommend the following layer order: CartographicText, CartographicSymbol, TopographicPoint, BoundaryLine, TopographicLine and TopographicArea.
Using GML data in QGIS is not always the best option. You should consider converting your data to another format (for example, shapefile) for the following reasons:
When working with multiple tiles of 5km2 OSMM Topography Layer data, GML data does not always merge seamlessly.
Rendering performance of GML data in QGIS is not as good as other formats, because GML data cannot be spatially indexed.
The sections that follow show you how to convert GML data to shapefile and how to apply a spatial index to shapefiles.
To convert GML to shapefile in QGIS:
In the Layers panel, right-click on the layer you want to convert and click Export > Save Features As....
In the Save Vector Layer as… dialog:
Format: Select ESRI Shapefile.
File name: Click …, navigate to the folder in which you want to store the shapefile, name the file, and click Save.
Check the Add saved file to map option.
Click OK.
You can watch the export progress in the blue progress bar at the bottom of the QGIS UI. When the process is complete, the shapefile layers will display in the Layers panel and the map area.
Repeat steps 1 - 2 above for each layer (for example, TopographicLine, CartographicText…) that you want to convert.
When working with shapefiles, we recommend you apply a spatial index to the data, particularly when loading large or national sets of data. This significantly improves performance when rendering and panning the data.
To apply a spatial index to a shapefile in QGIS:
In the Layers panel, right-click on the shapefile layer you want to index and click Properties in the context menu.
In the Layer Properties dialog:
Select Source in the navigation menu on the left.
In Geometry click Create Spatial Index.
Click OK to close the confirmation dialog.
Click Apply and then OK.
Your shapefile layer will now be spatially indexed; this improves rendering and querying performance.
Repeat steps 1 and 2 above for each layer you want to create an index for (for example, TopographicLine, CartographicText…).