QGIS
Accessing OS Vector Tile API via QGIS
Last updated
Was this helpful?
Accessing OS Vector Tile API via QGIS
Last updated
Was this helpful?
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).
OS Vector Tile API added to an API project in the OS Data Hub with an API Key. See Getting started with an API project for more information.
QGIS (version 3.22.0 or later)
In the Data Source Manager | Vector Tile dialog:
Click New.
Select New Generic Connection...
In the Vector Tile Connection dialog:
Name: Provide a name for the connection.
Style URL: Input the Retrieve Style request URL for the OS Vector Tile API.
Source URL: Input the Retrieve Tile request URL for the OS Vector Tile API.
Min. and Max. Zoom Levels: Set these as follows:
Web Mercator (EPSG: 3857): Min. Zoom Level = 6; Max. Zoom Level = 19
Authentication: Leave these settings at their defaults.
Other: Leave all other settings at their defaults.
Click OK.
To retrieve tiles and style them appropriately, you will need two URLs. The URLs have slight variations based on the tileset and projection.
Here are some example URLs to retrieve the basemap in Web Mercator (EPSG: 3857):
https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key={INSERT_YOUR_API_KEY}
https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key={INSERT_YOUR_API_KEY}
To learn more about the data available in OS Vector Tile API, please see the 'What data is available?' page.
Once you have an existing OS Vector Tile API connection, go to the OS-Vector-Tile-API Stylesheets Repo in GitHub and select the required style file.