(Zonal Statistics as Table) aborted by User. when using Model Builder

1764
4
01-06-2021 03:03 PM
SimonWebster
Occasional Contributor

I've not seen this issue before:

If I'm using Zonal Statistics as Table (Image Analyst, Spatial Analyst) as a geoprocessing tool directly from the toolbox, I can get the tool to run fine. However, when running the tool from a model via Model Builder, I'm receiving the following error:

Cancelled function
(Zonal Statistics as Table) aborted by User.


Now, the important bits:

ArcGIS Pro 2.7.0

Datasets: Are the same. I can use the datasets that have been built in model builder to that point to run the tool manually - but not from within model builder. 

Projections: Are the same between the two input datasets

Filenames: Makes no difference when running manually if they are more or less than 8 characters. Tried a smaller name space in model builder also, no change. 

Hardware: Several Tb of free space, and 32gb of available memory (only 10gb in use at peak). 

Save location: Local SSD, with a short file path, no special characters. 

Variable substitution: Is being used in the file name for the input polygon layer due to the presence of an iterator

 

To replicate: 

GeoTiff as Value Raster

Feature layer with single part polygons. Field called 'building_pid' of type text, and length 15. These are unique identifiers. Number of polygons doesn't seem to matter to the issue.

Use zonal statistics to find the MEAN and export as table.   

Iterator in model to Iterate Features

 

The image below shows the successful running of the tool by hand, vs in the model. 

SimonWebster_0-1609974188109.png

 

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

zonal statistics as table produces a table, hence, if it is going into a file geodatabase you shouldn't have issues, but if it is going to a folder, then you run into the table issues associated with dbf files (which includes field names plus much more).

Zonal Statistics as Table (Spatial Analyst)—ArcGIS Pro | Documentation

Can you confirm where the destination is going for both?  folder? or local file gdb?


... sort of retired...
0 Kudos
SimonWebster
Occasional Contributor

Thanks Dan, 

Into a file geodatabase.

For the purpose of this example: D:\Temp\Temp.gdb (tried just now to eliminate path issues)

0 Kudos
SarmisthaChatterjee
Esri Contributor

Thanks for reporting this issue Simon. I was able to run ZonalStatisticsAsTable tool in a model by looping through features in a feature class, as well as feature class in a workspace in Pro 2.7, using Iterate Feature Selection and Iterate Feature Classes respectively. In both the models, I could produce expected output table.

From the image you have shared, I am not exactly sure which other tools you have used. So, based on the information you provided, I tried the following in ZonalStatisticsAsTable tool in the models below:

  • Iterate Feature Selection- 2 zones from 1 shapefile, text zonefield with length 15, tif value raster, Mean statistics and an fgdb output table
  • Iterate Feature Classes- 2 shapefile, text zonefield with length 15, tif value raster, Mean statistics and an fgdb output table

Here is the screenshot of my models:

SarmisthaChatterjee_0-1611711262123.png

The issue you have reported might be related to your data, or other tools or environment in the model. Can you share the model, and the data with us so that we can reproduce? Please feel free to submit a bug.

Also, if you are looping through features in a feature class, what is the workflow you are trying to solve. Incase you are working with overlapping polygons, you do not have to use an iterator, as ZonalStatisticsAsTable tool can process overlapping polygons in Pro 2.7 and create statistics for each polygon zone.

Thanks,

Sarmistha

0 Kudos
DylanMcDougall
New Contributor II

Hi all, I am getting a similar error in a new install of ArcGIS Pro 10.8.1 with a model that was written and runs fine in 10.6.3. For me, the error says:

! Canceled function
! (Zonal Statistics as Table) aborted by User. 

With "Canceled" spelled incorrectly. 

DylanMcDougall_0-1627448346799.png

The Zonal Statistics as Table tool runs fine when in a new model and in the Geoprocessing pane.

I, the user, have certainly not aborted the function, and despite the lack of an error code the misspelling of "Canceled" leads me to believe that the source of this problem can be isolated in the codebase by finding instances of this misspelling.

Can anyone offer an explanation for this behavior? I would like to avoid the difficult process of exporting my large model to python and re-testing everything. Is there any other way to make my working model shareable?

Thanks!

0 Kudos