2

I am currently struggling with two issues in ModelBuilder both dealing with iterators. First I have situation where I have two model (Model1 and Model2). Both of these models produce a series of raster outputs (Model1_A, Model1_B, Model1_C...) and (Model2_A, Model2_B, Model2_C...). I need to sum the outputs from each model together so that Model1_A get added to Model2_A, Model1_B to Model2_B ect. as paired inputs. Is there a way to do this using iterators in ArcGIS Pro (Esri removed the run variable as list option from ArcGIS Pro). Additionally how would I create a workflow where every possible combination of outputs from Model1 and Model2 are summed?

Model for iterating through the first input dataset!enter image description here

enter image description here

3
  • 1
    I think it would be useful if you add a picture of both models to see how they are exactly linked to each other.
    – Jelle
    Commented Mar 12, 2015 at 21:08
  • Hi Jelle, I just uploaded the requested images!There are two larger models that generate the datasets that models A and B iterate through, this iteration is controlled using wildcards.
    – rhg9
    Commented Mar 14, 2015 at 20:15
  • Great, this gives me a better idea what you want to do. I would suggest a similar, if not, identical approach as the answer given below, but is that what you are looking for / possible within your datasets? Are all your data inputs for both both models located in the same workspace?
    – Jelle
    Commented Mar 14, 2015 at 23:06

1 Answer 1

1

I would like to suggest a way to work this out (refering to your first question), yet without more information about your workspace it will remain abstract. Anyhow this Solution assumes you save all Raster: Model#_A and Model#_B within the same dataset/folder. It also assumes that the number of A tyoe raster equales the number of B type rasters.

Consider using a for loop from 1 to N, and using its value to constract both raster names. Those will be variables as well that will be used in raster calculator to sum the raster. Here is an image of a possible model. Complete model

That is where:

  • For is from 1 to N (number of rasters) by 1
  • RasterNameA or B syntax is (A and B changes respectively):

    Model%ForLoopVal%_B

  • Calculator Syntax is:

    "%RasterPathA%" + "%RasterPathB%"

  • and Path for calculator output ends with the desired path and name and the ForLoopVal variable to relate it to the input rasters.

Update if it works

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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