Pages

Thursday 13 August 2009

PostGIS OSX

The PostGIS experience on mac is a very slick and slippery slope.

First of all the Installers are very Slick

There are a series of nice mac installers that have been bundled up by William Kyngesburye.

And the installers are very good about beeping at you and asking you to install GDAL and PROJ prior to postgis.

And then the slippery ...

The installer don't provide much guidance on where things went ... I am used to having a postgis_template created for me by the windows installers. And all my notes are based on creating new database using that as a safe starting place.

Here were the steps needed to create my own postgis_template:
1) cd /usr/local/pgsql/bin (and then use ./ to get it to pick up the commands)
2) ./createlang plpgsql template_postgis -U postgres
3) ./psql -U postgres -f /usr/local/pgsql/share/lwpostgis.sql template_postgis
4) ./psql -U postgres -f /usr/local/pgsql/share/spatial_ref_sys.sql template_postgis

Other then that pgAdmin looks quite happy.

3 comments:

Michael Bedward said...

Thanks Jody. I found I also had to do this on my mac...

sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216

Otherwise initdb fails.

Jody Garnett said...

For PostGIS 1.5 things moved around a bit:
- /usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql
- /usr/local/pgsql/share/contrib/postgis-1.5/spatial_ref_sys.sql

Micheal what do the sysctl calls do?

Anonymous said...

The Best Slots | Casino Roll
The best 출장안마 slots https://octcasino.com/ at Casino Roll. If you love table casinosites.one games, to play wooricasinos.info blackjack, you have to bet twice for the dealer to 바카라 사이트 win. The dealer must