Select to view content in your preferred language

Averaging a series of rasters for the zonal statistics as raster tool

3484
5
03-31-2016 05:19 PM
RuthLowry1
Deactivated User

Before i begin, i have no experience in scripting and i have only created basic custom tools in ModelBuilder, so if there is a pre-existing tool or work-around for what i need, that's what i would prefer to find. Thanks.

I need to create a zonal statistics raster using a landcover shapefile and a few dozen rasters representing land surface temperature over a few months. Averaging the values by inputting several dozen rasters into raster calculator does not seem efficient. I cannot seem to find a tool which would create a single composite raster by averaging the values in multiple rasters. I know that batching can perform zonal statistics on a group of rasters, but I'm looking for a single output.

So i need either 1. a method of creating an averaged raster using all the sample datasets that i can then plug into                               the zonal stats as raster tool, or
                          2. a way of inputting many rasters into the zonal stats as raster tool to get straight to one composite                               output raster.

All help appreciated.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Cell Statistics—Help | ArcGIS for Desktop will enable you to get the averages and deal with raster related issues.  You would still have to select all your rasters unless you know how to code and your rasters are all in one location.  But at least it is a start

curtvprice
MVP Esteemed Contributor

If your rasters are all in one place, it's easy enough to use a Model Builder iterator to build the list of rasters in a sub-model. Look ma, no code!

DanPatterson_Retired
MVP Emeritus

yes but you have to build the model... you may as well steal the first code snipppet from Cell Statistics—Help | ArcGIS for Desktop  and add a ListRasters after the environment settings line and build the list that way ListRasters—Help | ArcGIS for Desktop

RuthLowry1
Deactivated User

What a simple tool, surprised i missed it. I figured there must be something like it in ArcGIS. Inputting the rasters was not quite as tedious as i thought it would be since the input field is a drop-down, 'add-as-you-go-along' menu, though i probably will look into adding iterations in Model Builder in the future. I'll have need of this tool again somewhere down the line, thanks.

0 Kudos
DanPatterson_Retired
MVP Emeritus

The Local toolset offerings are something to remember if you need to do operations that require cell-by-cell comparisons or combinations.  An overview of the Local toolset—Help | ArcGIS for Desktop

"Local" implies you have a stack of rasters, occupying the same location...this situation can occur when:

  • you want to compare an observation over time for change differences
  • you have different variables and wish to obtain the unique combinations of these for either their prevalence or association