Procházet zdrojové kódy

Remove rows and column attribute that are linked with the region and not with raster itself

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54943 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli před 12 roky
rodič
revize
67bf8020c9

+ 2 - 2
lib/python/pygrass/raster/__init__.py

@@ -199,7 +199,7 @@ class RasterRowIO(RasterRow):
 
     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 @@ class RasterNumpy(np.memmap, RasterAbstractBase):
     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
 

+ 0 - 17
lib/python/pygrass/raster/abstract.py

@@ -246,23 +246,6 @@ class RasterAbstractBase(object):
 
     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):