[GRASS-SVN] r62522 - in grass/branches/releasebranch_7_0: . gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 1 11:42:22 PDT 2014


Author: annakrat
Date: 2014-11-01 11:42:22 -0700 (Sat, 01 Nov 2014)
New Revision: 62522

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/frame.py
Log:
d.to.rast: use r.in.gdal instead of r.in.png in case r.in.png is removed (merge from trunk, r62521)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:62487,62491,62494,62506,62508-62509,62515,62519
   + /grass/trunk:62487,62491,62494,62506,62508-62509,62515,62519,62521

Modified: grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/frame.py	2014-11-01 18:35:52 UTC (rev 62521)
+++ grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/frame.py	2014-11-01 18:42:22 UTC (rev 62522)
@@ -674,27 +674,27 @@
         dOutFileCmd = ['d.out.file', 'output=' + pngFile, 'format=png']
         self.DOutFile(dOutFileCmd)
         # import back as red, green, blue rasters
-        returncode, messages = RunCommand('r.in.png', input=pngFile, output=tmpName,
+        returncode, messages = RunCommand('r.in.gdal', flags='o', input=pngFile, output=tmpName,
                                           quiet=True, overwrite=overwrite, getErrorMsg=True)
         if not returncode == 0:
             self._giface.WriteError(_('Failed to run d.to.rast:\n') + messages)
             return
         # set region for composite
         grass.use_temp_region()
-        returncode, messages = RunCommand('g.region', rast=tmpName + '.r',
+        returncode, messages = RunCommand('g.region', rast=tmpName + '.red',
                                           quiet=True, getErrorMsg=True)
         if not returncode == 0:
             grass.del_temp_region()
             self._giface.WriteError(_('Failed to run d.to.rast:\n') + messages)
             return
         # composite
-        returncode, messages = RunCommand('r.composite', red=tmpName + '.r',
-                                          green=tmpName + '.g', blue=tmpName + '.b',
+        returncode, messages = RunCommand('r.composite', red=tmpName + '.red',
+                                          green=tmpName + '.green', blue=tmpName + '.blue',
                                           output=outputRaster, quiet=True,
                                           overwrite=overwrite, getErrorMsg=True)
         grass.del_temp_region()
         RunCommand('g.remove', type='rast', flags='f', quiet=True,
-                   names=[tmpName + '.r', tmpName + '.g', tmpName + '.b'])
+                   name=[tmpName + '.red', tmpName + '.green', tmpName + '.blue'])
         if not returncode == 0:
             self._giface.WriteError(_('Failed to run d.to.rast:\n') + messages)
             grass.try_remove(pngFile)



More information about the grass-commit mailing list