[GRASS-SVN] r54656 - grass-addons/grass7/raster/r.agent/libagent

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 15 15:51:48 PST 2013


Author: mic
Date: 2013-01-15 15:51:48 -0800 (Tue, 15 Jan 2013)
New Revision: 54656

Modified:
   grass-addons/grass7/raster/r.agent/libagent/grassland.py
Log:
write out to grass map

Modified: grass-addons/grass7/raster/r.agent/libagent/grassland.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-15 23:36:05 UTC (rev 54655)
+++ grass-addons/grass7/raster/r.agent/libagent/grassland.py	2013-01-15 23:51:48 UTC (rev 54656)
@@ -84,6 +84,10 @@
         """
         if self.layers.has_key(layername):
             self.layers.pop(layername)
-#    def writelayer(self, layername):
-#        pass
+    def writelayer(self, layername, force=False):
+        if self.layers.has_key(layername) and
+          self.grassmapnames.has_key(layername):
+            grassmapname = self.grassmapnames[layername]
+            layer = self.layers[layername]
+            layer.write(grassmapname, overwrite=force)
 



More information about the grass-commit mailing list