Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to calculate statistics for a raster layer using an overlaying polygon layer, I'm using SAGA "Grid Statistics for polygons" function, but it returns an error, sadly.. So in the sextante log it says :


Grids: No objects
Files: "Y:/.../clipper_grassexport_0to11"
loading: Y:/.../clipper_grassexport_0to11
Driver: Y:/.../clipper_grassexport_0to11/
Cells: x 44069, y 42309
Bands: 1
Transformation x' = 2635889.298915 + x * 100.001118 + y * 0.000000
Transformation y' = 5421705.687421 + x * 0.000000 + y * -100.000407

Module caused access violation!

GDAL: Import Raster: Module caused access violation!
error: executing module [GDAL: Import Raster]


Load grid: C:\Users\...\AppData\Local\Temp\sextante\1368631882.798.sgrd...
error: Grid file could not be opened.
error: input file [C:\Users\...\AppData\Local\Temp\sextante\1368631882.798.sgrd]
error: empty input list [GRIDS]
Usage: Grid Statistics for Polygons -GRIDS <str> -POLYGONS <str> [-RESULT <str>] [-COUNT] [-MIN] [-MAX] [-RANGE] [-SUM] [-MEAN] [-VAR] [-STDDEV] [-QUANTILE <num>]
-GRIDS:<str>    Grids
Grid list (input)
-POLYGONS:<str> Polygons
Shapes (input)
-RESULT:<str>   Statistics
Shapes (optional output)
-COUNT          Number of Cells
-MIN            Minimum
-MAX            Maximum
-RANGE          Range
-SUM            Sum
-MEAN           Mean
-VAR            Variance
-STDDEV         Standard Deviation
-QUANTILE:<num> Quantiles
Value Range: 0.000000 - 50.000000

error: executing module [Grid Statistics for Polygons]

I have tried to load my raster and vector layers into SAGA directly, but the raster layer wouldn't load, and same error appears - "Module caused access violation!"

Checked if SAGA is properly installed, and is 2.0.8 version (QGis 1.8.0)

Raster is an GEOTIFF exported from GRASS Tools in QGis in Byte format (Values 0-255), CRS's also match, I have run out of ideas, what could possibly be wrong?

Update - June 17 2013

So to sum it all up - with a large dataset it still gives an error, but if I want to divide the raster in say 4 smaller parts, raster Clipper Tool does it for ages and freezes with an approximate filesize of 100-140 MB, that means I have found no solution yet, that does the job efficiently.


share|improve this question
Hmmm... 44069 by 42309 cells is over 1.8 billion of them. When loaded into RAM as four-byte integers that grid would occupy about 7 GB (and still almost 2 GB as one-byte integers). Although to compute statistics the entire grid does not have to be loaded, we have to suspect (from the error message) that the problem may be you're out of RAM. Do you have at least 7.5 GB free? – whuber May 15 '13 at 16:44
yeah I know it',s quite big, but if that's the problem, I will try it out with a different computer, hopefully 8GB is enough, the laptop had only 4GB, I'll post back after I try it! – Janis May 15 '13 at 17:01
Update: so I tried it with a 16GB RAM machine, but it still gave me the same error, but I will try to divide it in smaller parts, because with a country sized raster it worked, I did the same steps in each case (Saga-Polygon Parts to separate polygons and raster Clipper Tool to have exactly the same size raster as the overlaying vector layer) – Janis May 16 '13 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.