Select to view content in your preferred language

Zonal statistics failing with error 99999

03-25-2019 04:21 PM
New Contributor III


I am unable to run Zonal Statistics as table successfully and getting the unknown error 99999. I don't know what is going wrong. I am attaching the shapefile and the raster I am using. If someone can let me know what is going wrong, I will be very grateful.



0 Kudos
4 Replies
MVP Emeritus

since the *.tif is a bit beefy, can you answer whether...

  • the files are in the exact same coordinate system (you have to check their properties, this can't be assessed visually because of projection-on-the-fly)
  • have you turned off background geoprocessing
  • do the extents overlap and have they been set in the Environments tab for the Zonal Statistics as Table tools
0 Kudos
New Contributor III

Hi Dan.

Thanks for your reply. To answer your questions -

1. Yes, both the tif and the shapefiles are in the same coordinate system - WGS 1984

2. I tried by turning off background processing.

3. The polygons are only 10 in number. This is a subset of some 3 million polygons of building volumes. 

The extents are not set to overlapping in the Zonal statistics as Table tools.

It failed. Did not work.

If you have any other suggestions, please do let me know.



0 Kudos
Esri Contributor

Hi Tilottama,


I have created the cell center and cell boundaries from the value raster and have overlaid the zone polygons (in blue) on it in the figure below.

To perform the zonal operation, the zone polygon is first converted to a raster zone using the cell size of the value raster by default. In this case, the zone does not get internally converted due to the combination of how the zones are located and the analysis cell size. So, internally, the zone raster does not contain any valid zone and the tool returns an error as expected. To know more about Zonal Statistics as Table and how conversion in Zonal tools work, check out the help doc How Zonal Statistics works and see this blog on Getting the most out of Zonal Statistics.


In the future, instead of returning 99999 error message, we will try to provide a better error message.

Now, let me explain when your polygon zone were converted into raster zones internally, why the internal zone raster does not contain any valid zone:

The zone polygon is converted to a raster zone internally, using the cell center method (the polygons that overlaps the cell center of the value raster are the only ones to get converted). Since none of your zones overlapped any cell center of the value raster (default cell size is determined from value raster), the zones did not get converted. See How Polygon To Raster works to learn more about conversion.


To perform Zonal Statistics as Table tool with such small zones, set the analysis cell size from the environment of the Zonal Statistics as Table tool to a smaller number like 0.00001 so that the polygons are successfully rasterized and turned into valid zones. Keep in mind that specifying a smaller cell size, will generate a larger output raster. The higher resolution output may give the wrong perception of a higher quality result than what it actually is, since the additional detail does not actually exist in the input value raster.

Hope that helps. If you have more questions on zonal tools, you can contact me here or email me at




New Contributor III

Hi Sarmistha,

Thanks so much for your detailed reply. I had stopped working on the project and have come back to it again. 

I am trying to extract the raster values by overlaying the polygons (3 million plus) by writing a python script using zonal statistics. I have set the environment variables this way in the code -

# Set the cell size environment using a number.
arcpy.env.cellSize = 0.00001

Am I correct in understanding your suggestion?

Please let me know what you think.

Thanks much,


0 Kudos