[GRASSLIST:352] Re: [GRASS5] grass and postgis

marcos boullón magán marcosboullon at gmail.com
Fri Mar 24 06:02:56 EST 2006


2006/3/24, Markus Neteler <neteler at itc.it>:
> marcos boullón magán wrote:
>
> >Does it mean that there will be no support to create new databases
> >from GRASS (not only new tables as now)?
> > [...]
> >And if functionality is in
> >progress but not finished, will it have PostGIS (out-of-the-box)
> >support?
> >
> >
> Please define out-of-the-box support first - in which sense?
> Eg. v.in.db manual page shows an example, since yesterday also the
> v.db.connect page and
> maybe others.
>

After creating a new PostgreSQL database in the server machine, I must
explicitly enable the PostGIS extensions by using a few commands:

(postgresql database creation)
$ createdb mygeodb

(enable plpgsql language processing in db)
$ createlang plpgsql mygeodb

(import spatial processing functions in plpgsql language, and
reference system descriptions)
$ psql -d mygeodb -f lwpostgis.sql
$ psql -d mygeodb -f spatial_ref_sys.sql

And I was wondering wheter database creation from GRASS issued
automatically these instructions to enable PostGIS extensions in a
transparent way for the user. I refered to this as "out-of-the-box
support for postgis"  (create new db and use it), maybe confussing
because GRASS has yet a good support to read/write tables in
(existing) PostGIS databases.

But such database setup are simply SQL statements and can be invoked
(easily?) on the new PostgreSQL database in a later step. My fault!
I've just realized this. Then my question is a nonsense, please forget
it, and I'm only replying for the record.

Regards,

M.

-- marcos boullón magán




More information about the grass-user mailing list