ArcGIS Pro 3.4.0
I am working on a project that I was hoping could be automated. I have a DEM file, and I want to get a list of local peaks from it. Find Peaks and Valleys didn't really work for me because it gave me 50 points within about 100 yards of each other. At this point I already have the data I was looking for because I brute forced a very inelegant solution, but it was a real pain to get, and I'm trying to figure out if there's an easier way. My current idea is to use Find Highest or Lowest Point with a boundary polygon, create a buffer from the point, clip the buffer from the boundary polygon, and then find the next highest peak. My hope was that I could create a loop that would finish once the area of the boundary polygon hit zero, but I can't figure out how to create a loop with dependent variables. Any advice is appreciated as this has become my white whale.
It sounds like you want a While iterator.
https://pro.arcgis.com/en/pro-app/3.4/tool-reference/modelbuilder-toolbox/while.htm
There is an example of a While iterator here: