<?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 Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668630#M9724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I gave &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Zonal Statistics as Table 2&lt;/SPAN&gt;&lt;SPAN&gt; from v 1.3 a try. It was very easy to use, but it still skips a lot of polygons. (Only 3279 out of 3550 buffers made it into the final table.) It's too bad, because I ran the Model Builder method overnight and it didn't complete.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 12:47:42 GMT</pubDate>
    <dc:creator>ThomasStanley</dc:creator>
    <dc:date>2014-04-04T12:47:42Z</dc:date>
    <item>
      <title>Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668570#M9664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm currently using ArcGIS 10 SP2 on Windows 7 64bit. I'm working on a very large railway alignment design project and need to generate "Average Catchment Slopes" for each watershed. The problem that I have is that the "Zonal Statistics as Table" tool does not process overlapping polygons. It's mentions in the help that if the polygons overlap, that should be processed interactively to overcome this. I haven't been able to find any supporting documentation to achieve this. Just a note, I have over 600 watersheds that I need to process and a manual process will not be possible if I'm to meet my deadline. Any advice will be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 14:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668570#M9664</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2011-08-09T14:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668571#M9665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at the attached tool.&amp;nbsp;&amp;nbsp; It will allow you to do zonal statistics as table on overlapping polygons.&amp;nbsp; you can add this tool directly to ArcToolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 14:59:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668571#M9665</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2011-08-09T14:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668572#M9666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We recently published a toolbox (first prize at the ESRI UC 2011 AppFair!) that includes tools that do overlap processing for statistics and area tabulations, among other things.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;USGS Open-File Report 2010�??1268&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;National Water-Quality Assessment (NAWQA) Area-Characterization Toolbox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;By Curtis V. Price, Naomi Nakagaki, and Kerie J. Hitt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pubs.usgs.gov/of/2010/1268/"&gt;http://pubs.usgs.gov/of/2010/1268/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The published version has only limited support for 10.x, but I have an updated version that will be posted there soon. If you are interested, let me know and I can send it your way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 18:17:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668572#M9666</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-08-09T18:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: python script garbage collection?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668573#M9667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Jamie - what's this (from your script tool):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import gc
# ...
#enable garbage collection
gc.enable()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this help with looping geoprocessing tools that seem to eat up memory and crash your session?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668573#M9667</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T04:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668574#M9668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jamie&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much, your python script has solved my problem. I've made some minor adjustments to your code to tie in with ArcHydro. Thanks again, its greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 03:38:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668574#M9668</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2011-08-11T03:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668575#M9669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Curtis&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would really be interested in looking at the toolbox that you have developed. It would be greatly appreciated if you would be willing to email me a copy for ArcGIS 10. Thanks fo offering your assistance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 03:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668575#M9669</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2011-08-11T03:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668576#M9670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Curtis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is the garbage collection module.&amp;nbsp; We were running into some memory issues after several iterations of the tool.&amp;nbsp; The garbage collection module clean up unreferenced objects in memory.&amp;nbsp;&amp;nbsp; Take a look t this link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/library/gc.html"&gt;http://docs.python.org/library/gc.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 14:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668576#M9670</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2011-08-11T14:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668577#M9671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It would be greatly appreciated if you would be willing to email me a copy for ArcGIS 10.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter - please email me (contact info in in my sig below)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 19:34:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668577#M9671</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-08-11T19:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668578#M9672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Peter - please email me (contact info in in my sig below)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Curtis&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My contact details are : &lt;/SPAN&gt;&lt;A href="mailto:Peter.Wilson@aurecongroup.com"&gt;Peter.Wilson@aurecongroup.com&lt;/A&gt;&lt;SPAN&gt;, Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2011 02:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668578#M9672</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2011-08-12T02:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668579#M9673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jamie, will this run a lot longer than the regular Zonal Stats (it is right now for me, not sure if its working)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I got an error at first that I had no FID field, my zonal feature had ObjectID instead of FID fields, so I AddField then CalculatedField FID to be the ObjectID values. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Danny&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 21:21:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668579#M9673</guid>
      <dc:creator>DanielSheehan</dc:creator>
      <dc:date>2011-09-09T21:21:38Z</dc:date>
    </item>
    <item>
      <title>FID vs ObjectID vs OID</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668580#M9674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I got an error at first that I had no FID field, my zonal feature had ObjectID instead of FID fields,...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Jamie's defense, this was kind of a once-off deal working with shapefiles. The more fancy way to do this (to support tables with different object ID field names) is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of hardcoding:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;strFID = '"FID" ='
