Using Spatial Hub Datasets within QGIS
2026-07-31
Introduction
Data from the Improvement Service Spatial Hub can be mapped in QGIS. In the following paragraphs we show how this can be achieved using Web Feature Services (WFS) pathways and shapefiles.
WFS pathways are a means of accessing geographic data via a file pathway, drawing directly from the Spatial Hub. The advantage of utilizing WFS files lies in their ability to fetch data in real-time from the Spatial Hub each time a map is refreshed. This approach is more dynamic compared to using static file types that are downloaded and stored on a local device (such as those in a downloads folder). Static files risk becoming outdated unless the source data is frequently checked and manually updated with the latest versions.
This guide also assumes that the reader has already registered for a Spatial Hub Account.
If this is not the case, please see our guidance on getting started here and register for a free account here.
On the Spatial Hub log in and navigate to your chosen dataset. It is essential that you are logged into your account at this stage, otherwise you will not be able to download the data.
This guide uses the ‘Article 4 Directions - Scotland’ dataset, available here, as an example:
Co-ordinate Reference Systems
All Spatial Hub datasets are provided in the OSGB 1936 / British National Grid (EPSG:27700) CRS, so please ensure that your QGIS project is using the same CRS, otherwise datasets may display inaccurately.
Installing and Opening QGIS
If you have not already installed QGIS, you can do so here. Once downloaded and installed successfully, open QGIS and load a new Project.
You can either do this by selecting Ctrl+N or by navigating to the ‘Project’ navigation menu at the top left of the display and clicking ‘New’.
Reading Shapefiles into QGIS
Shapefiles are available for each dataset on the Spatial Hub.
Under the ‘Resources’ heading is a menu offering a choice of formats; CSV, WFS, WMTS, Shapefile, or GeoJSON.
Selecting ‘Shapefile’ will open a dialogue box outlining the Terms and Conditions, and a dropdown menu offering you a choice of layers to download – most datasets only comprise one layer, but some (i.e., Historic Environment Records) will have more.
Select your layer and then click ‘Accept and Download’. The layer will download as a zip file to your default download location (usually the ‘Downloads’ folder), from there you can copy it across to the source folder for your QGIS project and then extract the files from the zip folder.
Right click the zip file and select ‘Extract All’:
In the QGIS Browser Pane, navigate to the folder where you saved the downloaded shapefile (i.e., pub_a4d.shp):
You can either drag and drop the shapefile from the Browser pane into the Layers pane, thereby adding it to your project space, or you can add it through the QGIS menu bar. To do this, select Layer>Add Layer>Add Vector Layer:
The ‘Data Source Manager’ dialogue box will open. In the ‘Vector’ tab, find the ‘Source’ section and click on the three dots to the right of the ‘Vector Dataset(s)’ field, then navigate through the file explorer to the folder where you extracted your zip files.
Select the .SHP extension within the folder and click ‘Open’, this will add the filepath to the ‘Vector Dataset(s)’ field. Click ‘Add’ in the bottom right corner of the Data Source Manager dialogue box, this will add the shapefile to the Layers pane of your QGIS Project.
Close the Data Source Manager.
The layer will appear in your project space. From here you can interrogate and format the shapefile however you wish.
Loading a Spatial Hub dataset as a Web Feature Service (WFS) within QGIS
On Spatial Hub log in and navigate to your chosen dataset. Again, it is essential that you are logged into your account at this stage, otherwise you will not be able to connect to the web services.
Under the ‘Resources’ heading is a menu offering a choice of formats; CSV, WFS, WMTS (Web Map Tile Services), Shapefile, or GeoJSON.
Beside ‘WFS’, click the ‘Copy Link’ button (To copy a WMTS link instead, click ‘Copy Link’ beside the WMTS option). This will open a dialogue box outlining the Terms and Conditions, and a dropdown menu offering you a choice of layers to download – most datasets only comprise one layer, but some (i.e., Historic Environment Records) will have more.
There will also be a URL for the WFS (or WMTS) link. This will include the authkey you will have been assigned when your account was set up. Select your desired layer from the dropdown and click the ‘Copy Link’ button to save the URL to your clipboard.
Once clicked the button will change to say ‘Copied’.
In QGIS navigate to the ‘Browser’ menu and scroll down until you reach ‘WFS/OGC API – Features’.
If you want to use WMTS, the next steps are the same but select ‘WMS/WMTS’ instead.
Right-click on WFS/OGC API – Features (or WMS/WMTS) and select ‘New Connection…’.
A pop-up will appear. Type a name you would like to give your WFS layer connection and paste the WFS/WMTS URL that copied from the Spatial Hub.
Here, it is given the name ‘Article 4 Directions – Spatial Hub’ as a reminder of what the dataset represents, and where the WFS URL is from.
The dataset should now be connected and should be visible within your QGIS ‘Browser’ menu. Click on the drop-down arrow to the left of the name you gave the WFS dataset and either drag and drop the dataset (marked by a small globe) directly into the project space, or into the ‘Layer’ menu.
The layer will appear in your project space. From here you can interrogate the data however you wish.