[GRASS5] Feature-Request: Prompt for PostGIS-connection

Stephan Holl sholl at gmx.net
Thu Oct 2 05:55:35 EDT 2003

Hello Radim,

At Thu, 2 Oct 2003 11:25:11 +0200 Radim Blazek wrote:

> On Wednesday 01 October 2003 18:15, Stephan Holl wrote:
> > Dear Developers,
> >
> > during using PostGIS in GRASS5.7
> You are realy using PostGIS in GRASS, i.e. geometry in PostGIS, not
> only attributes in Postgres? Does it work well? Can you tell us for
> what kind of tasks? Server on the same computer or over the network.
> Last time we tried to use that, we found it so slow, that we had to
> switch to native format. 
Yes, I tried using PostGIS for storing geometry and attributes in
What I did:
	v.format -> set the correct values with password for postGIS.

	v.convert in=roads out=roads
it works well and importet the spearfish-roads from the old

In postGIS two tables were created: roads_geom and roads_cat
after that 
	d.vect roads 
was really slow, but....
* PostGIS-Server is not on the same maschine G57 is running, but  inside
a 10Mbit-LAN
* PostGIS-Server is 500Mhz-server
Maybe this is a bottleneck?

My purpose was to check, if thuban and/or mapserver can read
GRASS-imported PostGIS-data, but I failed, because geometry-type
LINESTRING is not (yet) supported by thuban.
I realised, that the geometry-column in roads_geom is only called
'geom', but imported data via shp2pgsql results in a geomtry-column
named 'the_geom'.
BTW, it would be nice to rename the 'geom'-column into 'the_geom' to use
postGIS-query's from mapserver more intuitively.

also no entry in the table geometry-columns was made... but maybe I had
not granted this table for update/insert by this postgres user to write
an entry...

> This problem needs systematic solution. Dbmi drivers are using a hack,
> if cannot connect to db, dialog is opened, and user asked for
> password. Example: db/drivers/postgres/db.c.
> Have you seen that? 

No, I have not seen that. I will give it a try.

> Try to put attributes to Postgres protected by
> password and query a vector. That works only for one connection,
> the main problem is, I think, where to store password during the
> session.

I am not familiar with programming such things, but what about creating
an encrypted ENV-variable?


Stephan Holl

GnuPG Key-ID: 11946A09

 11:36:25 up  2:31,  1 user,  load average: 0.00, 0.06, 0.10
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20031002/47d828d8/attachment.bin

More information about the grass-dev mailing list