Added by Cédric Briançon, last edited by Cédric Briançon on Nov 17, 2008  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
Prerequisites

A PostgreSQL server 8.1 or above is needed. The PostGIS extension must be installed on the server. An administration tools like pgAdmin on some client machine is recommended. The following script files are needed:

File Location
prepare.sql This postgrid installation directory
lwpostgis.sql
PostGIS installation directory
spatial_ref_sys.sql PostGIS installation directory
postgis-update.sql This postgrid installation directory
postgrid.sql This postgrid installation directory
postgrid-model.sql
This postgrid installation directory
postgrid-comments.sql
This postgrid installation directory
Steps
  1. Create an empty database. Any name can fit. For example "Coverages". Specify UTF8 as the encoding character.
  2. Run prepare.sql for the database created at step 1. Note that this script will creates "geoadmin" and "geouser" roles. If those roles already exist, remove the "CREATE ROLE" statements. If different role names are wanted, search and replace every occurrences of "geoadmin" and "geouser" in prepare.sql, postgis-update.sql and postgrid.sql scripts.
  3. Open lwpostgis.sql (from your PostGIS installation directory) in a SQL editor and add the following line at the begining of the script: SET search_path = postgis, pg_catalog; Then run the script. The PostGIS tables and functions should be created in the "postgis" schema instead of the default "public" one.
  4. Open spatial_ref_sys.sql (from your PostGIS installation directory) in a SQL editor and add the same line than at the previous step. Then run the script.
  5. Run postgis-update.sql. It will adds some vertical coordinate reference systems to the "spatial_ref_sys" table.
  6. Run postgrid.sql. It should creates the minimal set of tables for running PostGrid.
  7. Run postgrid-comments.sql. It should creates a few additional columns and tables for commenting elements like layers, formats, etc. PostGrid itself doesn't use those comments.
  8. Run postgrid-model.sql. It should creates some additional tables for creating new coverages from linear models.
  9. To finish with, add the variable search_path with values "public, postgis, postgrid".
    It can be done by executing the following line in a PostgreSQL client like pgAdmin or psql, supposing the database name is Coverages :
    ALTER DATABASE "Coverages" SET search_path=public, postgis, postgrid;