Iterating using max raster value as criteria to stop model

Discussion created by MBoucher21 on Mar 7, 2013
Latest reply on Mar 9, 2013 by curtvprice
I've got a model working as I want. I use the while iterator to keep it going until I can visually see it is time to stop. Then I manually stop it with the Cancel button. In this model, the final output raster is written over the input raster.

What I want to do is test the maximum value in the resulting raster and stop the iteration if the max value does not equal -999 (the value in the cells is -999 they need to be changed). This model takes a raster of
infiltration rates gained from other sources that are mosaiced and then modifies it to fill in "holes" iterating again and again until the holes are filled in. The holes are filled in by using the maximum value surrounding the cell (8 directions). This is not a "fill sinks" issue in a DEM.

I can't figure out how to make the "while" or "if" iterators work with raster statistics (max cell value).

Any thoughts or suggestions?