Skip to main content

Geocoding via LINZ address matching

Project description

This package implements methods for performing entity matching on unstructured NZ addresses to the LINZ street address database for free offline geocoding. This package does not support PO boxes or international addresses.

Usage:

from glam.interface import Geocoder

data_dir = 'data' # Location of glam data dependencies. should include data/nz-street-address.csv
gc = Geocoder(data_dir)

addresses = [
  'level 10, 10 customhouse quay, wellington central',
  'third floor 18 viaduct harbour ave auckland',
]

gc.geocode_addresses(addresses)

Output:

[{'address_number': '10',
  'full_road_name_ascii': 'Customhouse Quay',
  'suburb_locality_ascii': 'Wellington Central',
  'town_city_ascii': 'Wellington',
  'postcode': '6011',
  'shape_X': '174.7784009',
  'shape_Y': '-41.28219255',
  'match_score': 100.0},
{'address_number': '18',
  'full_road_name_ascii': 'Viaduct Harbour Avenue',
  'suburb_locality_ascii': 'Auckland Central',
  'town_city_ascii': 'Auckland',
  'postcode': '1010',
  'shape_X': '174.7577686',
  'shape_Y': '-36.8453608833',
  'match_score': 100.0}]

Dependencies

  • Default models are packaged with the Python wheel.

  • Tensorflow is required but not automatically installed to remain OS agnostic

  • Data dependencies will be built from the raw LINZ and PNF files the first time using the geocoder (may be slow).

    • Raw LINZ dataset can be downloaded from nz-street-address

    • PNF file is available for purchase from NZ Post PNF (optional, but postcodes will not be available without the PNF file. And it may also improve geocoding efficiency)

Author:

Liam Morris

Email:

liam.morris04@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GLAM-0.3.7.tar.gz (8.7 MB view hashes)

Uploaded Source

Built Distribution

GLAM-0.3.7-py3-none-any.whl (8.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page