[GIS] Exporting Zonal Statistics As Table output in ModelBuilder

arcgis-desktopexportmodelbuilderspatial-analystzonal statistics

I have an extremely simple model that takes as input a shapefile for zones along with a value raster. All the model does is produce a table of my desired zonal statistic for each zone (the mean). Next, I hope to get Modelbuilder to export those results into a txt or other file I can easily manipulate later in Excel.

I have about 48 rasters for which I would like to do this, and I can copy and paste the desired columns side-by-side into the Excel file myself, so although it will be a bit tedious I'm not worried about that. But it would be nice if there were a way to automatically export the table. Is this possible in Modelbuilder?

Other background info, if helpful:
I found the following exchange intriguing (Iterate through multiple Raster files and compute statistics using Zonal Statistics), and had hoped to be able to iterate my rasters and have them automatically append all in one table which I could later export myself in one easy click. I was unsuccessful in getting this to work, perhaps due to my misunderstanding of properly calling the target files, column names, etc. (I got the models described here to work perfectly well on my data… except that I could not successfully automate adding and naming new fields… my result had one field with the final raster/statistic having overwritten the others.)

I am using ArcGIS Desktop 10.2.1 and Spatial Analyst.

Best Answer

You need to use the %Name% inline variable for your output table namesenter image description here

Related Question