Skip to content
Permalink
Browse files
Merge pull request #1280 from anitagraser/patch-1
[processing] added error handling for too big rasters
  • Loading branch information
alexbruy committed Mar 31, 2014
2 parents a191d5b + 9ef91a2 commit d3b4a8f5de55a4426c9946c59717a8d423593cd9
@@ -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:

0 comments on commit d3b4a8f

Please sign in to comment.