How to extract the raw data from Zonal Statistics as Table?

1078
3
12-14-2020 11:56 AM
Labels (1)
AndrewJ22
New Contributor

Hi

I have two features; one is a group of polygons with a few different catergories, and another is a raster feature.

I am able to successfully use the Zonal Statistics as Table tool to query, for example, what is the mean and SD raster value across the various polygon catergories. However I would like to do different statistical analyses that are not available in the small list within the graphing function and, importantly, I would like to graph these figures myself in my own software.

To do this, I need the raw data of the individual raster cell values per polygon catergory (basically I need the raw data that ArcGIS has used for Zonal Statistics as Table tool). Is there an easy tool to do this and export it as a spreadsheet?

Note: I am not familiar with Python.

Hopefully that makes sense.

Cheers

Andrew

3 Replies
DanPatterson
MVP Esteemed Contributor

RasterToNumPyArray—ArcGIS Pro | Documentation

scipy, numpy for statistics and matplotlib/(or related) for graphing

raster can also be output to csv using numpy/python for use in excel etc

then I saw that you weren't familiar with python


... sort of retired...
0 Kudos
DavidPike
MVP Frequent Contributor

You could clip each raster by the polygon then build a raster attribute table Build Raster Attribute Table—Help | ArcGIS for Desktop for each clipped raster.  It is of course a bit wasteful to have to clip these rasters, I would certainly use Dan's option if at all possible.

0 Kudos
abramso
New Contributor

@AndrewJ22 - I'm running into the same problem. I want to calculate more statistics/do more with the data than the zonal statistics tool offers. Given the tool obviously has access to the raw list of values within each zone, why is it not an option to be able to output, say, a csv file of all the values that went into generating those statistics for each zone? Seems like our only option (whether using that rastertonumpy option or not) is to have to go through and clip each individual raster for each individual zone and then extract the values... which feels wasteful given the zonal statistics tool clearly has what we needed in the first place. So, anyways, just replying to let you know you're not the only one wanting to do this and access the 'raw' data that went into the zonal statistics calculations!

0 Kudos