[GRASS-user] v.db.connect -p

Patricio Toledo Peña (Casa) patricioantoniotoledo at gmail.com
Wed Jul 14 14:18:38 EDT 2010


Dear Markus

Thanks for the reply. I am aware of the -g option, i did not pretent to
change
the behaviour of -p or -g options in v.db.connect, i suppose that a new
option
which behaves like g.region -p could a nice solution (but no very
consistent) so
nobody is hurt with the proposed change.

Regards
Patricio


2010/7/14 Markus Neteler <neteler at osgeo.org>

> On Wed, Jul 14, 2010 at 6:19 AM, Patricio Toledo
> <patricioantoniotoledo at gmail.com> wrote:
> > 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.
>
> There is -g
>  -g   Print all map connection parameters and exit in shell script style
>        Format: layer[/layer name] table key database driver
> but it doesn't work as advertised (it is not shell script style!):
>
> v.db.connect -g map=streets_wake
> 1 streets_wake cat /home/neteler/grassdata/nc_spm_08/PERMANENT/dbf/ dbf
>
> even with fs="=" it makes a mess:
> v.db.connect -g map=streets_wake  fs="="
> 1=streets_wake=cat=/home/neteler/grassdata/nc_spm_08/PERMANENT/dbf/=dbf
>
> Essentially, the line breaks are missing.
> Should be a simple thing to fix.
>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100714/7d92c324/attachment.html


More information about the grass-user mailing list