Zonal Statistics as Table: Overlapping Polygons: Solution Required

18484
63
08-09-2011 07:01 AM
Highlighted
Regular Contributor
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.

Regards
63 Replies
Highlighted
New Contributor III
Take a look at the attached tool.   It will allow you to do zonal statistics as table on overlapping polygons.  you can add this tool directly to ArcToolbox.

Jamie
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
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.

USGS Open-File Report 2010�??1268
National Water-Quality Assessment (NAWQA) Area-Characterization Toolbox
By Curtis V. Price, Naomi Nakagaki, and Kerie J. Hitt

http://pubs.usgs.gov/of/2010/1268/

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.
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
Hey Jamie - what's this (from your script tool):

import gc
# ...
#enable garbage collection
gc.enable()


Does this help with looping geoprocessing tools that seem to eat up memory and crash your session?
Reply
0 Kudos
Highlighted
Regular Contributor
Hi Jamie

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.

Regards
Reply
0 Kudos
Highlighted
Regular Contributor
Hi Curtis

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.

Regards
Reply
0 Kudos
Highlighted
New Contributor III
Hi Curtis,

It is the garbage collection module.  We were running into some memory issues after several iterations of the tool.  The garbage collection module clean up unreferenced objects in memory.   Take a look t this link.

http://docs.python.org/library/gc.html
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
It would be greatly appreciated if you would be willing to email me a copy for ArcGIS 10.


Peter - please email me (contact info in in my sig below)
Reply
0 Kudos
Highlighted
Regular Contributor
Peter - please email me (contact info in in my sig below)


Hi Curtis

My contact details are : Peter.Wilson@aurecongroup.com, Thanks

Regards
Reply
0 Kudos
Highlighted
New Contributor II
Jamie, will this run a lot longer than the regular Zonal Stats (it is right now for me, not sure if its working)?

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.

Thanks,
Danny
Reply
0 Kudos