[GIS] How to create template_postgis database

databasegeoserverpostgis

I wrote the following code to psql (Sql Shell)

createdb -T template_postgis nyc;

but does not work because syntax error .

trying to make an example of the links related aim GeoServer.
I have postgis 2.0 and postgresql 9.4

http://docs.geoserver.org/stable/en/user/gettingstarted/postgis-quickstart/index.html

Best Answer

Why aren't you just using?

CREATE EXTENSION postgis;

It's universal across all platforms for PostGIS 2.0+ unless your distro for some crazy reason did not include raster.

pgAdmin New extension drop down -- in extension section, shows extensions you have available you have not yet installed in your db.

enter image description here

Related Question