Ticket #1352 (closed defect: fixed)

Opened 2 years ago

Last modified 22 months ago

Mismatch between overwrite parameter in GCPManager and v.transform

Reported by: rangoy Owned by: martinl
Priority: minor Milestone: 6.4.2
Component: wxGUI Version: svn-releasebranch64
Keywords: georectify Cc: grass-dev@…
Platform: Unspecified CPU: Unspecified

Description

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'],

Change History

  Changed 2 years ago by martinl

  • status changed from new to assigned
  • cc grass-dev@… added
  • component changed from Default to wxGUI
  • owner changed from grass-dev@… to martinl
  • milestone set to 6.4.2
  • keywords georectify added

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

in reply to: ↑ description   Changed 2 years ago by glynn

Replying to 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".

  Changed 22 months ago by martinl

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.