griner

Zonal stats to table - poly vs. raster

Discussion created by griner on Aug 24, 2010
All the writing on zonal stats is consistent that it actually works on a raster, not a polygon feature. If you give it a polygon feature to define the zones, it converts the polygon to a raster and then does the zonal stats.

I notice that when I use a polygon feature for the zones and I specify which attribute of the feature to use, that the resulting stats table contains the value of that specified field. E.g. if my polygon zones have an attribute called "MUNI_CODE" (that is text data), the resulting zonal stats table has a field called "MUNI_CODE" (also text data) containing corresponding values. This is very convenient as I can then join the stats table to the original zone table and proceed to work with my polygon feature and its zonal stats.

The documentation and help files and forums highly recommend that one convert the zone polygons to a raster in order to maintain control over overlapping polygons. Doing this, and specifying the "value field" as "MUNI_CODE" I get a raster and a RAT (Raster Attribute Table) that contains the MUNI_CODE field and values.

However, when I generate zonal stats to table from my raster-defined zones (specifying "MUNI_CODE" as the "zone field") the resulting stats table does NOT contain the MUNI_CODE field, so I have no way to join the stats back to the original polygon feature.

I carefully made sure that the zonal raster I created is the same projection, cell size and snapped to the same spatial position as the value raster I'm trying to get stats from.

Help.  Any ideas on how to get the zonal field into the zonal stats table when using a raster for the zones?

Outcomes