Get an API key

The first step in using the LINZ Data Importer is to get an API key. An API key is required from each service you wish to access data from via the plugin.

From the LINZ Data Service and other data portals

See our Creating an API key guide to create an API key for the LINZ Data Service. The same general process can also be used to generate an API key from the agency data portals listed on the About page.

You must login and create an API key for each individual data source you wish to access data from.

From LINZ Basemaps

Visit LINZ Basemaps to grab an API Key. Simply, open the menu on the right, then copy the pre-populated API key from the full WMTS URL.

Note: these keys are rotated every 90 days and will need to be updated accordingly. Contact basemaps@linz.govt.nz if you wish to retrieve an unlimited developer API key.

Connecting to a data source

  1. Go to the Setting tab, click the drop down under the “API Keys” heading and select the domain of the data service which you are interested in (e.g. data.linz.govt.nz).
  2. Click the “+” symbol. This will confirm the selected domain and provide a text box to insert the relevant API key.
  3. Copy and paste the relevant API key from the service you want to connect to, and click Save.
  4. This will trigger the plugin to request the domain’s dataset information, allowing you to view and import the data in QGIS via WMTS and WFS web services.
  5. Select the layer of interest and click “Add”. The corresponding dataset will be added to the map display.
  6. Another service can then be added by changing the domain and repeating steps 2-5.

Technical information

Coordinate Reference System (CRS)

The available CRS options for each layer are shown in a drop down next to the “Add Layer” button (in terms of EPSG code). Select the CRS of the dataset to be requested from the server.

If the QGIS project initially has a CRS which does not match the imported dataset’s CRS, QGIS will reproject the imported dataset to match the project CRS. Important: reprojecting the CRS of a dataset can degrade spatial accuracies and relationships.

If the first dataset of a QGIS session is imported via the plugin, the plugin will change the QGIS project’s CRS to match the imported data. As the plugin enables on-the-fly projections, any further datasets which don’t match the first dataset’s CRS will be reprojected. When these changes occur, the user will be notified via the QGIS message bar.

Requests, Responses, Patience and Caching

The first time a Domain and API key are saved via the Settings menu, the plugin will request capability documents for the domain’s web services (WMTS/WMS). This causes a delay as the Data Portal’s server retrieves these documents, resulting in the plugin appearing inactive. After the documents are fetched, they are cached and updated, removing any further delays each time the plugin is started.

Filtering

The left-hand panel allows users to filter by service types (All, WFS, WMTS). Users can toggle column headers to order data by ascending or descending. Datasets can be filtered using keywords by text being entered into the “Filter Data Sets” search bar.