[GRASS-dev] [GRASS GIS] #3466: v.to.db: check if column exists before running

GRASS GIS trac at osgeo.org
Wed Aug 29 13:25:55 PDT 2018


#3466: v.to.db: check if column exists before running
--------------------------+---------------------------------
  Reporter:  sbl          |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.6.0
 Component:  Vector       |    Version:  svn-releasebranch74
Resolution:               |   Keywords:  v.to.db,column
       CPU:  All          |   Platform:  All
--------------------------+---------------------------------

Comment (by mmetz):

 Replying to [comment:10 mlennert]:
 > Replying to [comment:9 mmetz]:
 > > Replying to [comment:8 veroandreo]:
 > > > Replying to [comment:6 pvanbosgeo]:
 > > > > +1 for creating columns if they don't exist (and the flag to
 determine if overwriting is OK) as default behavior
 > > > +1
 > > +1
 > >
 > > Just for clarification:
 > > * if the column(s) exist, require --overwrite
 > > * if the column(s) do not exist, create them with the appropriate type
 > >
 > > Additionally,
 > > * if the column(s) exist, check if the column type is correct
 >
 > So, you are suggesting no -c flag as in v.rast.stats ? Should that flag
 in v.rast.stats be deprecated in order to maintain coherence ?

 Yes. The reasoning is, if a column exists and a module writes values to
 that column, it will overwrite existing values in that column. Thus
 requiring the overwrite flag to overwrite existing values seems
 appropriate. The overwrite flag is not required if the module both creates
 the column and populates the column.

 Makes sense?

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



More information about the grass-dev mailing list