diff --git a/python/plugins/processing/script/scripts/Extract_raster_values_to_CSV.py b/python/plugins/processing/script/scripts/Extract_raster_values_to_CSV.py index b1893530e89..84b9ee7d2cc 100644 --- a/python/plugins/processing/script/scripts/Extract_raster_values_to_CSV.py +++ b/python/plugins/processing/script/scripts/Extract_raster_values_to_CSV.py @@ -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] diff --git a/python/plugins/processing/script/scripts/Extract_raster_values_to_shapefile.py b/python/plugins/processing/script/scripts/Extract_raster_values_to_shapefile.py index 8016bdf0a38..c5e5258a8ed 100644 --- a/python/plugins/processing/script/scripts/Extract_raster_values_to_shapefile.py +++ b/python/plugins/processing/script/scripts/Extract_raster_values_to_shapefile.py @@ -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]