...
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(zone, newSelection, strFID + str(inRow.FID))
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;get the tables object id field name:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;strFID = arcpy.Describe(inputFeatureZone).OIDFieldName
...
&amp;nbsp;&amp;nbsp;&amp;nbsp; strQry = '"%s" = %s' % (strFID, inRow.GetValue(strFID))
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(zone, newSelection, strQry)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668580#M9674</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T04:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668581#M9675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, Thanks!!! I'm batch processing a ton of radial and network buffers. Should I be running this in python rather than in Modelbuilder?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 18:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668581#M9675</guid>
      <dc:creator>DanielSheehan</dc:creator>
      <dc:date>2011-09-15T18:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668582#M9676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Daniel - &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just a lot of iterations and will take quite a while. I doubt if wrapping the Python script inside modelbuilder will buy you any speed, as long as you've checked the box to run the python script "in process". One approach to consider is grouping your input polys into some non-overlapping groups so you can them in parallel with a single run of zonal statistics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a script tool that makes an attempt but it's not good enough for me to feel okay putting it here. If interested in helping me with that project by testing it, contact me off line.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 18:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668582#M9676</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-09-15T18:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668583#M9677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Curtis, I think I'm using Jamie's script which I benchmarked it in modelbuilder and would take many days to run (if my computer could even chug along for that long). I was just wondering if it would be significantly faster to run things outside of modelbuilder as a .py file vs. running in modelbuilder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first workaround I came up with was to run zonal stats on each Feature split into its own Feature Class (so whereas one buffer distance Feature Class had 1541 records, I now have 1541 Feature Classes). Then I set up Iterator in modelbuilder to create Rasters for each FC (n=1541) (did this b/c I guess Zonal Stats converts vector to raster temporarilty to run) and then run through all the Rasters Zonal Stats individually using iterator. This worked until I ran into a few rasters that didn't produce any stats (why I don't know) and caused the program to crash - I'm curious if iterators in modelbuilder have a theoretical limit. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now I'm thinking of just converting my Kernel Density surface (the file I want to do Zonal Stats for) to a point file and just using Summary Statistics after an intersect of polygons to points. I'm just exhausted using Zonal Stats for 2 reasons, it keeps crashing using iterators AND 13-character limits for file names (I had to reprocess work to create unique IDs that took a whole day b/c my unique IDs were 15 characters long). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you see any reason not to do this vector version of Zonal Stats? And how stable is your tool that you don't feel comfortable putting up on the forum? I may not be of help testing b/c I'm not much of a python programmer (I'm self taught modelbuilder and know very little python and even less VBA). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Danny&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Danny&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 18:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668583#M9677</guid>
      <dc:creator>DanielSheehan</dc:creator>
      <dc:date>2011-09-15T18:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668584#M9678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just found this post.&amp;nbsp; Jamie's script worked great.&amp;nbsp; I am using this for zonal stats in a parcel model so only have a small subset of overlapping tax parcels (condos only).&amp;nbsp; In my case, I do an intersect with just one input (the parcel layer) to extract only the overlapping condo tax parcels. I added this to the beginning of Jamie's script,&amp;nbsp; then process only these parcels with the script.&amp;nbsp; In a second model, I do a selection to subtract these condo tax parcels form the county wide parcel feature layer.&amp;nbsp; I can then do a regular zonal statistics on the feature layer for all the remaining non overlapping polygons.&amp;nbsp; Just thought I would share this as a way to speed up the process if your dataset has a small subset of overlapping polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#create overlapping polygons with intersect tool (intersect with self to get overlapping)
