[GRASS-user] v.db.connect -p
Patricio Toledo
patricioantoniotoledo at gmail.com
Wed Jul 14 00:19:33 EDT 2010
Dear GRASS Developers
This is a petition:
Is it possible to add a option to v.db.connect (like g.region -p) so
the output will be somelike:
$ v.db.connect -p map=test layer=2
driver=dbf
database=/the/database
table=thetable
column=thecolumn
layer=2
i know -p actually does something very similar but this -p output is very useful
in g.region, so one can do inside a shell-script:
$eval `v.db.connect -p map=test`
to recover database connection parameters.
i have noticed that a couple of vector scripts are very sloppy regarding the
actual connection parameters, and no further checking is done, so the database
connection fails to a default value which is not always triavial. Other scripts
are very careful and use awk/gawk to parse database connection, but i think this
'eval' method is pretty useful and elegant.
Thanks in advance
Best regards
Patricio
More information about the grass-user
mailing list