1

I have three geodatabases (176 files each) with raster data. let's call the first one as G, the second one as D and the third one as S. Now I want to perform a raster calculation so that the G1-D1-S1.... then G2-D2-S2 and so on

I think I would need two submodels (one submodel that will iterate through D files, and the other one which will iterate through S files) and one main model which will iterate through G files and then perform the calculations and then save the results in a new geodatabase .

The problem is I don't know how to do that.

enter image description here

enter image description here

1 Answer 1

1

Looping across multiple workspaces is complex and difficult to implement in modelbuilder. If you want to work in model builder I think a simpler solution is to iterate over your numbers 1 to 176 using a For iterator. This generates a number which you can use in 3 model only calculate value tools to construct full path names to you G, D and S rasters. Then using inline variable substitution you can Make raster layers and use those in your downstream processing.

1
  • Thank you for your answer can you please illustrate how can I do that?
    – Martin Sam
    Commented Nov 14, 2019 at 20:43

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.