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

  • QGIS (version 3.12.0 or later).

Instructions

These instructions are based on QGIS version 3.12.0

  1. Open an existing project or create a new one.

  2. Deselect the Render checkbox in the bottom bar, if necessary.

  3. In Data Source Manager | WFS > Server Connections, click New.

  4. In the Create a New WFS Connection dialog, provide the service details:

    • 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. You 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 saves the connection details and lists the new connection in the Server Connections dropdown for future use.

  5. In Data Source Manager | WFS > Server Connections:

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

    • Click Connect.

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

  6. In Data Source Manager | WFS:

    • Features: Select the features you want to load. You can select multiple layers using your Ctrl key.

      As a best practice, only load features that relate to your current task – not all features. 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. This engages the bounding box which is set by your viewing window. This means that only selected features within the viewing window will load (not all features).

    • Click Add to add the features.

    • Optionally, click Close to close the dialog.

  7. Select the Render checkbox in the bottom bar on the main UI, and select the checkbox next to each feature you want to display in the Layers panel.

Last updated