QGIS

Accessing OS Vector Tiles 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 Vector Tiles Service).

What you need

Note: We used QGIS version 3.22.0 to create these instructions.

Instructions

  1. Navigate to Layer > Add Layer > Add Vector Tiles Layer...

  2. In the Data Source Manager | Vector Tile dialog, in Vector Tile Connections, click New > New Generic Connection...

  3. In the Vector Tiles Connection dialog provide your connection details:

    • Name: Enter a name for the API. It is good practice to name your connections in a way that makes them recognisable for future use.

    • URL: Copy the OS Vector Tiles API endpoint address from the OS Data Hub and paste it into this field, then update the URL as described below:

      To retrieve tiles and style them appropriately, you need two URLs. The URLs have slight variations based on the projection. Here are some example URLs to retrieve the basemap in Web Mercator (EPSG: 3857):

      To learn more about the available data in OS Vector Tiles API, you can view what data is available here.

    • Min. Zoom Level: Set the minimum zoom levels based on your preferred projection:

      • Web Mercator (EPSG: 3857): Select 6 or more using the up and down arrows. Minimum zoom level is 6.

      • British National Grid (BNG: EPSG: 27700): Select 0 or more using the up and down arrows. Minimum zoom level is 0.

    • Max. Zoom Level : Set the max zoom levels based on your preferred projection.

      • Web Mercator (EPSG: 3857): Select 19 or less using the up and down arrows. Maximum zoom level is 19.

      • British National Grid (BNG: EPSG: 27700): Select 15 or less using the up and down arrows. Maximum zoom level is 15.

    • Style URL: Copy your OS Vector Tiles API style URL to style the tiles based on the default style. See Styles in the Technical specification for more information.

    • 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 Vector Tiles API key.

    • Other fields: Leave the rest of the fields as they are.

  4. Click OK to save the information and close the dialog. QGIS saves your connection details and you can reuse this connection with any of your geospatial projects.

  5. Navigate to Layer > Data Source Manager > Vector Tile.

  6. In Vector Tile Connections, select your new connection to OS Vector Tiles API (named OS Vector Tiles API -3857 in our example) in the Server Connections dropdown.

  7. Click Add.

Last updated