A step-by-step guide for connecting to LDS Web Map Services (WMS) in QGIS
Before you start, see our guide to web service versionand version support in GIS applications to check which web services your version of QGIS supports.
Visit the QGIS Project website for more help and to download the application.
Accessing LDS web services
The first step in accessing LDS web services is to create an API key. These keys are codes (such as abcdefgh123456789) unique to each LDS user, and are used to simplify the process of accessing web services.
How to use LDS WMS in QGIS
The following process is performed using QGIS version 2.18.
- From the QGIS application, click the Add WMS/WMTS Layer globe icon shown below to bring up the Add layer window:
- Click New:
- Enter the LINZ Data Service WMS URL of the dataset you’re interested in into the URL field. For example, the following URL will connect you to the WMS service for the NZ Topo50 Maps dataset:https://data.linz.govt.nz/services;key=YOUR-API-KEY/wms/layer-50767?service=WMS&version=1.1.1&request=GetCapabilities
Alternatively, you can use the URL below to get a listing of all WMS datasets on LDS:https://data.linz.govt.nz/services;key=YOUR-API-KEY/wms?service=WMS&version=1.1.1&request=GetCapabilities
Put a name of your choosing in the Name field.
Make sure you click on the Smooth pixmap transform checkbox. This option smooths and optimises the rendering of images. Click OK. (There’s no need to enter a username and password as the LDS knows you’re a registered user from your API key)
Click Connect to establish the service connection.
(Note: If using the second URL example above, you will get a listing of the WMS layers. Due to the large number of WMS-enabled datasets available on LDS, you may experience a timeout error when trying to load these layers. If so, you could try increasing the timeout limit in your Settings. To change the settings in QGIS select Settings > Options > Network. Increase the number in the Timeout for network requests (ms) field.)
Highlight the dataset you want to connect to by clicking on it.
The coordinate reference system is displayed at the lower left of the window (NZGD2000 in the example below). To the right of it is a Change… button. Click the button if you wish to change the coordinate system.
If you have a preferred CRS, you can set a default CRS for your QGIS projects in Settings. To choose default CRS select Settings > Options > CRS, then choose your CRS under Always start new projects with following CRS
- Select the Coordinate Reference System you want and click OK
Finally, click Add to add the layer to the map:
Tip: Image encoding
For improved performance, try changing the image encoding option.
The default PNG option returns 24bit graphics which are substantially bigger than the JPEG, PNG8 (8bit) or GIF options. TIFF graphics are uncompressed and will have the best quality but be the slowest to render on your map.
If you want to print from your map try the PNG or even TIFF formats.
For fast loading of WMS, LINZ recommends using:
- JPEG: Best format to use for size and quality. Should be used for photo data sources such as ortho-photography.
- GIF/PNG8: Good for map data layers such as Topo50 or Topo 250 where each map has a small number of colours.