Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Seems like such a simple plugin, but it just won't work.

I'm trying to run Zonal Statistics to find the mean value of a raster's pixels within the area of a vector polygon, but all it will give me is 'NULL'. The polygon and the raster are both in the same CRS. There is one null data point within the area, it has a no data value of -9 and is identified as "null (no data). But I don't believe that that is the issue because choosing an area that does not contain a null still doesn't work.

In order to see the new columns in the attribute table I find it necessary to toggle editing on the polygon on and off. I've tried running it with editing both on and off, one time it worked with editing on! But never again. Is it supposed to require editing to be on?

I'm using QGIS 1.8.0 on a Mac running OS 10.7.5.

The dashed line marks the bounds of "LowDustRegion". "Gale_Crater_1_tes_seasonal_Daytime_median" is the course resolution raster behind.

Only 'NULL' is recorder in the Attribute table.

share|improve this question
I had the same problem, it was solved when I set both layers to the same CRS, please double-check that. – user23515 Oct 31 '13 at 19:34

I just had this problem and this may help: To guarantee the same projection for some reason it helps to just resave the polygon shapefile layer and set the projection there -- even if it already looks like it has the same projection.
right click layer > save as > give name > use "selected CRS" and find the same CRS as the raster > accept for save; use the new layer for the zonal statistics.

share|improve this answer
@underdark, I have the same problem but this solution did not solve it. I have buffer zones established around points and I'm looking to get statistics of the raster layer underneath. The values of the raster go from 0 to 5 (6 different classes) and I'm wondering it that's part of the issue. I'm looking to get information on how much of each classes (0 to 5) is found within each buffer. – Ninja Tuna Mar 8 at 14:25

I just ran into the same problem, and it seems that you can only get this to work if the name of your output field is 5 characters or less. I tried searching the forums to see if others had posted this info, but no luck so I figured it out based on trial and error (lots of error...). Incidentally, you do not have to be in editing mode to perform the zonal stats.

share|improve this answer
This worked for me too. – Simona Sep 17 '15 at 11:57

Your Answer


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

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