This guide provides a set of tools and step by step instructions to merge LINZ Data Service (LDS) layers and tables into one Esri File Geodatabase and create relationships within the database.
Download the LDS Esri tools software
LDS layers for merging and relationships
Get the data from LDS
Using ArcToolbox to run the tools
Using the python command line to run the tool
Relationships in action
LINZ provides sets of spatial layers and tables for the simplified Property and Ownership datasets on the LINZ Data Service. Some of the spatial layers within this dataset relate to the table (non-spatial) records by attribute association. If you are using a GIS system and wish to search or visualise the spatial features while still being able to query related table records to provide additional descriptive information, Esri File Geodatabase relationships help you do this.
To best support Esri customers, LINZ provides a downloadable set of tools to merge layers and tables into one database, and create relationships within this merged database.
See the Koordinates Help site for information on their File Geodatabase implementation.
LINZ provides an ArcGIS Python ArcToolbox download that can also be used as a command line tool.
- To run the function from within ArcGIS, version 10.1 or higher is required.
- To run it as a command line tool ArcGIS 10.0 or higher is required.
- If you wish to create relationships you need to have an ArcEditor product license.
Download the software
LDS Esri Tool at github
LDS ArcGIS Python ArcToolbox (ZIP 6.36 KB) - published 18 May 2018.
This download contains the lds_merge_property_data python script. The software is released under the terms of a BSD license. See the LICENSE file within the download for more information.
The tool will support merging and building relationships for any of the following datasets:
- NZ Primary Parcels
- NZ Primary Land Parcels
- NZ Primary Road Parcels
- NZ Primary Hydro Parcels
- NZ Non-Primary Parcels
- NZ Strata Parcels
- NZ Non-Primary Linear Parcels
- NZ Parcels
- NZ Linear Parcels
- NZ Parcel Statutory Actions List
- NZ Property Title Estates List
- NZ Property Titles List
- NZ Property Titles Owners List
- NZ Survey Affected Parcels List
- NZ Title Parcel Association List
- NZ Survey Plans
Below is a diagram showing the relationships that this software can create.
Before running the tool you must first get the data from the LDS.
1. Visit the LINZ Data Service and download layers and tables as a File Geodatabase export.
2. Next you need to unzip the download. It’s best to do this on a local disk for the best processing performance in later steps. This directory should have layout like the one below:
3. Once you have downloaded the LDS Esri Tools software (above), unzip the lds_merge_property_data.pyt file and save it to a local drive.
4. Browse to and then open the file in ArcCatalog. You will see that the ArcToolbox provides two tools which can be run separately or chained together into a batch operation. These tools are described below:
LDS merge property datasets
5. Run the LDS merge property datasets tool.
6. Browse to and select the directory of unzipped LDS File Geodatabases, each containing a single layer or table, as above.
7. Browse and select the destination File Geodatabase for the layers and tables to be imported into. This must be an existing database. If you require a new database click the “New File Geodatabase” from the browse folder dialog.
8. Click OK. Each layer and table in the directory will be imported into the destination File Geodatabase. Note: this may take up to an hour to process depending on your computer. For best performance make sure the File Geodatabase is located on your local disk.
LDS relationships builder for property datasets
The LDS relationships builder for property datasets tool can be used to create relationships between the property and ownership data for an already merged File Geodatabase. This tool takes the simple input of existing File Geodatabase. Note: If you wish to create relationships you need to have an ArcEditor product license.
9. Browse to and select the LDS File Geodatabases all of the layers and tables. (This was the output of the previous tool).
10. Click OK. The layer and table relationships will be added to the File Geodatabase. Note: this may take up to an hour to process depending on your computer. For best performance make sure the File Geodatabase is located on your local disk.
1. Download the LDS Esri Tools software unzip the lds_merge_property_data.pyt file and save it into any directory on you computer.
2. From that directory you can run the script from a command dialogue using the following syntax:
Usage: lds_merge_property_data.pyt [options] source_lds_dir destination_file_gdb
-h, --help show this help message and exit
-o, --overwrite overwrite destination FileGDB
-r, --relationships creates relationships between features class and tables
Unlike running the tools in ArcToolbox, if the destination File Geodatabase does not exist the script will automatically create a new one for you.
Below is an example which merges tables and layers into a single File Geodatabase, as well as create the relationships.
C:\Python26\ArcGIS10.0\python.exe lds_merge_property_data.pyt -r C:\Temp\working\data
In this case:
- C:\Python26\ArcGIS10.0\python.exe is the path to ArcGIS’s implementation of the python executable which will run the script
- C:\Temp\working\data is the directory where the LDS exported File Geodatabases have been unzipped to
- C:\Temp\working\lds_property.gdb is either a new or existing File Geodatabase which will contain the merged data and created relationships
- The “–r” option has been provided to build the relationships.
Note: this may take up to an hour to process depending on your computer. For best performance make sure the File Geodatabase is located on your local disk.
This is screenshot of ArcMap Feature Identify Tool in action using the File Geodatabase which has been processed by the lds_merge_property_data tool:
It shows the selected parcel polygon (Lot 2 DP 50792, Wellington) and the related tabular data which includes Statutory Actions, Survey Plans, Titles, Title Estates and Title Owners.
For any technical assistance please contact the LDS team at firstname.lastname@example.org
For any software fault please record an issue on the LDS Esri tools page on github.