浏览代码

Add iteritems method to the Region class.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54056 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 12 年之前
父节点
当前提交
48214fe67c
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      lib/python/pygrass/region.py

+ 15 - 0
lib/python/pygrass/region.py

@@ -175,6 +175,21 @@ class Region(object):
                 return False
                 return False
         return True
         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----------
     #----------METHODS----------
     def zoom(self, raster_name):
     def zoom(self, raster_name):