Skip to content

Commit

Permalink
[processing] fix out of bounds error in extract values scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed May 21, 2014
1 parent 0e48b3a commit 21da03e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
x = pnt[0]
y = pnt[1]
(rX, rY) = raster.mapToPixel(x, y, geoTransform)
if rX > rasterXSize or rY > rasterYSize:
if rX >= rasterXSize or rY >= rasterYSize:
feature = layer.GetNextFeature()
continue
value = data[rY, rX]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
x = pnt[0]
y = pnt[1]
(rX, rY) = mapToPixel(x, y, geoTransform)
if rX > rasterXSize or rY > rasterYSize:
if rX >= rasterXSize or rY >= rasterYSize:
feature = layer.GetNextFeature()
continue
value = data[rY, rX]
Expand Down

0 comments on commit 21da03e

Please sign in to comment.