[postgis-users] populating a table

Brent Wood pcreso at pcreso.com
Mon Mar 12 11:46:12 PDT 2007


--- Malm Paul <paul.malm at saabgroup.com> wrote:

> Yes it is a new database, I can also see that the AddGeometryColumn has
> a green underscore in the SQL window in pgadmin: SELECT
> AddGeometryColumn('public','h1707640_cul_transl','the_geom','-1','MULTIL
> INESTRING',2);
> 
> I have not seen any error messages when I created the database but I've
> not explicit loaded any functions as  AddGeometryColumn. Do you know how
> I do this or where to read about it?

It sounds like you created a Postgres database, but never added PostGIS.

In the postgis contribs directory there are two SQL scripts you need to run,
and prior to runnng these you need to loade the appropriate language into the
database. 

See the docs at http://postgis.refractions.net/docs/ch02.html#PGInstall


Or briefly (where <db> is the name of your database):

createlang -d <db> plpgsql

and in the PostGIS contribs directory, you can run:
psql -d <db> -f lwpostgis.sql

I also recommend you install the full set of EPSG projection info, using:
psql -d <db> -f spatial_ref_sys.sql


Cheers,

  Brent Wood



More information about the postgis-users mailing list