michalis

ZonalStatistics Generates temporary files in scratch workspace and not memory?

Discussion created by michalis on Dec 30, 2011
Latest reply on Jan 3, 2012 by jskinner-esristaff
I am attempting to run ZonalStatistics on a number of generated buffers (around 100,000) and record my results in a table.

I have managed to restrict myself to memory mostly, meaning the buffer files are generated in memory, passed on to ZonalStatistics as a memory feature class and it runs great. My problem is that zonal statistics, while it returns a variable to use in Python, also generates files in the scratch workspace. This is a big problem, as I run multiple zonal statistics per buffer (multiple source rasters) and with 100,000 buffers, this becomes a very big bottleneck for me.

Is there any way to set the output of Zonal Statistics to be completely in memory?

Or to set the whole scratch workspace in memory?

I know that the arcpy.gp.ZonalStatistics_sa that is called when you call zonal statistics has an out_raster parameter, but it is hard coded to "#" so i can't change it.

Thank you in advance.

Michalis

Outcomes