Creating a Postgis Template

$ createdb -E UTF8 -T template0 template_postgis

$ psql -d template_postgis -c "CREATE EXTENSION postgis;"
$ psql -d template_postgis -c "CREATE EXTENSION postgis_topology;"

$ psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
$ psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
$ psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC ...
more ...