[GRASS-dev] [GRASS GIS] #3149: Adding database information to v.info metadata output

GRASS GIS trac at osgeo.org
Sun Sep 11 12:43:13 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 mmetz):

 Replying to [comment:5 huhabla]:
 > Replying to [comment:4 mlennert]:
 > > Replying to [comment:3 huhabla]:
 > >
 > > >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.

 The output of v.db.connect -g prints all connections for all layers,
 therefore the typical key=value approach does not work well, instead you
 need to tokenize each output line. Also, the python grass script library
 uses the output of v.db.connect -g e.g. in vector_db which works just
 fine, also for multiple connections.

 >
 > 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. ;)

 Please make sure that your patch for v.info only prints connection
 parameters if a single, valid layer is selected because your approach can
 not handle multiple connections.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3149#comment:8>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list