A postgres/postgis script to create centroids for PSMA localities which are based on actual population concentration, rather than geometric centroids. Uses new open PSMA GNAF and PSMA Administrative Boundaries datasets. Assumes you are using the GNAF Loader and Cleaned Admin Boundaries
This process takes ~30-45 mins.
The cleaned localities are not well suited to data processing as they have been deliberately thinned to improve display performance.
A better dataset for processing is the admin_bdys.locality_bdy_analysis table that gets created in the gnaf-loader process
You can run the script to get the result or just download the data from here:
Incorporates or developed using Administrative Boundaries ©PSMA Australia Limited licensed by the Commonwealth of Australia under Creative Commons Attribution 4.0 International licence (CC BY 4.0).
- You will need to run the gnaf-loader script to load the required Admin Bdy tables into Postgres
- Postgres 9.x (tested on 9.3, 9.4 & 9.5 on Windows and 9.5 on OSX)
- PostGIS 2.1+
- Python 2.7 with Psycopg2 2.6
Trimming the boundaries to the coastline removes a small number of bay or estuary based localities. These have very few G-NAF addresses.