PostGIS
Using PostGIS
To install PostGIS on a database, you have two options:
1. Use the PostGIS Extension installer.
2. Use the command line.
We will review both options below.
Using the AcuGIS Suite PostGIS Installer
Select the target database from the drop-down as shown below:
You must FIRST install PostGIS prior to installing any other of the listed extensions.
Tick the PostGIS select button and then click the Save button as show below:
Once PostGIS has been installed on a target database, you can then return to install additional extensions:
You can also un-install Extensions using above.
Using Command Line
To install via command line:
1. Connect to PostgreSQL
root@geohelm:~# su - postgres
postgres@geohelm:~$ psql
psql (9.6.3)
Type "help" for help.
postgres=#
2. If you have not created a database, create one now.
postgres=# create database geohelm;
CREATE DATABASE
postgres=#
3. Connect to your database.
postgres=# \c geohelm
You are now connected to database "geohelm" as user "postgres".
geohelm=#
4. Install the PostGIS extension.
geohelm=# create extension postgis;
CREATE EXTENSION
geohelm=#
Note: GeoHelm also includes fuzzy_match_string, tiger, postgis_topology.
3. Verify the installation via command line or the PostgreSQL Management Page:
geohelm=# \d
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | geography_columns | view | postgres
public | geometry_columns | view | postgres
public | raster_columns | view | postgres
public | raster_overviews | view | postgres
public | spatial_ref_sys | table | postgres
(5 rows)
Next: read the manual
or jump to component pages below.
Important
Be sure to also view the sections below: