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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 9 06:49:58 PDT 2017


Author: ychemin
Date: 2017-05-09 06:49:58 -0700 (Tue, 09 May 2017)
New Revision: 71073

Modified:
   grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py
Log:
Create REF_POINTS file for i.image.2target module

Modified: grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py
===================================================================
--- grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py	2017-05-09 13:22:29 UTC (rev 71072)
+++ grass/trunk/gui/wxpython/iphoto2image/ip2i_manager.py	2017-05-09 13:49:58 UTC (rev 71073)
@@ -341,6 +341,12 @@
                                    self.xymapset,
                                    'camera',
                                    self.camera),
+            'ref_points': os.path.join(self.grassdatabase,
+                                   self.xylocation,
+                                   self.xymapset,
+                                   'group',
+                                   self.xygroup,
+                                   'REF_POINTS'),
             'points': os.path.join(self.grassdatabase,
                                    self.xylocation,
                                    self.xymapset,
@@ -370,6 +376,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'])
+            shutil.copy(self.file['points'], self.file['ref_points'])
             GMessage (_("A POINTS file exists, renaming it to POINTS_BAK"))
 
         #"""Make a POINTS file """
@@ -844,6 +851,7 @@
         # if event != None save also to backup file
         if event:
             shutil.copy(self.file['points'], self.file['points_bak'])
+            shutil.copy(self.file['points'], self.file['ref_points'])
             self._giface.WriteLog(
                 _('POINTS file saved for group <%s>') %
                 self.xygroup)
@@ -1117,6 +1125,7 @@
                 # restore POINTS file from backup
                 if os.path.exists(self.file['points_bak']):
                     shutil.copy(self.file['points_bak'], self.file['points'])
+                    shutil.copy(self.file['points_bak'], self.file['ref_points'])
 
             if os.path.exists(self.file['points_bak']):
                 os.unlink(self.file['points_bak'])



More information about the grass-commit mailing list