PostGIS¶
Table of Contents
Installing PostGIS¶
PostGIS can be enabled on your PostgreSQL database via the Extension tab or via Command Line.
Command Line¶
To install via command line:
- Connect to PostgreSQL
root@postgis:~# su - postgres
postgres@postgis:~$ psql
psql (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
Type "help" for help.
postgres=#
- Connect to target database.
postgres=# \c demodb
You are now connected to database "demodb" as user "postgres".
demodb=#
- Install the PostGIS extension.
demodb=# create extension postgis;
CREATE EXTENSION
demodb=#
You can install includes fuzzy_match_string, tiger, postgis_topology, postgis_raster using above.
- Verify the installation via command line or the PostgreSQL Management Page
demodb=# \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)
Extensions Tool¶
To install using the PostGIS/PgRouting Extension installer, click on the Extensions tab as shown below.

- Select the target database from the drop-down as shown below.

Note
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:

Note
You can also un-install Extensions using above.