QGIS
Accessing OS Features API via QGIS
What you need?
Instructions
3
Last updated
Was this helpful?
Accessing OS Features API via QGIS
QGIS is an open GIS (Geospatial Information System) desktop application that allows you to display, interrogate, visualise and create geospatial information including from geo-centric APIs (for example, a WFS).
These instructions demonstrate how to integrate and apply the OS Features API into QGIS in order to produce a series of topography layers based on our latest OS MasterMap Topography layer data.
QGIS version 3.4 or later
A preloaded base map, for example, OS Maps API or OS Vector Tile API
OS Features API URL and key; see Getting started with an API project for more information
Restart QGIS after editing the connection details for the changes to take effect.
Add the service details for your new connection:
Name: Provide a name for the API. It is good practice to name your connections in a way that makes them instantly recognisable.
URL: Copy your OS Features API endpoint address from the OS Data Hub and paste it into this field. Your API Key is automatically added to the URL in the key parameter.
Authentication: You can ignore these options. It is not necessary to enter your username and password to use the service as all authentication is done through your OS Features API key.
Version: Click Detect to identify the WFS version number.
Max. number of features: Enter a value between 100 and 1000. Larger values allow for a greater number of map features but may result in a slow response.
Page size: Enter a value between 100 and 1000. As a best practice, we recommend you start with limiting the number of features and page size to 100 to ensure a smooth service. This can be increased to a maximum of 1000 to allow for more features to be loaded at once.
Other fields: Leave the rest of the fields as they are.

You are not required to provide styling, zoom or coordinate information in the URL. This will be added at a later stage by your GIS application.
QGIS saves your connection details. You can reuse this connection with any of your geospatial projects.
Select your connection to the OS Features API in the dropdown. If you called the OS Features API before, the connection will be available as an option in the dropdown.
Click Connect. A list containing the title and name of all feature layers available in OS Feature API will display in the large box.

As a best practice, only load feature layers that you need. This depends on what you're attempting to do. For example, to simulate the OS MasterMap Topography Layer you may need to load all layers, but when using backdrop mapping for visualisation, interrogation and analytical purposes you may only need to load an interest-specific layer.
Click the layers you want to apply. You can select multiple layers using your Ctrl/Command key.
Check the Only request features overlapping the view extent box (if not already selected). This option engages the bounding box and ensures that only features within the viewing window load (not everything). Your viewing window in your GIS application sets your bounding box.
Click Add.

Depending on the features you selected, adding the layers could take several minutes. The more types of features you call, the longer it will take to load into the GIS. Please be aware that each feature, regardless of its layer, counts towards the request restriction.
In the Layers panel right click on a layer and click Properties in the context menu. You can also double-click the layer name.
In the Layer Properties dialog Click Rendering in the left navigation to open the Rendering tab.
Select the Scale Dependent Visibility option (first field). This activates the manual options.
Enter your scale options in the Minimum (exclusive) and Maximum (inclusive) boxes. Rather counter-intuitively, you want the higher value in Minimum (exclusive) and the lower value in Maximum (inclusive). 'exclusive' and 'inclusive' means that in order to obtain your entire range, you need to input your minimum value +1 and your maximum value -1. This allows the layer to display up to and including the selected values. The example below shows how this is taken into account for a scale ranging from 1:1,500 (1,501) to 1:50 (49).
Click _Apply.

You can now optionally click OK to close the Layer Properties dialog. The Style dropdown (bottom left) allows you to load a predefined stylesheet or customise your own.
Last updated
Was this helpful?
Was this helpful?




