We are having trouble with the Zonal Statistics tool in ArcGIS Pro, while trying to improve our surfaces, planimetry, and potentially implement 3d Buildings... part of that workflow involves 'flattening' Building Footprints in a Digital Terrain Model: we have the Building Footprints as a polygon feature class and a DTM derived from a LAS dataset, and nestled within the script-tools is a call to ArcPy Zonal Statistics, where we caught our error:
"Error 010139: Input raster %1 is not integer type".
Simple enough! So, we started working with the Zonal Statistics tool on its own and easily reproduced the same error, given the Polygon FC and Floating Point DTM raster. According to the contemporary documentation (Zonal Statistics (Spatial Analyst)—ArcGIS Pro | Documentation), ZonalStatistics should accept Float for Mean (the config we were using).
We've tried:
1. running Int(raster) first, and received the same error.
2. replacing our derived-DTM with a USGS NED DEM and received the same error.
3. switching between a dev workstation (ArcPro 3.5.1) and a 'clean machine' (ArcPro 3.3.0).
We're curious:
A. Why is the Tool erroring on 'Int' when it should accept Float?
B. Why is the error seem to suggest the name of the input Value Raster is "%1"?
I'd definitely keep those rasters out of a Geodatabase. Save in a folder as .tif extension and retry would be my first go-to, and I know it may be obvious but double-check the building footprints are a feature class. Even if so, I think the tool auto-converts to a raster internally - so maybe something funky going on due to the polygon data. I'd try convert your footprints to a raster if 1st .tif step doesn't work (when converting be sure to set correct Cell Size and Snap Raster).
Good ideas David! We had tried using plain old .tif too, with the same error. We learned the error was a result of the input feature class. We had some success with the long-way round: 1) convert polygon to raster, 2) run Zonal Statistics.
Unfortunately, that leaves us to try and bodge this workaround into a prepackaged Toolbox, where ZonalStatistics is one of about 15 steps! Maybe we'll start by trying to remake the 'zonal polygons' Feature Class today and see what we can find...