2

I was wondering if anyone knows what exactly zonal statistics sum does if all my input value raster have the same values.

For e.g. Lets say I have a finer resolution raster with 10 pixel each having the value of 10. I also have another coarser raster so that it perfectly overlaps the finer raster. I use the coarser raster as a zone to calculate the sum of all the 10 grids using zonal statistic sum. The resultant raster should have a value of 100 if I run the zonal statistics sum. But instead it has a value of 10.

I do not understand. Is it something that I am doing wrong or is it that unique values are required to do a zonal statistics sum?

1
  • Unique values are not required for the input raster, however they are required in the zone raster for each zone. All cells with the same value are considered a zone; just using pixel dimensions isn't sufficient.
    – Chris W
    Jul 8, 2015 at 18:51

1 Answer 1

2

At first glance this seems quite puzzling. However if you check the help page on zonal statistics the second comment states the following;

"When the zone and value inputs are both rasters of the same resolution, they will be used directly.If the resolutions are different, an internal resampling is applied to make them match before the zonal operation is performed."

Most likely what is happening is the coarser raster is being resampled to the finer rasters resolution. An easy way to determine would be to verify if the output zonal statistics raster is the same cell size as your input raster, if this is true than that is what's happening.

A possible solution could be to convert your zone raster to a polygon (via raster to polygon) and re-perform the zonal statistics.

Hope this helps.

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.