Lizmap

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:

  1. Connect to PostgreSQL
1
2
3
4
5
6
root@geohelm:~# su - postgres
postgres@geohelm:~$ psql
psql (12.2 (Ubuntu 12.2-2.pgdg18.04+1))
Type "help" for help.

postgres=#
  1. If you have not created a database, create one now.
1
2
3
postgres=# create database geohelm;
CREATE DATABASE
postgres=#
  1. Connect to your database.
1
2
3
postgres=# \c geohelm
You are now connected to database "geohelm" as user "postgres".
geohelm=#
  1. Install the PostGIS extension.
1
2
3
geohelm=# create extension postgis;
CREATE EXTENSION
geohelm=#

Note: GeoHelm also includes fuzzy_match_string, tiger, postgis_topology.

  1. Verify the installation via command line or the PostgreSQL Management Page
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

Extensions Tool

To install using the PostGIS/PgRouting Extension installer, click on the Extensions tab as shown below.

maptools/lizmap/_static/postgis-tab.png
  1. Select the target database from the drop-down as shown below.
maptools/lizmap/_static/postgis-select-db.png

Note

You must FIRST install PostGIS prior to installing any other of the listed extensions.

  1. Tick the PostGIS select button and then click the Save button as show below:
maptools/lizmap/_static/postgis-enable.png
  1. Once PostGIS has been installed on a target database, you can then return to install additional extensions:
maptools/lizmap/_static/postgis-install-more.png

Note

You can also un-install Extensions using above.