Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gearbox/f6a32b3b0d358389ca019a11c7b48dfb to your computer and use it in GitHub Desktop.
Save gearbox/f6a32b3b0d358389ca019a11c7b48dfb to your computer and use it in GitHub Desktop.
Setup Postgres.app to use PostGIS on OS X

Download and Install Postgres.app

Before we can setup PostGIS we need to have a local version of Postgresql installed and running. The most effecient way to do this is to download and install Postgres.app.

Spatially Enable your Postgres Database

Once Postgres.app is installed in your computers /Applications directory. Open the Terminal and enter the following two commands

psql -d DATABASE_NAME -f /Applications/Postgres.app/Contents/Versions/9.3/share/postgresql/contrib/postgis-2.1/postgis.sql

psql -d DATABASE_NAME -f /Applications/Postgres.app/Contents/Versions/9.3/share/postgresql/contrib/postgis-2.1/spatial_ref_sys.sql

Notes

Remember, this must be done on a database by database scale and this example does not accomodate multiple databases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment