Archive for August, 2010

While I generally find ABC’s election coverage excellent, their live graphs on TV on Saturday night were a little… strange. Judge for yourself:

Photograph of television presenter Leigh Sales in front of a ridiculously unproportional column graph.

Graph fail

Advertisements
  1. Create folder “C:\UserData\markhamf\pgsql” to hold database files
  2. Extract postgresql binaries from http://www.enterprisedb.com/products/pgbindownload.do to c:\bin\pgsql
  3. In a cmd.exe console:
    1. Change to install dir: cd c:\bin\pgsql\bin
    2. Create new database under user markhamf: initdb.exe -D C:\UserData\markhamf\pgsql
    3. Start db server under local user account: pg_ctl start -D C:\UserData\markhamf\pgsql
    4. Install PL/pgsql language into default template: createlang plpgsql template1
    5. Create PostGIS enabled template: createdb postgistemplate
  4. Download PostGIS from http://postgis.refractions.net/download/windows/pg84/postgis-pg84-binaries-1.5.1.zip Extract binaries into the existing postgresql directory structure at C:\bin\pgsql
  5. Return to cmd.exe console in c:\bin\pgsql\bin:
    1. Install PostGIS functions into postgis template:
      psql -d postgistemplate -f ..\share\contrib\postgis-1.5\postgis.sql
      psql -d postgistemplate -f ..\share\contrib\postgis-1.5\spatial_ref_sys.sql
      psql -d postgistemplate -f ..\share\contrib\postgis-1.5\postgis_comments.sql
    2. Test install was correct: psql -d postgistemplate -c "SELECT postgis_full_version();"
    3. Create a spatially enabled database from the template: createdb -T postgistemplate gisdb
  6. Test connection with pgAdmin3, and verify that you can connect, and that gisdb is visible. Use the following parameters for a new connection (leave others as default):
    Name: gisdb
    Host: localhost
    Username: markhamf
  7. Add Start Menu shortcuts for:
    C:\bin\pgsql\bin\pgAdmin3.exe
    C:\bin\pgsql\bin\pg_ctl.exe start -D C:\UserData\markhamf\pgsql
  8. Optionally, addC:\bin\pgsql\bin to the Path environmental variable