Skip to content

Instantly share code, notes, and snippets.

@srt32
Last active July 18, 2021 23:43

Revisions

  1. srt32 revised this gist Apr 24, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ you probably don’t have the extension installed correctly.

    -- Enable Topology

    $ CREATE EXTENSION postgis_topology;
    $ CREATE EXTENSION postgis_topology;

    -- fuzzy matching needed for Tiger

  2. srt32 revised this gist Apr 24, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -12,11 +12,12 @@ You just need to add the extensions, Homebrew users can just run `brew install p

    * Drop into your database

    $ psql oneblock_development
    psql oneblock_development

    * Run the following commands to add the extensions.

    -- Enable PostGIS (includes raster)

    $ CREATE EXTENSION postgis;

    If you get:
    @@ -27,12 +28,15 @@ ERROR: 58P01: could not open extension control file "/usr/local/Cellar/postgres
    you probably don’t have the extension installed correctly.

    -- Enable Topology

    $ CREATE EXTENSION postgis_topology;

    -- fuzzy matching needed for Tiger

    $ CREATE EXTENSION fuzzystrmatch;

    -- Enable US Tiger Geocoder

    $ CREATE EXTENSION postgis_tiger_geocoder;

    Confirm that it worked:
  3. srt32 revised this gist Apr 24, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@ The most reliable way to get PostGIS on OSX is to download and install Postgres.
    You just need to add the extensions, Homebrew users can just run `brew install postgis`

    * Drop into your database

    $ psql oneblock_development

    * Run the following commands to add the extensions.
  4. srt32 created this gist Apr 24, 2014.
    41 changes: 41 additions & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    # Installing the Postgres PostGIS extension on OSX

    For reference: http://postgis.net/install

    ### If you don’t already have PG installed

    The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.

    ### If you already have PG installed

    You just need to add the extensions, Homebrew users can just run `brew install postgis`

    * Drop into your database
    $ psql oneblock_development

    * Run the following commands to add the extensions.

    -- Enable PostGIS (includes raster)
    $ CREATE EXTENSION postgis;

    If you get:

    ```
    ERROR: 58P01: could not open extension control file "/usr/local/Cellar/postgresql/9.3.4/share/postgresql/extension/postgis.control": No such file or directory
    ```
    you probably don’t have the extension installed correctly.

    -- Enable Topology
    $ CREATE EXTENSION postgis_topology;

    -- fuzzy matching needed for Tiger
    $ CREATE EXTENSION fuzzystrmatch;

    -- Enable US Tiger Geocoder
    $ CREATE EXTENSION postgis_tiger_geocoder;

    Confirm that it worked:

    $ SELECT POSTGIS_FULL_VERSION();

    You should see a message including `postgis_full_version` followed by a version number and some other info.