This getting started guide focuses solely on loading the product in GML format. For guidance on using the products in GeoPackage or vector tiles formats, please see the following two format-specific getting started guides:
GML is an XML dialect, which can be used to model geographic features. It was designed by the Open Geospatial Consortium (OGC) as a means for people to share information regardless of the applications or technology that they use. In the first instance, GML was used to overcome the differences between different GIS applications by providing an open standards file format as an alternative to proprietary formats.
The data can be loaded into several GIS. This section describes how to translate the GML and load it into some commonly used GIS. However, as the data is based on a relational data model, not all GIS formats will support this and storing the data in a relational database is recommended. For more information about other GIS that OS MasterMap Highways Network is compatible with, please speak to your OS Relationship Manager.
The common GIS software applications covered in this section are:
QGIS
ArcMap
MapInfo Professional
Cadcorp SIS Desktop
Software for loading into a database:
Go Loader – PostGreSQL
Some software will successfully read the GML, including both geometry and textual information. However, where a data field contains multiplicity, these elements will be ignored.
These instructions outline how to load OS MasterMap Highways Network into QGIS using the GML file you have received. They have been prepared using version 2.14.5 of QGIS Desktop – an open-source GIS in which you can create, edit and visualise and publish geographic information.
You can download QGIS from the QGIS website.
To load and display GML data in QGIS:
Open an existing project in QGIS or create a new one.
The OS MasterMap Highways Network data can be loaded into QGIS either zipped or unzipped. To load the data, select the Add Vector Layer icon (points and lines in the shape of the letter 'V' beside a white cross symbol on a green square background).
In the Add Vector Layer dialog, in the Source section, click Browse and navigate to the GZ / GML file you wish to import.
Note: If the files do not appear in the browser window, change the file type in the dropdown to Geography Markup Language [GML].
After selecting the file, click Open.
Note: Alternatively, you can load the file by dragging and dropping the GZ or GML file into a blank canvas. This will open the GML as both vector layers and tables in QGIS, displayed in the Layers Panel.
It also draws the layers in the canvas:
You can add additional layers of OS MasterMap products (for example, OS MasterMap Topography Layer) to give context to the data.
You can also use QGIS to export OS MasterMap Highways Network data in many different common GIS formats. This will allow you to open the files in numerous other GIS applications.
To translate GML using QGIS:
Right-click on the layer you want to translate and select Save as.
Note: If you are trying to save layers for more tiles or a national dataset, please bear in mind that you will have to save them separately as there is no option for grouping layers.
In the Save Vector Layer as… dialog:
Format: Select your chosen format from the dropdown for further analysis, for example, MapInfo TAB or ESRI Shapefile. Tables can also be saved as either a DBF or CSV file.
Format: Select Browse to save your file to a location of your choice.
Click OK to save the data in your chosen format.
Repeat steps 1 and 2 for each layer that you want to translate.
These instructions outline how to load OS MasterMap Highways Network into ArcMap using the GML file you have received. They have been prepared using version 10.2 of ArcMap.
GML data can be now imported as zipped GML (GZ) directly into ArcMap using the Data Interoperability tool called ‘Quick Import’. The Interoperability extension is now available at no cost as a part of ArcMap from version 10.2. You require internet access when using ‘Quick Import’ tool so the data can access the schema attached to the file.
NOTE: If your version of ArcMap is older than 10.2 and you do not have a licence for Data Interoperability, you will have to use translation tools available in QGIS (explained in the previous sub-section) to first translate the GML data into ESRI shapefiles, before you can load them in ArcMap.
You can find more information about the Quick Import tool on the ESRI website.
To import GML data into ArcMap using the 'Quick Import' tool:
Open ArcMap.
In the top bar, click the ArcToolbox icon (red toolbox).
ArcMap toolbar showing ArcToolbox icon in the ArcToolbox menu, expand Data Interoperability Tools and double-click on Quick Import.
In the Quick Import dialog, select the ellipsis button to the right of the Input Dataset section.
In the Specify Data Source dialog, select the ellipsis button to the right of the Format section.
In the FME Reader Gallery dialog, select GML SF-0 (Geography Markup Language Simple Features Level SF-0 Profile), then click OK.
Back in the Specify Data Source dialog, in the Dataset section, you should use the ellipsis button to navigate to the folder where you saved your GML/GZ file.
In the Select File dialog, select the GML/GZ file and click Open. Make sure that the extensions available to load are *.gz or *.gml.
Leave the rest of the settings as the defaults and click OK in the Specify Data Source dialog.
In the Quick Import dialog, select the folder icon to the right of the Output Staging Geodatabase section.
In the Output Staging Geodatabase dialog:
Navigate to the folder and select the output Personal Geodatabase for the feature classes to be stored in.
Select Geodatabases from the Save as type dropdown.
Click Save.
Next, select OK in the Quick Import dialog.
The process starts and you will see the process running notification at the bottom of the screen.
When the process is complete, a popup window will appear at the bottom right corner of the screen:
Close the ArcToolbox menu.
In the Add Data dialog, connect to the folder where you saved the Geodatabase by selecting the
Note: If you stored the file geodatabase in a folder to which you are already connected, you will not need to connect to the folder again.
In the Connect to Folder dialog, navigate to the folder and click OK. Select the Highways geodatabase that you have created and click Add.
The component feature classes within the file geodatabase will appear in the Add Data dialog. In this example, we only have the RoadLink feature class. Select the OS MasterMap Highways Network RoadLink feature class within the file geodatabase, then click Add.
You can view and analyse the features, as they are, directly from the Geodatabase. You can also save the OS MasterMap Highways Network data as ESRI shapefiles or GeoDatabase feature classes.
To save the OS MasterMap Highways Network data as ESRI shapefiles or Geodatabase feature classes:
Right-click on the feature on the Table of Contents, then select Data > Export Data… from the menu.
In the Export Data dialog, select the folder icon.
In the Saving Data dialog:
Navigate to the folder where you wish to save your data.
Name: Rename your data accordingly, for example, Soton_Road_Link.shp.
Save as type: Select Shapefile or Geodatabases from the dropdown.
Click Save.
Leave the rest of the settings in the Export Data dialog as they are and click OK.
An ArcMap warning popup window will appear asking if you want to add the exported data to the map as a layer; there is no need to do that, so click No.
If you are using a more recent version of ArcMap (version 10 onwards), you can open GML files directly in ArcMap and view the geometry.
To load untranslated GML files into ArcMap:
Open ArcMap.
Click the Add Data button (black cross on top of a yellow diamond) in the top ribbon.
In the Add Data dialog, connect to the folder where you saved your translated OS MasterMap
In the Connect to Folder dialog, navigate to your folder and click OK.
The Add Data dialog will remain open, so you can navigate to your GML files, choose a file to open and click Add.
This will load the geometry into ArcMap for you to inspect.
You can export the geometry to either a shapefile or a geodatabase by right-clicking on a layer in the Table of Contents and selecting Data > Export Data… from the menu.
If your version of ArcMap is older than version10 or if you do not have access to the Quick Import (Data Interoperability) extension, you can use other translation tools such as QGIS (explained in an earlier sub- section in this guide). This will enable you to first translate the GML for OS MasterMap Highways Network data into either a File Geodatabase or ESRI shapefiles before you can load them into ArcMap. However, it is recommended to use a File Geodatabase, as a shapefile can only store geometry and not the related tables.
To load translated GML into ArcMap:
Open ArcMap.
To load a geodatabase or shapefile into ArcMap, select the Add Data button (black cross on top of a yellow diamond) in the top ribbon.
In the Add Data dialog, connect to the folder where you saved your translated OS MasterMap Highways Network data by clicking the Connect to Folder button (black cross on top of a yellow rectangle).
In the Connect to Folder dialog, navigate to your folder and click OK.
The Add Data dialog will remain open, so you can navigate to the folder containing your data, select the elements of the data you wish to open in the map window and click Add.
The OS MasterMap Highways Network features will be added to the ArcMap.
The OS MasterMap Highways dataset has been created using a relational data model. If you are using a File Geodatabase, you can create relationship classes within the Geodatabase.
Note: Appendix A lists all the relationships between the tables.
Open ArcCatalog.
If you don’t have a connection to the folder containing data, add one now by clicking the Connect to Folder button (black cross on top of a yellow rectangle) from the top ribbon.
In the Catalog Tree:
Navigate to the folder containing your geodatabase.
Right-click on the geodatabase and select New > Relationship Class from the menu.
In the New Relationship Class dialog:
Give the new relationship class a meaningful name, click on the tables the relationship is between, then click Next>.
Leave the default as Simple (Peer to Peer) Relationship and click Next>.
Leave the default names and select None (no messages propagated), then click Next>.
As there is more than one reference to the RoadLink, you will need to create a one-to-many relationship by selecting 1-M and then click Next>.
You do not need to add attributes, so select No, then click Next>.
For this example, we are using the Primary field in the RoadLink table: TOID; select this from the dropdown list.
The Foreign Key in the Road Network Reference table will be RoadLink TOID. Select this from the dropdown list, then click Next>.
Click Finish to create the new relationship class.
Note: The final 3 steps are important as they define the field that will be used to link the data together. These relationships are described in Rela
When you open the data in ArcMap and use the Identify Tool, it will now return all data that forms part of the created relationship.
These instructions outline how to load OS MasterMap Highways Network into MapInfo Professional using the GML you have received. They have been prepared using version 15.2.2 of MapInfo. This version of MapInfo allows you to convert GML data using the Universal Translator Tool (older versions of MapInfo Professional may not have this functionality).
However, using this tool will only convert the files that contain geometry. If you wish to use the full data set, it is recommended that you store the data in either a relational database or a Spatialite or GeoPackage data structure, supported from version 12.5 of MapInfo Pro.
Note: These instructions refer to the 64Bit version. The Universal Translator Tool is the same in the 32Bit version; however, the MapInfo menus are slightly different.
If your version of MapInfo is 12.0.2 or older, you will have to use translation tools available in QGIS (explained in an earlier sub-section) to first translate the OS MasterMap Highways Network GML data into MapInfo TAB files, before you can load these files into MapInfo.
If you are bringing in already translated TAB files, start following the instructions from Section 4.3.2.
Open MapInfo Professional.
On the main Tools tab, select Universal Translator.
Note: If this is not under the list of ‘Running’ tools in the 'Running' tab, go to the ‘Registered’ tab and scroll down the list of available tools until you find it.
In the Set Translation Parameters dialog:
Reader: Select GML (Geography Markup Language) from the Format dropdown menu.
Reader: In Dataset, use the ellipsis button to navigate to the folder where you saved your GML files.
Writer: Select MapInfo TAB from the Format dropdown menu.
Writer: In Dataset, use the ellipsis button to navigate to the folder where you want your TAB file to be saved.
Leave the rest of the settings as the defaults.
Click OK.
The translation starts. You will notice comments appearing in FME Quick Translator dialog. When complete, you will see a notification saying the 'Translation was SUCCESSFUL'.
After you receive a successful translation notification, close the FME Quick Translator dialog.
One common reason for the translation to fail is that the Universal Translator Tool cannot find the schema file used to interpret the GML. If this is the case, the schema file can be added manually.
To manually add the schema file used to interpret the GML:
Follow Steps 1 to 3 in the sub-section above to open the Universal Translator Tool in MapInfo Professional.
In the Set Translation Parameters dialog, click the Parameters… button in the Reader section.
Halfway down the GML (Geography Markup Language) Parameters dialog, click the ellipsis button to the right of the Application Schema box, then navigate to the schema location and select GeneralNetwork.xsd. (The schemas can be downloaded from the OS MasterMap Highways Network GitHub repository.
In the Select Application Schema dialog, click Open and then OK and re-run the translation.
To open translated TAB files in MapInfo Professional:
In the top ribbon, select the Home tab > Open > Table.
In the Open dialog, use the dropdown menu against 'Look in' to navigate to the folder where you saved your TAB files.
Note: If you cannot see your files, select MapInfo (*.tab) from the 'Files of type' dropdown menu.
Select your translated TAB file, then click Open.
The data will now load into MapInfo Professional without styling:
From version 11.5.2 of MapInfo Professional, the SQLite data format has been supported. This is a light- weight portable data type that allows users to store both geometry and tabular data within the same structure. OGC GeoPackage is an extension of this and is supported from MapInfo Professional version
15.2.2 (version 15.2.2 supports tables with geometry and version 21 supports all GeoPackage content). Both formats can be created using FME workbenches.
To open a GeoPackage for use in MapInfo Professional:
In the top ribbon, select the Home tab > Open > Table.
In the Open dialog:
Change the Files of type dropdown to GeoPackage (.gpkg).
Use the dropdown menu against 'Look in' to navigate to the folder where you saved your GeoPackage file.
Click Open.
Note: You will also see an option in the 'Files of type' dropdown for SQLite, which can be opened in a similar way.
A list of available tables appears in the Select One or More Tables to Open dialog.
In the Select One or More Tables to Open dialog:
Select the tables you wish to open.
If your table contains geometry, you can set the default style by selecting the Style tab.
Chose the geometry type (Point, Line or Area) and select a style.
Click OK to open the tables in MapInfo Professional.
MapInfo Professional will create a TAB file for the data you have selected. The file will open within the Explorer panel and the map window and will be ready for you to work with.
The following instructions explain how to display and build a structured topological dataset using OS MasterMap Highways Network data in Cadcorp SIS Desktop. For the purposes of this guide, the version of Cadcorp SIS Desktop used is 9.1.1610.
There are several ways to load OS MasterMap Highways Network data into Cadcorp SIS Desktop:
Using OS MasterMap Highways Network utility. This allows you to visualize the highways data, and carry out network analysis using the SIS Desktop Routing Tools.
Using Drag & Drop to visualize the highways data, which does not create a routable network.
Using the OS (GB) Networks Manager to load the highways data and create a fully routable network dataset.
Optionally, add OS Paths data to that dataset.
Each method is dealt with in turn, in the following sections.
OS MasterMap Highways Network allows Highways data supplied directly from Ordnance Survey to be loaded into SIS. This option should be used for the initial visualization of the Highways data.
On the main Cadcorp SIS Desktop screen, select Add Overlay > Ordnance Survey (GB) > OS (GB) Transport Network.
Click Next to display the Ordnance Survey MasterMap Highways Network dialog.
Browse to the root folder containing the OS (GB) MasterMap Highways Network files.
The example below shows the OS (GB) MasterMap Highways Network folder that contains the following .gml files:
Select the folder and click Finish.
The following map will be displayed:
This layer is topologically structured and can be used with the SIS Desktop Routing Tools, for network analysis, including point-to-point routing based on road classification, as well as the underlying topology.
To avoid loading the .gml files every time this network is required, we recommend you use the Ordnance Survey MasterMap Highways Network Manager to load Highways data into a single topologically structured file, as described below.
You can also load Highways data into SIS Desktop by simply dragging and dropping a Highways .gz or .gml file as supplied by Ordnance Survey into the SIS Desktop window
Note: This method will not create a routable network in SIS Desktop and will not apply any of the routing information or U-turn restrictions. It is a method to simply display the data in SIS Desktop. To obtain a routable network, you must use the method described in the next section.
To build the Highways data into a single, topological structured .bds file, the data should be processed using the Ordnance Survey (GB) Networks Manager.
Click File > Utilities > Ordnance Survey (GB) and select Cadcorp SIS Network Manager. The Cadcorp SIS Network Manager dialog opens.
Select OS (GB) Transport Network.
Use the file browser to navigate to the location of the source files and click Next.
The number of .gz/.gml files selected for loading will be shown in the dialog above.
If required, check the Import network in 2D option. This will disregard the z value in the Highways data which can sometimes distort snapping.
Click Next.
To create a new .bds file to hold the topological data from the .gml files, navigate to an appropriate location where you want to create the .bds file, then enter a filename and click Save.
In the next window, check the tickbox(es) for the required processing options. For network analysis, it is recommended that both options are applied to prevent routing from behaving illogically.
In the preceding dialog, you also have the option of saving and exporting the network to an OSRM (Open Source Routing Machine) database which can be used for exceptionally fast routing in SIS Desktop.
Click Next > Load to begin loading the data.
When loading is complete (shown by the confirmation message in the log), click Close.
The .bds file is created in the chosen location.
If required, you can also add OS MasterMap Highways Network Paths data to the OS MasterMap Highways Network data file you created in the previous section.
On the Cadcorp SIS Network Manager dialog, select Add Paths Data.
You can also choose to maintain a separate copy of the .bds file by the option in the preceding dialog.
A message is displayed in the preceding dialog to confirm that the Paths data has finished loading.
Select the Add Data button (black cross on a yellow diamond) from the top ribbon.
Connect to Folder button (yellow rectangular folder with a black cross on top of it).
Highways Network data by clicking the Connect to Folder button (black cross on top of a yellow rectangle).
In the FME Quick Translator dialog, either select File > Translate or click the Translate Data button (side-by-side upended brown and orange cylinders connected by a green arrow).
Use the file browser to navigate to the Highways data file (usually a .bds file) and click Next.
Select the OS MasterMap Highways Network Path data you would like to add to the .bds file. (Click on the three dots to open the file browser).
Click Next > Load to begin loading the OS MasterMap Highways Network Paths data.