Suppose I have two rasters, A and B. I want to determine the value of a certain "zone" in raster A by taking the weighted average of several other zones from raster B, that partially overlay onto that zone of raster A.

I think its much better if I show you a picture to try to explain:

enter image description here

  • The "certain 'zone' in raster A" is shown as the teal polygon in the border, suppose it is rasterized and is made up of 1000 cells.
  • The red grids are the "several other zones from raster B." In this case, there are four denoted by g1, g2, g3, g4 (these are some values).
  • The weight will be determined by the number of pixels lying within the respective zones in raster B.
  • The value of that certain 'zone' in raster A will be determined by this:

    value of zone in A = (50/1000)g1 + (300/1000)g2 + (150/1000)g3 + (500/1000)g4

I've thought of employing the Combine tool in ArcMap and then bringing it into excel.. but it is a fairly manual process. I have a lot of data to get through (like 50+ raster B's that I must aggregate through)..

Is there an easier way to do this? Is there a specific function you think may help? I have little experience in writing a python script but if you point me to some packages+functions in arcpy or numpy or whatnot, I'd greatly appreciate it.


edit: Similar, previous questions have suggested things like "dasymmetric mapping" like this thread: Using National Agriculture Statistics Service (NASS) county level crop data to estimate crop acreage in hydrologic regions?.. which suggests the use of the Intersect tool, but I'd generally prefer to rely on using weights from the counts of defined cell sizes of a raster rather than have arcgis calculate the area proportions from vector data.

I also found a helpful tip on this question, Obtain normalized raster average per polygon?, suggesting Zonal Statistics. Is the "mean" of Zonal Statistics the same as what I'm trying to do? I'll try it and report back...

closed as unclear what you're asking by PolyGeo Oct 16 '17 at 6:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Couldn't you clip the polygon out and calculate the average? – gm70560 Apr 27 '13 at 20:36
  • ..hmm, but I have much more than one polygon – michael g Apr 27 '13 at 21:34
  • 1
    Could you describe the desired output in more detail? Is Raster B simply defining the zones, or are you interested in the pixel values of raster B too? Can't you complete this analysis using Zonal statistics via your teal polygon and raster B? Thanks for clearing this up. – Aaron Apr 27 '13 at 22:41