Jelajahi Sumber

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 tahun lalu
induk
melakukan
48214fe67c
1 mengubah file dengan 15 tambahan dan 0 penghapusan
  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 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):