Configuring QGIS to use OS Maps API WMTS/WMS base maps
Add OS Maps API WMS service via Astun Data Services
When using QGIS, we recommend utilizing the WMS service through Astun Data Services. This typically provides superior display clarity compared to WMTS across all scales.
ADS provides you with all of the standard OS Maps API styles as a WMS plus the following enhanced styles: Leisure style with additional zoom-levels down to large-scales, Dedicated Leisure 25k and 50k styles, Grayscale versions of Road, Outdoor, Light and Leisure.
Open QGIS and from the
Browsersection right-click on theWMS/WMTSnode and clickNew Connection:In the
Create a New WMS/WMTS Connectionpanel:Give the service a clear name such as
OS Maps API WMS base maps via ADS.In the
URLfield enter the following URLhttps://map.services.astuntechnology.com/your-organisation-goes-here/osmaps/service?REQUEST=GetCapabilities&SERVICE=WMS&key=your-API-key-goes-hereand replace the API key and the organisation placeholders with your API key and your organisation name.In the
WMS/WMTSsection set the:The
WMS DPI-Modetooff.The
WMTS server-side tile pixel ratiotoStandard (96 DPI).
Click
OK.Now you are ready to use the base maps.
Add OS Maps API WMTS service either from OS or Astun Data Services
According to the Open Geospatial Consortium (OGC), the WMTS standard complements the existing WMS standard by allowing clients to request specific image tiles from a server in a standardized way. Those tiles have predefined content, extent, and resolution in comparison with the tiles that are coming from a WMS server that dynamically renders the tiles on the fly.
When viewing a WMTS map in QGIS at a scale that doesn’t correspond with one of the predefined WMTS scales (TileMatrix), QGIS will draw tiles from the nearest WMTS scale and resample them. This can result in reduced display clarity.
Add OS Maps API WMTS service via OS
You can directly request the following mapping styles from the OS Maps API: Leisure, Light, Outdoor, and Road. The Leisure base map is available in the EPSG:27700 (British National Grid) projection while Light, Outdoor, and Road are available in both EPSG:3857 (WGS84 Web Mercator) and EPSG:27700 (British National Grid). For more details on what products you can request directly from OS, you can check the Overview page.
Open QGIS and from the
Browsersection right-click on theWMS/WMTSnode and clickNew Connection.In the
Create a New WMS/WMTS Connectionpanel:Give the service a clear name such as
OS Maps API base maps.In the
URLfield enter the following URLhttps://api.os.uk/maps/raster/v1/wmts?key=your-API-key-goes-hereand replace theyour-API-key-goes-hereplaceholder with your alpha-numeric OS Data Hub Project API Key.In the
WMS/WMTSsection set the:The
WMS DPI-Modetooff.The
WMTS server-side tile pixel ratiotoStandard (96 DPI).
Click
OK.Now you are ready to use the base maps.
Add OS Maps API WMTS service via Astun Data Services
As described in the Overview page, ADS provides you with enhanced styles of the OS Maps API styles in WMTS. Those are: Leisure style with additional zoom-levels down to large-scales, Dedicated Leisure 25k and 50k styles, Grayscale versions of Road, Outdoor, Light and Leisure.
Open QGIS and from the
Browsersection right-click on theWMS/WMTSnode and clickNew Connection:In the
Create a New WMS/WMTS Connectionpanel:Give the service a clear name such as
OS Maps API WMTS base maps via ADS.In the
URLfield enter the following URLhttps://map.services.astuntechnology.com/your-organisation-goes-here/osmaps/service?REQUEST=GetCapabilities&SERVICE=WMTS&key=your-API-key-goes-hereand replace the API key and the organisation placeholders with your API key and your organisation name. If you are unsure of your organisation name, please contact us via support.In the
WMS/WMTSsection set the:The
WMS DPI-Modetooff.The
WMTS server-side tile pixel ratiotoStandard (96 DPI).
Click
OK.Now you are ready to use the base maps.
Enabling the Tile Scale panel
With the Tile Scale enabled, you can lock the zoom to the appropriate tile scale provided by the WMTS service. To do that:
Open the
Viewtab, selectPanelsand enableTile Scale:
Printing
WMTS
To print the same scale of base mapping that is shown in the map canvas the Export resolution of the layout must be set to 96 dpi which matches the native resolution of the WMTS tiles. Choosing another Export resolution such as 192 dpi may result in a crisper base map but runs the risk of the print base map displaying a different style. When a Map is added to the Layout the Set Map Scale to Match Main Canvas Scale button (accessible when you have selected the Map Item via the Item Properties tab) can be used to ensure the map canvas and print map have the same scale and hence are displaying the same style of base map.
Click the
New Print Layoutbutton and give a name to the layout:Select the
Add Mapbutton and draw your map:On the
LayoutPanel Find theExport Settingssection and reduce thedpifrom the default 300 to 96:Right-click on the map item and select
Item Properties:Navigate to the
Item Propertiespanel and click theSet Map Scale to Match Main Canvas Scale:Continue with any additional styling you prefer for your layout and proceed to export your PDF:
Map Canvas:
Layout Preview:
Exported PDF:
Leisure style (WMTS)
Printing the Leisure style at 192 dpi commonly results in a different OS raster product. All raster products (MiniScale, 250k, 50k, and 25k) are displayed at two zoom levels, their native scale and half their native scale (zoomed out); this makes it possible to produce 192 dpi of a given product by zooming the map canvas to the half of their native scale, setting the layout scale to match the map canvas and setting the Export resolution to 192 dpi. The preview in the layout might display the wrong product but the PDF should show the same as the map canvas.
The 50k and 25k OS raster products are also available as individual base maps via Astun Data Services; these may help when creating a map that should show a specific base map.