[GIS] Combining rasters using weighted average

arcgis-desktopcombineraster

I am using ArcGIS 10.3 with spatial analyst. I have a series of several rasters that I am trying to combine into a single raster layer. The rasters are all different sizes (different extents) and were produced using different sample sizes. I need to combine all these rasters using a weighted average based on sample size. Some of the rasters overlap, and others don't. At least one of the rasters is large enough to encompass all of the others. All have the same cell size and floating point values. I have tried using the Raster Calculator (i.e. (([raster1]*weight1) + ([raster2]*weight2))/sum of weights) as well as Weighted Sum. In either case, the output is reduced to the extent of the smallest raster, even when setting the processing extent to the same as the largest layer.

  1. Are these approaches (raster calculator, weighted sum) appropriate to do a weighted average and combine these rasters?

  2. What do I need to do to get the output to encompass the entire study area, and not just the extent of the smallest layer?

Best Answer

Extend both the rasters and the weights to grids covering the entire area of analysis. It is essential that every NoData raster value be converted to a numeric value and that the weight in its NoData region be set to zero. These operations are best performed with Con and IsNull operations.

The weighted mean is then computed exactly as in the question: it is the sum of the [raster]*[weight] values divided by the sum of the [weight] values. Due to the previous processing, each raster contributes a nonzero value only where it has data and the final value in each cell is an appropriately weighted mean of exactly those rasters that have values for that cell.

If any cell has no values for any of the input rasters, this formula will create a divide-by-zero condition, which should place a NoData in such cells, exactly as you would hope.

Related Question