Postgres

How can I enable PostGIS?

You'll need to install Postgis:
1
sudo apt-get install postgis postgresql-13-postgis-3-scripts
Copied!
Then create the extension:
1
$ sudo su postgres
2
$ psql
3
psql (10.4 (Ubuntu 10.4-2.pgdg16.04+1), server 9.6.9)
4
Type "help" for help.
5
6
postgres=# CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;
7
CREATE EXTENSION
8
CREATE EXTENSION
9
postgres=# \q
Copied!
Last up, change your DATABASE_URL env var to start with postgis:// instead of postgresql://
Last modified 1yr ago
Copy link