[GRASS-SVN] r30340 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 24 18:31:57 EST 2008


Author: martinl
Date: 2008-02-24 18:31:57 -0500 (Sun, 24 Feb 2008)
New Revision: 30340

Modified:
   grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI: using gcmd.Command for g.pnmcomp doesn't not work for single map layers, back to os.system

Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2008-02-24 22:54:42 UTC (rev 30339)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2008-02-24 23:31:57 UTC (rev 30340)
@@ -606,15 +606,23 @@
             Debug.msg (3, "Map.Render() type=%s, layer=%s " % (layer.type, layer.name))
 
         # compose command
-        compcmd = ["g.pnmcomp",
-                   "in=%s" % ",".join(maps),
-                   "mask=%s" % ",".join(masks),
-                   "opacity=%s" % repr(",".join(opacities)),
-                   "background=255:255:255",
-                   "width=%s" % str(self.width),
-                   "height=%s" % str(self.height),
-                   "output=%s" % self.mapfile]
+        #         compcmd = ["g.pnmcomp",
+        #                    "in='%s'" % ",".join(maps),
+        #                    "mask=%s" % ",".join(masks),
+        #                    "opacity=%s" % ",".join(opacities),
+        #                    "background=255:255:255",
+        #                    "width=%s" % str(self.width),
+        #                    "height=%s" % str(self.height),
+        #                    "output=%s" % self.mapfile]
         
+        compcmd = "g.pnmcomp in='" + ",".join(maps) + \
+            "' mask='" + ",".join(masks) + \
+            "' opacity=" + ",".join(opacities)+ \
+            " background=255:255:255" + \
+            " width=" + str(self.width) + \
+            " height=" + str(self.height) + \
+            " output='" + self.mapfile + "'"
+
         # render overlays
 
         os.unsetenv("GRASS_REGION")
@@ -624,7 +632,8 @@
 
         # run g.composite to get composite image
         try:
-            gcmd.Command(compcmd)
+            # gcmd.Command(compcmd)
+            os.system(compcmd)
         except gcmd.CmdError, e:
             print e
             return None



More information about the grass-commit mailing list