QGIS

Accessing OS NGD data with OS NGD API – Features 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).

The instructions that follow demonstrate how to connect to OS NGD API – Features using QGIS.

What you need

Instructions

1

Set up a new connection

Once a new project with a base map map has been set up, zoom in to a small area to reduce the number of requests that are initially sent to the API. Select Layer > Add Layer > Add WFS / OGC API - Features Layer.

2

Create a new connection

In the Data Source Manager | WFS / OGC API - Features dialog click New and in the New WFS Connection dialog:

  • Name: Provide a name for the connection. You can reuse this connection in the future.

  • URL: Copy the OS NGD API – Features endpoint address from the OS Data Hub and paste it into this field. Your API Key is automatically appended to this URL in the key parameter.

  • Authentication: Leave these settings at their defaults. You do not need a username or password as authentication is done through your API Key.

  • Version: Click Detect to identify the version.

  • Enable feature paging: Select this option, if necessary.

  • Page size: Enter a maximum page size. This limits the page size to a maximum number of features. We recommend a setting of about 100 to speed up response times. Larger values may result in a very slow response time.

  • Other: Leave the other settings at their defaults.

  • Click OK.

QGIS Create a New WFS Connection dialog.
QGIS Create a New WFS Connection dialog.
3

Adding layers to the map

Data Source Manager | WFS / OGC API - Features dialog:

  • Select your new connection in the dropdown, if necessary.

  • Click Connect.

QGIS Data Source Manager | WFS > Server Connections.
QGIS Data Source Manager | WFS > Server Connections.

When you click Connect, a list of layers available in OS NGD API – Features populates in the main box:

  • To add a layer to the map: Select the layer to highlight it. You can select multiple layers by using the Ctrl key.

As best practice, only load layers that relate to your current task – not all layers. The more features you call, the longer it takes to load them into QGIS. In addition, each feature, regardless of its layer, counts towards your rate limits.

  • Only request features overlapping the view extent: Select this option.

  • Click Add.

QGIS Data Source Manager | WFS / OGC API - Features.
QGIS Data Source Manager | WFS / OGC API - Features.

The layer will then display in the Layers panel and the data will display on the map:

QGIS UI showing OS NGD API - Features data in the Layers panel and map area.
QGIS UI showing OS NGD API – Features data in the Layers panel and map area.

Last updated

Was this helpful?