[GRASS-SVN] r70743 - grass/trunk/gui/wxpython/iphoto2image

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 11 03:13:12 PST 2017


Author: ychemin
Date: 2017-03-11 03:13:12 -0800 (Sat, 11 Mar 2017)
New Revision: 70743

Modified:
   grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py
Log:
Module adds output file to the group for use in the next i.ortho.photo module

Modified: grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py
===================================================================
--- grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py	2017-03-11 06:31:12 UTC (rev 70742)
+++ grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py	2017-03-11 11:13:12 UTC (rev 70743)
@@ -370,7 +370,7 @@
         # make a backup of the current points file if exists
         if os.path.exists(self.file['points']):
             shutil.copy(self.file['points'], self.file['points_bak'])
-            GMessage (_("An POINTS file exists, renaming it to POINTS_BAK"))
+            GMessage (_("A POINTS file exists, renaming it to POINTS_BAK"))
 
         #"""Make a POINTS file """
         import re,sys
@@ -993,7 +993,7 @@
 
     def OnGeorect(self, event):
         """
-        Georectifies map(s) in group using i.rectify or v.transform
+        Georectifies map(s) in group using i.rectify
         """
         global maptype
         self.SaveGCPs(None)
@@ -1027,8 +1027,29 @@
 
             # provide feedback on failure
             if ret != 0:
+                print >> sys.stderr, 'ip2i: Error in i.rectify'
+                print >> sys.stderr, self.grwiz.src_map
                 print >> sys.stderr, msg
 
+            busy = wx.BusyInfo(message=_("Writing output image to group, please wait..."),
+                               parent=self)
+            wx.Yield()
+
+            ret1, msg1 = RunCommand('i.group',
+                                  parent=self,
+                                  getErrorMsg=True,
+                                  quiet=False,
+                                  group=self.xygroup,
+                                  input=''.join([self.grwiz.src_map.split('@')[0],self.extension]))
+
+            busy.Destroy()
+
+            if ret1 != 0:
+                print >> sys.stderr, 'ip2i: Error in i.group'
+                print >> sys.stderr, self.grwiz.src_map.split('@')[0]
+                print >> sys.stderr, self.extension
+                print >> sys.stderr, msg1
+
         self.grwiz.SwitchEnv('target')
 
     def OnGeorectDone(self, **kargs):



More information about the grass-commit mailing list