I have a model which at one point uses the Extract by Attributes tool to produce a new raster with just the areas containing the maximum values of the first.
I would think that the SQL expression would go something like:
"VALUE" = (SELECT MAX("VALUE") FROM in_raster)
No matter what combination I try of expression it always comes up invalid.
I always have to run the model up to the point of this tool, then GET UNIQUE VALUES by hand in the sql builder window to input something like
"VALUE" = some_number
Then it works fine. The rest of the model runs and I get the correct output.
I did try with Zonal stats but the output at the end of the model is not correct when I do.
Is there a way of automating this perhaps with some python or another set of tools?
I have a number of initial values I need to iterate through for this model and I want the whole thing to be able to run without me having to do that step manually.
Thanks in advance