1

I'm having a problem with a process model I'm building.

Model iterator module

Main Model contents

The process is as follows;

A series of float img files are iterated and converted to raster files .img

These files are then run through the raster calculator and saved as a file %Name%_100.img

The 100.img files are then run through a Int math tool and saved with the suffix _Int_100.img

ok so here's the bit that the model falls over at - I need to clip these Int_100.img files using their respective shapefiles ie riverbody1A_Int_100.img needs to be clipped with the corresponding riverbody1A.shp file (also the use input features for clipping parameter needs to be used) and the same for each file ran through the process.

These clipped files are then converted from raster to polygon

Is this something that can be done with iterators & model builder?

Am I on the right track or do I need to start over?

The main problem i seem to have is that nested models with iterators in them seem to just iterate their files all at once, instead of iterating one file per run of the entire model

Is this a bug or am I just not using iterators and nested models the right way?

closed as too broad by PolyGeo Sep 18 '18 at 6:53

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Du you reuse %Name% to reference the shapefile used as clip features? Why do you need a nested submodel? – GISGe Mar 10 '15 at 11:08
  • Thanks for the reply, Yes I have the files saving as %Path%\%Name%.img or %Path%\%Name%._100.img etc in each step. The nested submodel I included so that it would iterate the corresponding shapefile from the folder containing the shapefiles and therefore when the model was run and the files were named correctly ie riverbasin1A_100_Int.img etc then riverbasin1A_100_Int.img would be clipped with the iteration of riverbasin1A.shp from the nested model as I cannot have 2 instances of an iterator in the main model and the second iterator has to be in the nested submodel. – Keaden Mar 10 '15 at 15:54
  • You are correct that you cannot have two iterators in a model. It should also be pointed out that the entire model is run for each iteration. You may need a second sub-model. Your second to last paragraph sparked a memory about similar issues and questions I've seen in the past. This one in particular, with its distinction of iteration vs batch run, might be helpful: gis.stackexchange.com/questions/84989 – Chris W Mar 11 '15 at 4:43
  • You might want to consider venturing into the realm of arcpy. You can use a function called List.Rasters() to iterate over rasters in a folder. It's a bit of a learning curve, but you'll find it powerful once you get the hang of it. – Rachel Rotz Jul 17 '18 at 3:22
  • Rachel,Thanks for the reply I'll have to have a sit down and try to get my head round that. Much appreciated. – Keaden Jul 25 '18 at 10:57