3

I have a a polygon shapefile of different regions, and a raster grid of precip data. I want to take the polygon and add up all the raster precip data in each zone. I could use zonal statistics to do this, however the tool does not split pixels exactly where the polygon edge cuts through the a pixel, it instead takes either the whole pixel value or not at all. I could convert the raster data to polygons, but I was wondering if there was a way to do this without going to polygons.

0

1 Answer 1

6

You can't easily get values from a fraction of a pixel, in fact, you probably don't want to get into this at all. You could always resample your raster to a higher resolution (e.g. from 50cm to 10cm) in order to better follow the polygon boundary. This method will still allow you to run zonal statistics.

1
  • 3
    +1 This is a good solution, especially considering that there's little additional precision achieved by splitting pixels in most cases. If you are confident the value in any pixel is almost uniformly distributed across the extent of that pixel, there's little to be gained by splitting the pixels (because their values won't vary much from one neighbor to the next) and when the distributions within pixels are not uniform, the split isn't much better than a guess or using the default all-or-nothing procedure anyway.
    – whuber
    Commented Oct 27, 2011 at 17:06

Your Answer

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

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