This repository was archived by the owner on Nov 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
How to setup the data importing script
mbainrot edited this page Jul 12, 2014
·
9 revisions
In this document we will cover the initial setup of a basic environment required to fix minor issues with the upstream data from act art
- Internet connection
- Debian Wheezy (process can be ported by the the commands are based on Wheezy)
- Copy of the 1270.0.55.001 - Australian Statistical Geography Standard (ASGS): Volume 1 - Main Structure and Greater Capital City Statistical Areas, July 2011 -- Needs to be the State Suburbs ASGS ESRI Shapefile
- Perform the following
apt-get install postgresql-9.1-postgis
su postgis
createdb "postgis_template"
cd /usr/share/postgresql/9.1/contrib/postgis-1.5
psql -d postgis_template -f postgis.sql
psql -d postgis_template -f spartial_ref_sys.sql
createdb -T postgis_template abs_statesuburb
- nano /etc/postgresql/9.1/main/pg_hba.conf Locate line which has:
local all postgres user
And change it to
local all postgres trust
- Setup additional dependancies (NB: These dependencies can be setup inside of a python virtual environment)
apt-get install postgresql-server-dev-9.1
pip install psycopg2
su postgres shp2pgsql -s SRID /abs_state_suburbs/SSC_2011_AUST.shp > /abs_state_suburbs/temp.sql