[GRASS-SVN] r54943 - grass/trunk/lib/python/pygrass/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 5 10:30:57 PST 2013


Author: zarch
Date: 2013-02-05 10:30:57 -0800 (Tue, 05 Feb 2013)
New Revision: 54943

Modified:
   grass/trunk/lib/python/pygrass/raster/__init__.py
   grass/trunk/lib/python/pygrass/raster/abstract.py
Log:
Remove rows and column attribute that are linked with the region and not with raster itself

Modified: grass/trunk/lib/python/pygrass/raster/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/__init__.py	2013-02-05 18:22:07 UTC (rev 54942)
+++ grass/trunk/lib/python/pygrass/raster/__init__.py	2013-02-05 18:30:57 UTC (rev 54943)
@@ -199,7 +199,7 @@
 
     def open(self, mode='r', mtype='CELL', overwrite=False):
         super(RasterRowIO, self).open(mode, mtype, overwrite)
-        self.rowio.open(self._fd, self.rows, self.cols, self.mtype)
+        self.rowio.open(self._fd, self._rows, self._cols, self.mtype)
 
     @must_be_open
     def close(self):
@@ -555,7 +555,7 @@
     def __init__(self, name, *args, **kargs):
         ## Private attribute `_fd` that return the file descriptor of the map
         self._fd = None
-        rows, cols = self.rows, self.cols
+        rows, cols = self._rows, self._cols
         RasterAbstractBase.__init__(self, name)
         self._rows, self._cols = rows, cols
 

Modified: grass/trunk/lib/python/pygrass/raster/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/abstract.py	2013-02-05 18:22:07 UTC (rev 54942)
+++ grass/trunk/lib/python/pygrass/raster/abstract.py	2013-02-05 18:30:57 UTC (rev 54943)
@@ -246,25 +246,8 @@
 
     name = property(fget=_get_name, fset=_set_name)
 
-    @must_be_open
-    def _get_rows(self):
-        """Private method to return the Raster name"""
-        return self._rows
 
-    def _set_unchangeable(self, new):
-        """Private method to change the Raster name"""
-        warning(_("Unchangeable attribute"))
-
-    rows = property(fget=_get_rows, fset=_set_unchangeable)
-
     @must_be_open
-    def _get_cols(self):
-        """Private method to return the Raster name"""
-        return self._cols
-
-    cols = property(fget=_get_cols, fset=_set_unchangeable)
-
-    @must_be_open
     def _get_cats_title(self):
         return self.cats.title
 



More information about the grass-commit mailing list