mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] fix out of bounds error in extract values scripts
This commit is contained in:
parent
0e48b3a720
commit
21da03e904
@ -86,7 +86,7 @@ for i in xrange(bandCount):
|
||||
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]
|
||||
|
@ -114,7 +114,7 @@ for i in xrange(bandCount):
|
||||
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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user