The Django docs say to use
createdb -T template_postgis geodjango
but I already have a database set up. While trying to find out what this actually does and a way to apply it to an existing database, I found this on postgis.net:
-- Enable PostGIS (includes raster) CREATE EXTENSION postgis; -- Enable Topology CREATE EXTENSION postgis_topology; -- fuzzy matching needed for Tiger CREATE EXTENSION fuzzystrmatch; -- Enable US Tiger Geocoder CREATE EXTENSION postgis_tiger_geocoder;
In trying to figure out what Tiger is, I found this in the postgis docs:
psql -d [yourdatabase] -c "CREATE EXTENSION postgis;" Topology is packaged as a separate extension and installable with command: psql -d [yourdatabase] -c "CREATE EXTENSION postgis_topology;"
How do I ready my current Django database for use with PostGIS and GeoDjango?
I'm using Django 1.8 and PostgreSQL 9.4.