How to use the Changeset generator

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

The changeset generator allows to you select and export changed data. It is available under the ‘Services and APIs’ 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's 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

Under the ‘Services and APIs ’ tab, select the WFS Changeset option and click the ‘Create changeset’ button the history tab will open up displaying 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.

Click on the ‘Create Changeset’ button at the bottom. Use the checkboxes on the left to select the two revisions you wish to generate a changeset for. 

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

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 2 June 2023 to 9 June 2023. 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 9 June 2023.

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

In LDS, the FROM timestamp element is exclusive
 

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 five revisions between 28 April 2023 (exclusive) and  9 June 2023 (inclusive).

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

For example, if a record was updated on 26 May 2023 then deleted on 9 June 2023, your changeset would only report the DELETE. If a record was inserted on 28 April 2023 then updated on 12 May 2023 and 19 May 2023, 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.

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

Access options

Once you’ve selected the 2 revisions you want to generate a changeset for, Click on the ‘Create changeset’ button at the bottom.

There are 2 ways you can access your changeset.

Downloadable file for manual imports or simple data operations

  • Click on the ‘Generate’ button to download the changeset in various available formats.

WFS GetFeature URL for scripted processes

  • Copy the GetFeature URL as shown in the figure below.
  • 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.
Copy the GetFeature URL
Last updated