I'm working on a model that processes lidar data from a public layer file, one quadrangle at a time, as I don't have a powerful enough machine, or enough storage to do it all at once. I am looking for cliff bands based on slope, through raster calculator I convert the slope layer into a binary representation, showing only areas above a certain steepness threshold, next I contour the binary slope representation, buffer the contours, then am performing zonal statistics on the buffered contours. The issue I'm running into, is that if there are no cliffs I get an error at the zonal statistics, because of an empty feature class.

Is there a way to make my model move to the next iteration when a particular error arises, so that I may process my whole area of interest, despite some of the individual chunks I analyze have no cliffs/will produce an error?

WARNING 000953: Extent of the overlay operation will be empty.
WARNING 000117: Warning empty output generated.
Succeeded at Fri Jun 22 14:27:16 2018 (Elapsed Time: 0.66 seconds)
Executing (Zonal Statistics): ZonalStatistics "C:\Users\NAME\Desktop
Start Time: Fri Jun 22 14:27:16 2018
ERROR 999999: Error executing function.
The table was not found. [VAT_DEMCLP2]
ERROR 010151: No features found in C:\Users\NAME\Desktop
Possible empty feature class.
Failed to execute (Zonal Statistics).

enter image description here

  • you can export your model as python script and add error handling there
    – Moh
    Jun 22 '18 at 21:39

In all honesty I think this is one of the reasons I stopped using Model Builder, and started working directly with python. Error checking is generally much easier to handle in python...

That being said, I'm wondering if you can incorporate some sort of if/then logic to create error checking with model builder tools? I'm not too familiar with these specifically, but it looks like you might be able to test for the existence of a feature class, then create two paths in the model for handling if it exists or not?




Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.