Running on Windows; 8gb memory, 500gb HD, i5 cpu; Raster file: 250mb

I am having a problem with zonal statistics advancing past 17%. I am trying to run statistics on a crop grown in certain counties. In the image below, you can see the counties of Washington state in the vector buffer. The raster data is dispersed throughout the state.

I have run zonal statistics on much larger raster files. The raster image comes from CDL NASS portal, which contains many more pixel values other than the one I have isolated. But it allows for a researcher to isolate the variable (crop) they are interested in and download that image without the rest of the data.

Any ideas?

enter image description here

1 Answer 1


I had the same problem with a similar file and found that it was due to complex polygons and polygons that only contained NA values. In particular there were one or two countries in my case that were causing it to crash - you can see these by looking at where the zonal statistics data ended before it stopped.

To fix this I:

  • Deleted all polygons from the attribute table that only contained NA values or did not overlap with the raster
  • Simplified complex polygons using the Node Tool

If you can change your NA values to 0 values (e.g. via Raster>Conversion>Translate) then this also solved the problem for me, but that may not be possible if you are deriving a statistic and need to ignore cells with no value.

The other route to fix this is to run v.rast.stats in GRASS - for the complex polygons with multiple nodata values, this was really quick had no errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.