How to use the Changeset generator

A step-by-step guide to exporting a changeset from the LINZ Data Service.

On this page

The changeset generator allows to you select and export changed data. It is available under the ‘History’ tab of each dataset that supports the Changeset API.

Before you begin, make sure you read our Changeset API reference documentation (links at the end of this page).

Timespans 

If you need to keep your copy of Toitū Te Whenua data as up to date as possible and need a record of all actions that have occurred, we recommend you access our changesets as regularly as the data is updated. For example, property and boundary data is updated each week.

If you don't always need the latest Toitū Te Whenua data, you can access changesets on a less regular basis by requesting a dataset of the changes that occurred across multiple revisions.

Changeset exports from the LDS website

Sign in to LDS

The Changeset API uses your API key to generate a WFS request for changeset data. If you haven’t already, sign in to LDS and create an API key.

Dataset revision history

Select the ‘History’ tab for the dataset. This tab shows all revisions that have been made to the dataset and summarises the changes that have occurred between those revisions. As long as the dataset supports changesets you will see change statistics for the number of feature/row additions, modifications and deletions.

Use the checkboxes on the left to select the 2 revisions you wish to generate a changeset for. 

LDS revision history screen

Selecting a single revision

In the example below we have asked the API to generate a dataset for the changes that occurred between sequential versions of the dataset; from revision 362 to revision 363. In LDS, the FROM timestamp element is exclusive. This means, in effect, we have asked for a changes related to a single revision, those from revision 363.

See our reference guide on dates and timestamps for information about how changeset revisions are managed through timestamps.

LDS revision history screen with options selected

If you haven't updated your database in 2 weeks or more and need to make sure all data changes are applied to your database, you will need to select revisions that occurred over a greater timespan than a single revision.

Selecting multiple revisions

In this example, the Changeset API will generate a dataset of the changes that took place spanning the 5 revisions between 7 July 2018 (exclusive) and 18 August 2018 (inclusive).

If multiple changes have been applied to a record over that time, the Changeset API will process these on the server side and return to you the latest action for that record.

For example, if a record was inserted at revision 360 then deleted at revision 363, your changeset would only report the DELETE. If a record was inserted at revision 359 then updated at revisions 360 and 361, your changeset would report this change as an INSERT but with attribute data as at the most recent UPDATE.

See our reference guide on change definition for information on action types.

LDS revision history with multiple options selected

Access options

Once you’ve selected the 2 revisions you want to generate a changeset for, the bottom section of the history tab will activate, generating a WFS URL for your requested changeset. 

There are 3 ways you can access your changeset.

Downloadable file for manual imports or simple data operations

  • Click on the ‘Download’ button to generate a download the changeset in CSV/WKT format.

WFS GetCapabilities URL for use in GIS applications

  • Copy the GetCapabilities URL shown in the changeset window and paste it into your GIS client. Your client will read the GetCapabilities document, then fetch the data.

WFS GetFeature URL for scripted processes

  • Right click on the ‘Download’ button then copy the GetFeature URL.
  • Paste this URL into a text file from which you can alter its syntax, such as removing or changing the output format, or manually altering the timestamp values. See our reference guide for information on changeset URL syntax.

Be notified of new revisions

You can track when a new changeset revision for a dataset has been published by subscribing to that dataset’s History feed (found under the History tab for that dataset). This RSS feed will also show you the count of each action type and the total feature count.

Feeds are not available for datasets subject to the LINZ Licence for Personal Data.