[GRASS-dev] [GRASS GIS] #3149: Adding database information to v.info metadata output
GRASS GIS
trac at osgeo.org
Sun Sep 11 03:39:09 PDT 2016
#3149: Adding database information to v.info metadata output
--------------------------+----------------------------------
Reporter: huhabla | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.2.0
Component: Default | Version: svn-releasebranch72
Resolution: | Keywords: vector, info, v.info
CPU: Unspecified | Platform: Unspecified
--------------------------+----------------------------------
Comment (by huhabla):
Replying to [comment:4 mlennert]:
> Replying to [comment:3 huhabla]:
> > Replying to [comment:2 mlennert]:
> > > Why do you need this in v.info and what's wrong with v.db.connect -p
?
> >
> > Why is this information not present in v.info? Why do we need a second
command to get this information about a vector map?
>
> Because it's module that manages that setting that provides the info, as
with other modules (e.g. v.category).
Exactly, it manages the database connection and should also display the
connection parameter.
>
>
> >The output of v.db.connect -g is not well
> >designed for parsing, neither for bash
> >nor for the python-grass-script library.
>
> Then let us improve that :-)
I guess there was a specific reason behind the implementation of the "-g"
flag in v.db.connect in the way it is. I fear to break existing
functionality when modifying v.db.connect "-g" flag output.
Since we do not have enough module tests, it would be hard to figure out
what will break in existing modules, in examples and documented work flows
and even more harder to figure out if extensions will break.
>
> Just to be clear: this is not a -1 to your idea. I just want to make
sure we think about it. In general, I'm wary of introducing the same
functionality in two different modules. IMHO, it creates the risk of
feature bloat and of confusion for the users.
IMHO the database connection is vector map metadata that should be
available within v.info, so the user does not have to search for another
module to get this information. The default settings of vector layer
database management usually does not require the user to use v.db.connect,
hence its capabilities is mostly unknown to the user.
I think the less invasive solution is to modify v.info, especially since i
have already implemented 6 tests to verify the functionality. ;)
BTW, v.info is an integral part of the gunittest validation approach,
hence the more metadata information about a vector map is available via
v.info, the easier it is to implement tests.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3149#comment:5>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list