Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/processing/script/scripts/Extract_raster_values_to_shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@
progress.setPercentage(int(current * total))

rasterBand = raster.GetRasterBand(i + 1)
data = rasterBand.ReadAsArray()
try:
data = rasterBand.ReadAsArray()
except:
raise GeoAlgorithmExecutionException(
'Error reading raster data. File might be too big.')
layer.ResetReading()
feature = layer.GetNextFeature()
while feature is not None:
Expand Down