Skip to end of metadata
Go to start of metadata

Prerequisites

  • A PostgreSQL server 8.3 or above is required.
  • The PostGIS extension must be installed on the server.
  • An administration tools like pgAdmin on some client machine is recommended.

The database can be installed in two ways: automatic (through a Graphical User Interface) or manual installation. The recommended way is the Graphical User Interface. See Installing the Coverage-SQL database for information about automatic installation.

Manual installation

If the automatic installation can not be used, then the installation can be performed manually. The following script files are needed:

File

Location

prepare.sql

This postgrid installation directory

postgis.sql

PostGIS installation directory

spatial_ref_sys.sql

PostGIS installation directory

postgis-update.sql

This postgrid installation directory

metadata-create

Create the database structure for metadata

coverages-create

Create the database structure for coverages

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 coverages-create.sql scripts.
  3. Open postgis.sql (from your PostGIS installation directory) in a SQL editor and add the following line at the beginning 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 metadata-create.sql and coverages-create.sql. It should creates the minimal set of tables for running PostGrid.
  7. 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 :
Labels: