[GRASS-dev] [GRASS GIS] #2576: db.columns cannot find table created by v.overlay

GRASS GIS trac at osgeo.org
Tue Feb 3 04:25:58 PST 2015


#2576: db.columns cannot find table created by v.overlay
-------------------------+--------------------------------------------------
 Reporter:  pertusus     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  minor        |   Milestone:  7.0.0                    
Component:  Vector       |     Version:  svn-releasebranch70      
 Keywords:               |    Platform:  Linux                    
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
Changes (by pertusus):

  * priority:  normal => minor


Comment:

 Ok, I see.  I think that the documentation should reflect that, it seems
 to me to be non intuitive.  At least it should be mentioned that the table
 name could be different from the vector name and that v.db.connect -g may
 be used to get the table name.

 Here is some code I propose that could also (or a variation of) be in the
 documentation to show how to rename the table such that it has the same
 name as the vector.  It works on 6.4.4, with the difference that
 v.db.connect separator= is fs=.  It requires cut, hopefully using only
 POSIX semantics.

 {{{
 table_info=`v.db.connect -g test_or separator="|"`
 table_name=`echo $table_info | cut -d '|' -f 2`
 key_name=`echo $table_info | cut -d '|' -f 3`

 if test $table_name != test_or; then
   v.db.connect map=test_or -d
   db.copy from_table=$table_name to_table=test_or
   v.db.connect map=test_or table=test_or key=$key_name
 fi
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2576#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list