<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error 999999 while calculating  Zonal Statistics as Table for 300k features in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1005751#M34641</link>
    <description>&lt;P&gt;Am running zonal statistics as table for overlapping polygons, and my original dataset has 320k buffers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already changed my raster processing extent to &amp;gt;65k, and also made sure the projection is the same for all features, but still Error 999999 occurs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore the script works alright on a polygon dataset of 45k features but now with this larger dataset i run into issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the tool doesnt just give me the error right away- i've tested multiple times and usually it happens after running for 1 or 2 hours - which is very frustrating.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is as below -&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def calZonalStat(gdb, buffers, in_ras,name):
    #pcd = postcodes
    now = datetime.datetime.now()
    print("Start_time: "+ str(now))
    #code
    
    out_table = gdb + name+"_ztbl"+appx
    ztbl = arcpy.ia.ZonalStatisticsAsTable(in_zone_data=buffers, zone_field="pcd", in_value_raster=in_ras, out_table=out_table, ignore_nodata="DATA", statistics_type="ALL", process_as_multidimensional="CURRENT_SLICE", percentile_values=[100])
    
    #end time
    later = datetime.datetime.now()
    elapsed = later - now
    print("End_time: "+str(later))
    print("calZonalStat time: " + str(elapsed))

    return ztbl

Air_PM25_RC_ztbl_al1= calZonalStat(loc_gdb, buffers_al1, Air_PM25_RC, 'Air_PM25_RC')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;# Start_time: 2020-11-25 13:46:12.085096
# Traceback (most recent call last):
#   File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
#   File "&amp;lt;string&amp;gt;", line 8, in calZonalStat
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py", line 3956, in ZonalStatisticsAsTable
#     percentile_values)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py", line 53, in swapper
#     result = wrapper(*args, **kwargs)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py", line 3946, in Wrapper
#     percentile_values)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 511, in &amp;lt;lambda&amp;gt;
#     return lambda *args: val(*gp_fixargs(args, True))
# arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
# Failed to execute (ZonalStatisticsAsTable).
# &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am wondering if it might be because of limited memory? in my C drive there's only 15GB out of my 100GB SSD. Or any other ways to speed up the process?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated - Thanks!!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2020 03:34:27 GMT</pubDate>
    <dc:creator>BraundtLau</dc:creator>
    <dc:date>2020-12-01T03:34:27Z</dc:date>
    <item>
      <title>Error 999999 while calculating  Zonal Statistics as Table for 300k features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1005751#M34641</link>
      <description>&lt;P&gt;Am running zonal statistics as table for overlapping polygons, and my original dataset has 320k buffers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already changed my raster processing extent to &amp;gt;65k, and also made sure the projection is the same for all features, but still Error 999999 occurs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore the script works alright on a polygon dataset of 45k features but now with this larger dataset i run into issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the tool doesnt just give me the error right away- i've tested multiple times and usually it happens after running for 1 or 2 hours - which is very frustrating.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is as below -&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def calZonalStat(gdb, buffers, in_ras,name):
    #pcd = postcodes
    now = datetime.datetime.now()
    print("Start_time: "+ str(now))
    #code
    
    out_table = gdb + name+"_ztbl"+appx
    ztbl = arcpy.ia.ZonalStatisticsAsTable(in_zone_data=buffers, zone_field="pcd", in_value_raster=in_ras, out_table=out_table, ignore_nodata="DATA", statistics_type="ALL", process_as_multidimensional="CURRENT_SLICE", percentile_values=[100])
    
    #end time
    later = datetime.datetime.now()
    elapsed = later - now
    print("End_time: "+str(later))
    print("calZonalStat time: " + str(elapsed))

    return ztbl

Air_PM25_RC_ztbl_al1= calZonalStat(loc_gdb, buffers_al1, Air_PM25_RC, 'Air_PM25_RC')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;# Start_time: 2020-11-25 13:46:12.085096
# Traceback (most recent call last):
#   File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
#   File "&amp;lt;string&amp;gt;", line 8, in calZonalStat
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py", line 3956, in ZonalStatisticsAsTable
#     percentile_values)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py", line 53, in swapper
#     result = wrapper(*args, **kwargs)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\ia\Functions.py", line 3946, in Wrapper
#     percentile_values)
#   File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 511, in &amp;lt;lambda&amp;gt;
#     return lambda *args: val(*gp_fixargs(args, True))
# arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
# Failed to execute (ZonalStatisticsAsTable).
# &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am wondering if it might be because of limited memory? in my C drive there's only 15GB out of my 100GB SSD. Or any other ways to speed up the process?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated - Thanks!!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 03:34:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1005751#M34641</guid>
      <dc:creator>BraundtLau</dc:creator>
      <dc:date>2020-12-01T03:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error 999999 while calculating  Zonal Statistics as Table for 300k features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1006336#M34698</link>
      <description>&lt;P&gt;You might need to calculate statistics on your input raster for it to run the percentiles (just a guess). I'd also check your raster has integer values not float.&lt;/P&gt;&lt;P&gt;out_table = gdb + name+"_ztbl"+appx&lt;/P&gt;&lt;P&gt;also not sure where appx (above) is as a parameter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd recommend running the tool manually with those parameters on a subset of your data to narrow-down the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 20:37:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1006336#M34698</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-12-02T20:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error 999999 while calculating  Zonal Statistics as Table for 300k features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1006957#M34763</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here (&lt;A href="https://support.esri.com/en/Technical-Article/000015210" target="_blank"&gt;https://support.esri.com/en/Technical-Article/000015210&lt;/A&gt;) is an article that addresses common Zonal Statistics as Table error causes. I would absolutely recommend running check/repair geometry, then moving onto the other troubleshooting options.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 14:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1006957#M34763</guid>
      <dc:creator>Taren_Esri</dc:creator>
      <dc:date>2020-12-04T14:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error 999999 while calculating  Zonal Statistics as Table for 300k features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1392383#M79961</link>
      <description>&lt;P&gt;It could also be that there is no surface from the vector layer in the raster overlay, in which case it is a formal error of the Zonal Statistics as Table tool.&lt;/P&gt;&lt;P&gt;If working with an arcpy script, "try - except" is used so that the calculation is not interrupted.&lt;/P&gt;&lt;P&gt;Otherwise, errors in the geometry of the vector layer should be looked at and possibly corrected with the Repair Geometry tool.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:12:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-999999-while-calculating-zonal-statistics-as/m-p/1392383#M79961</guid>
      <dc:creator>gisgis2</dc:creator>
      <dc:date>2024-03-07T08:12:25Z</dc:date>
    </item>
  </channel>
</rss>

