Zonal Statistics as a Table 2

820
2
06-07-2018 12:11 PM
KaraChung1
New Contributor

We've successfully executed zonal statistics as a table 2 (from the spatial analyst supplemental tools) on one of our map files to extract a mean NDVI value from 250 m buffers - with some polygons overlapping each other. This map file is rather large and holds a lot of data - since we have used it to do testing on different processing in the past. Due to this, we decided to start over and only import and run necessary steps to extract the data we want. In both files we started with the exact same tifs and shapefiles before further processing. Trying to run the tool on this new map file no longer works. It runs as if it were the same as the original zonal statistics tool. I've double checked that the geoprocessing environment is the same.

Looking at the script the tool looks like it tries to run the code that allows for overlapping polygons and if it can't then it runs the normal version. I script is a little dense so I'm not 100% sure that this is true. I've attached the python script for reference. Does anyone have any ideas as to why for this new file it runs the exception/normal zonal statistics tool but for my older/larger file it runs correctly? 

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Kara... Before the script can you show the data and results, expected and obtained to help clarify the question

KaraChung1
New Contributor

I've attached the buffer shapefile as well as a clip of our results (both the time the tool worked and the time it did not). I am not able to include the raster data as that would give protected information away for the participants in our study - the raster data is just an NDVI map of a county in Wisconsin.

The area calculated for each buffer should be ~ 198000. Some are expected to be a little less than that due to the fact that we masked all water out of the NDVI layer. The time that it worked this statement held true. However, when we tried to run it again some of the calculated areas were as low as 15300 due to the amount of overlap among some of our buffers.

I used the exact same buffer shapefile both times and the exact same landsat data to create the NDVI layer. The only thing that I can foresee as being different is the workspace and I didn't change any geoprocessing environment variables. Let me know if there's any other information I could give that might be useful!

0 Kudos