Skip to content

Instantly share code, notes, and snippets.

@fcurella
Created July 27, 2012 15:22

Revisions

  1. fcurella revised this gist Oct 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion django_postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ Note: if you plan on running graphical apps with this python installation add ``

    Some geo dependencies:

    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x (see [ticket #16455](https://code.djangoproject.com/ticket/16455)). Also, PostGis 1.5 does not work with Postgres9.2, so we are going to install v. 9.0.8
    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x (see [ticket #16455](https://code.djangoproject.com/ticket/16455)). Also, PostGis 1.5 does not work with Postgres 9.2, so we are going to install v9.0.8

    $ brew tap homebrew/versions
    $ brew install postgis15
  2. fcurella revised this gist Oct 9, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions django_postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -7,16 +7,16 @@ Install a few things with homebrew:
    Notice that some packages give you information at the end, read it carefully. To recall that info use ``brew info`` like this: ``$ brew info postgresql``

    $ brew install python --universal
    $ brew install postgresql

    Note: if you plan on running graphical apps with this python installation add ``--framework`` as well.

    Some geo dependencies:

    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x (see [ticket #16455](https://code.djangoproject.com/ticket/16455))
    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x (see [ticket #16455](https://code.djangoproject.com/ticket/16455)). Also, PostGis 1.5 does not work with Postgres9.2, so we are going to install v. 9.0.8

    $ brew tap homebrew/versions
    $ brew install postgis15
    $ brew install postgresql9
    $ brew untap homebrew/versions
    $ brew install gdal geos

  3. fcurella revised this gist Sep 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion django_postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -33,4 +33,4 @@ Create a new db:
    Dump/Restore:

    $ pg_dump -Fc mydatabase > /tmp/mydatabase.db
    $ postgis_restore.pl /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql mydatabase /tmp/mydatabase.db
    $ postgis_restore.pl /usr/local/Cellar/postgis/1.5.3/share/postgis/postgis.sql mydatabase /tmp/mydatabase.db
  4. fcurella revised this gist Jul 27, 2012. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions django_postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    ## Django and Postgis on OS X

    (On MacOS)

    Install [Homebrew](http://wiki.github.com/mxcl/homebrew/)

    Install a few things with homebrew:
  5. fcurella renamed this gist Jul 27, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion postgis_on_os_x.md → django_postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## PostGis on OS X
    ## Django and Postgis on OS X

    (On MacOS)

  6. fcurella revised this gist Jul 27, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ Note: if you plan on running graphical apps with this python installation add ``

    Some geo dependencies:

    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x
    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x (see [ticket #16455](https://code.djangoproject.com/ticket/16455))

    $ brew tap homebrew/versions
    $ brew install postgis15
  7. fcurella revised this gist Jul 27, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,11 @@ Note: if you plan on running graphical apps with this python installation add ``

    Some geo dependencies:

    $ brew install postgis
    Django doesn't currently work with Postgis 2.x, so we have to install 1.5.x

    $ brew tap homebrew/versions
    $ brew install postgis15
    $ brew untap homebrew/versions
    $ brew install gdal geos

    Create the ``template_postgis`` template database
  8. fcurella revised this gist Jul 27, 2012. No changes.
  9. fcurella created this gist Jul 27, 2012.
    34 changes: 34 additions & 0 deletions postgis_on_os_x.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    ## PostGis on OS X

    (On MacOS)

    Install [Homebrew](http://wiki.github.com/mxcl/homebrew/)

    Install a few things with homebrew:

    Notice that some packages give you information at the end, read it carefully. To recall that info use ``brew info`` like this: ``$ brew info postgresql``

    $ brew install python --universal
    $ brew install postgresql

    Note: if you plan on running graphical apps with this python installation add ``--framework`` as well.

    Some geo dependencies:

    $ brew install postgis
    $ brew install gdal geos

    Create the ``template_postgis`` template database

    $ createdb template_postgis
    $ psql -f /usr/local/share/postgis/postgis.sql template_postgis
    $ psql -f /usr/local/share/postgis/spatial_ref_sys.sql template_postgis

    Create a new db:

    $ createdb -T template_postgis mydatabase

    Dump/Restore:

    $ pg_dump -Fc mydatabase > /tmp/mydatabase.db
    $ postgis_restore.pl /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql mydatabase /tmp/mydatabase.db