arcpy.Intersect_analysis([inputParcelLayer],FeatureZone,"NO_FID","","")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668584#M9678</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2021-12-12T04:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668585#M9679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Curtis,&lt;BR /&gt;&lt;BR /&gt;It is the garbage collection module.&amp;nbsp; We were running into some memory issues after several iterations of the tool.&amp;nbsp; The garbage collection module clean up unreferenced objects in memory.&amp;nbsp;&amp;nbsp; Take a look t this link.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/library/gc.html"&gt;http://docs.python.org/library/gc.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jamie&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was interested to see this thread as I have written a script to handle overlapping polygons for zonalstatistics and have been experiencing similar memory issues with iterations and subsequent crashes.&amp;nbsp; I enabled the garbage collection as in your script, but am still have issues.&amp;nbsp; Can you suggest any further solutions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jill&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 03:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668585#M9679</guid>
      <dc:creator>jillianthonell</dc:creator>
      <dc:date>2011-11-22T03:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668586#M9680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Did you find any solution?&amp;nbsp; As we have added more overlapping parcels to our feature class (we now have 860), I too seem to be running into memory issues.&amp;nbsp; My script was crashing, so I added another loop that uses a smaller cursor and repeatedly deletes the searchCursor.&amp;nbsp; It no longer crashes, but interestingly enough, a "zone" is processed in about 20 seconds at the outset, and then towards the end of the 800 features, it slows down to about 5 minutes to process one zone.&amp;nbsp; Below is the python code that I am using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#create overlapping polygons with intersect tool (intersect with self, only creates partial parcels where overlapping)
arcpy.Intersect_analysis([inputParcelLayer],FeatureIntersect,"NO_FID","","")

#make feature layer, join with self intersected parcels, use result as overlapping parcels for zonal stats
arcpy.MakeFeatureLayer_management(inputParcelLayer,"parcelsoverlap")
arcpy.AddJoin_management("parcelsoverlap","APN",FeatureIntersect,"APN","KEEP_COMMON")
arcpy.CopyFeatures_management("parcelsoverlap", FeatureZone)


tempDIR = arcpy.GetSystemEnvironment("TEMP")
#create scratch workspace name
tempWorkspace = "tempWorkspaceForZonalStats"

if not arcpy.Exists(tempDIR + os.sep + tempWorkspace):
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateFolder_management(tempDIR, tempWorkspace)
arcpy.env.workspace = tempDIR + os.sep + tempWorkspace

#input variables
strFIDname = arcpy.Describe(FeatureZone).OIDFieldName
zone = "zone"

arcpy.env.cellSize = 2 #needed to reduce cell size because zonal stats crashes if the polygon is smaller than raster resolution
gc.enable()&amp;nbsp; #enable garbage collection
arcpy.CheckOutExtension("Spatial")
cellAssign = "CELL_CENTER"
priority = "NONE"
newSelection = "NEW_SELECTION"

# Make a layer from the feature class
arcpy.MakeFeatureLayer_management(FeatureZone, zone) 
#Loop through features
numFeats = int(arcpy.GetCount_management(FeatureZone).getOutput(0))
groups = []
bracket = 30
while(bracket &amp;lt; numFeats):
 groups.append(bracket)
 bracket = bracket + 30
