Преглед изворни кода

Fix bug get_value method, row and col were inverted.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56683 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli пре 12 година
родитељ
комит
e503249b56
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      lib/python/pygrass/raster/abstract.py

+ 4 - 4
lib/python/pygrass/raster/abstract.py

@@ -399,11 +399,11 @@ class RasterAbstractBase(object):
         """
         """
         if not region:
         if not region:
             region = Region()
             region = Region()
-        x, y = functions.coor2pixel(point.coords(), region)
-        if x < 0 or x > region.cols or y < 0 or y > region.rows:
+        row, col = functions.coor2pixel(point.coords(), region)
+        if col < 0 or col > region.cols or row < 0 or row > region.rows:
             return None
             return None
-        line = self.get_row(int(x))
-        return line[int(y)]
+        line = self.get_row(int(row))
+        return line[int(col)]
 
 
     @must_be_open
     @must_be_open
     def has_cats(self):
     def has_cats(self):