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

2018-11-27 Thread GRASS GIS
#3466: v.to.db: check if column exists before running
--+-
  Reporter:  sbl  |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  closed
  Priority:  normal   |  Milestone:  7.6.0
 Component:  Vector   |Version:  svn-releasebranch74
Resolution:  fixed|   Keywords:  v.to.db,column
   CPU:  All  |   Platform:  All
--+-
Changes (by mlennert):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Closing this ticket as this enhancement has been applied to trunk and 7.6
 release.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-09-03 Thread GRASS GIS
#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):

 In [changeset:"73237" 73237]:
 {{{
 #!CommitTicketReference repository="" revision="73237"
 v.to.db: check if column(s) exist before updating, includes check for
 correct column type, create column(s) of not existing, see #3466 (backport
 trunk r73236)
 }}}

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-09-03 Thread GRASS GIS
#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):

 In [changeset:"73236" 73236]:
 {{{
 #!CommitTicketReference repository="" revision="73236"
 v.to.db: check if column(s) exist before updating, includes check for
 correct column type, create column(s) of not existing, see #3466
 }}}

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-29 Thread GRASS GIS
#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: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-29 Thread GRASS GIS
#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 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 ?

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-28 Thread GRASS GIS
#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: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

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-28 Thread GRASS GIS
#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 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

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-27 Thread GRASS GIS
#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 mlennert):

 Replying to [comment:5 mlennert]:
 > While we are discussing this: couldn't the module just create the
 columns if they don't exist, yet ?
 >
 > I think this should be the default behavior of all modules writing
 output into DB columns. Possibly with a flag to determine if overwriting
 an existing column is ok.

 See the -c flag in v.rast.stats.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-27 Thread GRASS GIS
#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 pvanbosgeo):

 +1 for creating columns if they don't exist (and the flag to determine if
 overwriting is OK) as default behavior

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-27 Thread GRASS GIS
#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 mlennert):

 While we are discussing this: couldn't the module just create the columns
 if they don't exist, yet ?

 I think this should be the default behavior of all modules writing output
 into DB columns. Possibly with a flag to determine if overwriting an
 existing column is ok.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-26 Thread GRASS GIS
#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 neteler):

 Source code to be reused is here (loop over column names):

 https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.distance/main.c#L524

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2018-08-22 Thread GRASS GIS
#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
--+-
Changes (by mmetz):

 * type:  defect => enhancement


Comment:

 Changing to enhancement because the result is not incorrect if the
 column(s) don't exist. The requested check if the columns to be updated
 exist will not change the result.

-- 
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2017-12-11 Thread GRASS GIS
#3466: v.to.db: check if column exists before running
-+-
  Reporter:  sbl |  Owner:  grass-dev@…
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  7.5.0
 Component:  Vector  |Version:  svn-releasebranch74
Resolution:  |   Keywords:  v.to.db,column
   CPU:  All |   Platform:  All
-+-
Changes (by sbl):

 * version:  unspecified => svn-releasebranch74


--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

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

2017-12-11 Thread GRASS GIS
#3466: v.to.db: check if column exists before running
+-
 Reporter:  sbl |  Owner:  grass-dev@…
 Type:  defect  | Status:  new
 Priority:  normal  |  Milestone:  7.5.0
Component:  Vector  |Version:  unspecified
 Keywords:  v.to.db,column  |CPU:  All
 Platform:  All |
+-
 When updating a vector attribute column with v.to.db, the module does not
 check if the column to be updated exists.

 It starts anyway, and the user gets lots of error messages like the
 following:

 {{{
 DBMI-SQLite driver error:
 Error in sqlite3_prepare():
 no such column: length
 }}}


 Would be convenient if v.to.db would check if columns exist and fails with
 respective error message if not.

--
Ticket URL: 
GRASS GIS 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev