[GRASS-SVN] r54056 - grass/trunk/lib/python/pygrass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 26 10:27:19 PST 2012


Author: zarch
Date: 2012-11-26 10:27:18 -0800 (Mon, 26 Nov 2012)
New Revision: 54056

Modified:
   grass/trunk/lib/python/pygrass/region.py
Log:
Add iteritems method to the Region class.

Modified: grass/trunk/lib/python/pygrass/region.py
===================================================================
--- grass/trunk/lib/python/pygrass/region.py	2012-11-26 18:27:06 UTC (rev 54055)
+++ grass/trunk/lib/python/pygrass/region.py	2012-11-26 18:27:18 UTC (rev 54056)
@@ -175,6 +175,21 @@
                 return False
         return True
 
+    def iteritems(self):
+        return [('projection', self.proj),
+                ('zone', self.zone),
+                ('north', self.north),
+                ('south', self.south),
+                ('west', self.west),
+                ('east', self.east),
+                ('top', self.top),
+                ('bottom', self.bottom),
+                ('nsres', self.nsres),
+                ('ewres', self.ewres),
+                ('tbres', self.tbres),
+                ('rows', self.rows),
+                ('cols', self.cols),
+                ('cells', self.rows * self.cols)]
 
     #----------METHODS----------
     def zoom(self, raster_name):



More information about the grass-commit mailing list