[GRASS-SVN] r62521 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 1 11:35:52 PDT 2014
Author: annakrat
Date: 2014-11-01 11:35:52 -0700 (Sat, 01 Nov 2014)
New Revision: 62521
Modified:
grass/trunk/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
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2014-11-01 17:03:49 UTC (rev 62520)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2014-11-01 18:35:52 UTC (rev 62521)
@@ -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,
- name=[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