[GRASS-dev] [GRASS GIS] #1352: Mismatch between overwrite parameter in GCPManager and v.transform

#1352: Mismatch between overwrite parameter in GCPManager and v.transform
-------------------------+--------------------------------------------------
Reporter: rangoy | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone:
Component: Default | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
It appears that commit [45931] introduces a mismatch in the overwrite
parameter in
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gcpmanager.py
(arround line 1395-1396)

v.transform still wants the overwrite flag to be written as "--o", but
this changeset removes one of the "-"s.

I don't know which of the modules are wrong, but I fixed it temporarily by
applying this patch;

{{{
Index: gui/wxpython/gui_modules/gcpmanager.py

--- gui/wxpython/gui_modules/gcpmanager.py (revisjon 46106)
+++ gui/wxpython/gui_modules/gcpmanager.py (arbeidskopi)
@@ -1392,7 +1392,7 @@
                  msg = err = ''

                  ret, out, err = gcmd.RunCommand('v.transform',
- flags = 'o',
+ flags = '-o',
                                                  input = vect,
                                                  output = self.outname,
                                                  pointsfile =
self.file['points'],

}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1352&gt;
GRASS GIS <http://grass.osgeo.org>

#1352: Mismatch between overwrite parameter in GCPManager and v.transform
-------------------------+--------------------------------------------------
Reporter: rangoy | Owner: martinl
     Type: defect | Status: assigned
Priority: minor | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: georectify | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by martinl):

  * status: new => assigned
* cc: grass-dev@… (added)
  * component: Default => wxGUI
  * owner: grass-dev@… => martinl
  * milestone: => 6.4.2
  * keywords: => georectify

Comment:

Hopefully fixed in r46107. Instead of `flags = '-o'` use `overwrite =
True`.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1352#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1352: Mismatch between overwrite parameter in GCPManager and v.transform
-------------------------+--------------------------------------------------
Reporter: rangoy | Owner: martinl
     Type: defect | Status: assigned
Priority: minor | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: georectify | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by glynn):

Replying to [ticket:1352 rangoy]:

> v.transform still wants the overwrite flag to be written as "--o", but
this changeset removes one of the "-"s.
>
> I don't know which of the modules are wrong, but I fixed it temporarily
by applying this patch;

The patch is incorrect; the flags= parameter should never contain a dash.
The patch only works as a side-effect of the naive way in which the flags=
parameter is currently handled.

The correct way to enable overwrite is to pass "overwrite = True".

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1352#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1352: Mismatch between overwrite parameter in GCPManager and v.transform
--------------------------+-------------------------------------------------
  Reporter: rangoy | Owner: martinl
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Resolution: fixed | Keywords: georectify
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1352#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>