In ArcGIS 10.3.1 ArcObjects, Zonal Statistics As Table throws ERROR 999999: Error executing function. when the input feature class has no features that intersect the input raster (as nearly as I can figure out the cause, anyway).

Since I am executing this operation programmatically, I need to detect this situation and handle it differently in code. How can I efficiently determine if the feature class has at least one intersecting feature?

  • 2
    Have you tried constructing a polygon from the image envelope corners and using that in a spatial query? – Vince Jan 27 '16 at 5:01
  • @Vince I hadn't at the time. It appears to work and be quite fast (less than 5 seconds to check a nearly worldwide feature class with around 150,000 records against about 60 rasters). My apologies for the poor question. I really should have done more research and tried more first. I was frustrated and tired at the time, and I have been fighting these sorts of problems with ArcObjects for literally a couple months. – jpmc26 Jan 28 '16 at 7:35
  • Using ArcObjects perks up my frustration threshold, too. So, if the solution is simple enough, you can post it as a self-answer, or you can drop the question. – Vince Jan 28 '16 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.