How do I set up a PostgreSQL database for use with PostGIS and GeoDjango?

المشرف العام

Administrator
طاقم الإدارة
The Django docs say to use

createdb -T template_postgis geodjangobut 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 TopologyCREATE EXTENSION postgis_topology;-- fuzzy matching needed for TigerCREATE EXTENSION fuzzystrmatch;-- Enable US Tiger GeocoderCREATE 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.



أكثر...
 
أعلى