groups.append(numFeats+1)
for x in groups:
&amp;nbsp;&amp;nbsp;&amp;nbsp; whileClause = '"OBJECTID" &amp;gt;= ' + str(x-30) + ' and "OBJECTID" &amp;lt; ' + str(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print whileClause
&amp;nbsp;&amp;nbsp;&amp;nbsp; inRows = arcpy.SearchCursor(FeatureZone,whileClause)
&amp;nbsp;&amp;nbsp;&amp;nbsp; #inRows = arcpy.SearchCursor(FeatureZone)
&amp;nbsp;&amp;nbsp;&amp;nbsp; inRow = inRows.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; while inRow:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #selct the fid to process
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strID = inRow.getValue(strFIDname)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ' processing objID: ' + str(strID) + 'of ' + str(numFeats) + ' total features.'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strQry = '"%s" = %s' % (strFIDname, strID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management(zone, newSelection, strQry)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #create a unique name for the zone
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueZone = arcpy.CreateUniqueName("zone.shp", arcpy.env.workspace)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueTable = arcpy.CreateUniqueName("ZSasT", arcpy.env.workspace)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #create a temporary feature to use for zonal stats as table
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(zone, uniqueZone)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outZSaT = ZonalStatisticsAsTable(uniqueZone, joinField, valueRaster, uniqueTable, "NODATA", "ALL")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #move to next record.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inRow = inRows.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; del inRow
&amp;nbsp;&amp;nbsp;&amp;nbsp; del inRows
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668586#M9680</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2021-12-12T04:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668587#M9681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Interestingly enough, a "zone" is processed in about 20 seconds at the outset, and then towards the end of the 800 features, it slows down to about 5 minutes to process one zone. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My experience is that the gp/arcpy scratch name methods can be very slow when the workspace in which you are generating scratchnames gets full of many files. This can slow down all tools!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may get better performance if you just create an empty folder/workspace and generate names using sequence numbers. I have gotten in the habit with my general purpose script tools (like the [post=124423] NAWQA toolbox[/post]) of creating a temporary folder and workspace so I don't need to worry about file name collisions and can avoid waiting for the scratchname method!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 17:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668587#M9681</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-02-17T17:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668588#M9682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Curtis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Thanks for your reply.&amp;nbsp; That improved performance greatly.&amp;nbsp; I just moved my temp directory creation inside the loop so that a new directory is created for every loop iteration (every 30 feature clasess), and now it is on target to finish in about 3 hours rather than 30.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for x in groups:
&amp;nbsp;&amp;nbsp;&amp;nbsp; #create the tempworkspace
&amp;nbsp;&amp;nbsp;&amp;nbsp; tempWS = tempWorkspacePrefix + str(tempWorkspaceSuffix)
&amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists(tempDIR + os.sep + tempWS):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateFolder_management(tempDIR, tempWS)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = tempDIR + os.sep + tempWS
&amp;nbsp;&amp;nbsp;&amp;nbsp; while......................(rest of the loop as in my previous post)
tempWorkspaceSuffix = tempWorkspaceSuffix + 1;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668588#M9682</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2021-12-12T04:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table: Overlapping Polygons: Solution Required</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668589#M9683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am running into memory issues as described in this thread.&amp;nbsp; I see where Curtis and Sebastian recommend and provide coding to create a temporary folder/workspace but am not sure how to work that into the python code I am using. To use ListRasters, I had the impression that you needed to set the env.workspace to the folder containing the raster files.&amp;nbsp; My python code is below....any suggestions on how to modify this code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I should add that sometimes this script runs and sometimes not.&amp;nbsp; I think the issue is memory but just saw something about a search curser.&amp;nbsp; Not sure what that is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jodi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os, tempfile, shutil, sys, time, traceback
from arcpy import env
from arcpy.sa import *

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Set the current workspace, this is folder that contains the .tif files for climate variables
arcpy.env.workspace = "F:\\Data\\Reg09\\tifs"

# Set Geoprocessing environments
arcpy.env.overwriteOutput = True

#Set Local variables
region =('F:\\Data\\NHD\\grids\\reg09_lambi')&amp;nbsp; # this is the folder with the NHD catchment grid (raster)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
out = "F:\\Data\\Reg09\\update\\"
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
rasterList = arcpy.ListRasters("*", "TIF")

&amp;nbsp;&amp;nbsp;&amp;nbsp; 
for raster in rasterList:
&amp;nbsp;&amp;nbsp; name = os.path.basename(raster).strip(".tif")&amp;nbsp; # removes .tif from the file name
&amp;nbsp;&amp;nbsp; arcpy.env.cellSize = "MINOF"
&amp;nbsp;&amp;nbsp; arcpy.gp.ZonalStatisticsAsTable_sa(region, "VALUE", raster, out+name+".dbf","DATA", "ALL")
&amp;nbsp;&amp;nbsp; print" Raster " + str(raster) + " processing completed at " + time.asctime( time.localtime(time.time()) ) 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-overlapping-polygons/m-p/668589#M9683</guid>
      <dc:creator>JoannaWhittier</dc:creator>
      <dc:date>2021-12-12T04:15:26Z</dc:date>
    </item>
  </channel>
</rss>

