AnsweredAssumed Answered

Error calculating raster percentiles by polygon boundaries

Question asked by fbiles_usfs on May 7, 2019
Latest reply on May 10, 2019 by xander_bakker

Xander Bakker#

 

Hello,

I've been trying the last 2 days to successfully run the python code kindly developed by Xander Bakker here.  I used the script further down in that thread posted by 'Extractor' dated Jan 25th, 2019.  I am using an elevation raster that has been converted to an integer type. The polygon layer is a feature class in a file geodatabase. Both the raster and feature class are in the same projected coordinate system.

 

The code runs great for awhile, then I get the error posted in the following screenshot:

Any ideas what is causing the error?

The only thought I had is that the polygon layer is watershed boundaries. Some of the polygons are nested within larger polygons. Could this be the issue? The code successfully processed 2 polygons where one was a subset of the other (polygons 3 and 4). Polygon 12 finished successfully - 12 is a small watershed nested inside polygon 13. The code failed on polygon 13. When viewing "ras13" it looks correct; however, no attribute table was created. I verified that "ras13" is an integer raster. Perhaps the behavior of crashing on nested polygons is unpredictable, or perhaps it is not the cause at all? 

 

The only other thing that makes this polygon area different from the others is it is the largest of the set.

For "ras13":

 

Any help is appreciated,

Frances

Outcomes