In ArcGIS (10.2) Model Builder, I am using the raster calculator to select a subset of cells from a temperature layer (a range between a max and min value). My expression reads as follows: Con(("%temp%" >= 7.25) & ("%temp%" <= 11.375), 1,0), where "%temp%" represents my temperature layer. In plain English, I am asking it to select cells with a temperature value between 7.25 and 11.375. The expression works fine, however, I will need to repeat this process multiple times, and each time the max and min temperature values will change. Instead of inputting the values manually, I have been looking at calculating my temperature values with zonal statistics (this part works fine) and then using the output of the zonal statistics to give the max and min temperature values. For example, I have tried Con(("%temp%" >= "%min%") & ("%temp%" <= "%max%"), 1,0), where "%min%" and "%max%" represent the output of the zonal statistics. Unfortunately, I am having no luck!

  • You could try batch processing (desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/…) and input the values manually. Another way would be to switch from a model to python. It will give you much more flexibility. For example using output from zonstat as input. To get started with with python see for example this question: gis.stackexchange.com/questions/163368/… – BERA Nov 28 '17 at 9:12
  • Assuming your zonal stats has created a table with many rows and two columns which are your min and max values then you would use the row iterator and get field value tools to pull out your min and max values which you can then use in your CON tool with the inline substitution. So your first place to go to is the help file and research about iterators. – Hornbydd Nov 28 '17 at 9:56
  • Ok - I'll take a look and come back with a response! – tea4two Dec 1 '17 at 19:20

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.