New Zealand Countrywide Data
Land Information New Zealand (LINZ) provides downloadable address data from its data service website at https://data.linz.govt.nz. The file requires a user account to retrieve, so it must be cached using this script.
More information at https://data.linz.govt.nz/layer/779-nz-street-address-electoral/
lds-nz.sh contains a script for caching LDS data. You will need to provide
a copy of Street Address (Electoral) data, which can be downloaded from
Land Information New Zealand’s website. See Getting Data below.
Dockerfile contains a Docker process for caching data. Docker allows for code
execution in a controlled environment. On Ubuntu, Docker can be installed with
apt-get install docker.io.
# prepare a temporary work directory for Docker mkdir /tmp/work chgrp docker /tmp/work chmod ugo+rwxt /tmp/work cp lds-nz-street-address-electoral-SHP.zip /tmp/work/ # build docker image from cache curl http://data.openaddresses.io/cache/nz/nz-docker-6f346f299.tar.bz2 | bzcat | docker load # image can alternatively be built the slow way docker build -t nz-lds . # run cache, leaving data in work directory docker run --volume /tmp/work:/work nz-lds /usr/local/bin/run-cache # upload contents of cache directory to S3 aws s3 sync --acl public-read /tmp/work/cache s3://data.openaddresses.io/cache
Accept the terms of service and create a download. You will be asked to create an account on the website with your email address:
Wait for the downloaded to be created; appears to take ~5 minutes:
Download the 91MB address shapefile,