Communicating between a sub model and parent model?

429
5
Jump to solution
02-08-2018 08:16 PM
SimonWebster
Occasional Contributor

Hi All,

I have a scenario where I have a set of shapefiles, and a set of rasters, and I need to clip each raster with each shape file.

For example:
Raster 1 is clipped with Shapefile 1

Raster 2 is clipped with Shapefile 1
Raster 3 is clipped with Shapefile 1
Raster 1 is clipped with Shapefile 2
Raster 2 is clipped with shapefile 2, etc.

I've had a read here: http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/integrating-model-within-a-model.htm but I'm not quite getting it.

I'm quite lost with where to start putting the two together. As in, does the clip go in the parent model, or the sub model? What needs to be parameterised?

0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

Have a look at this discussion over on GIS SE. It gives you an example of how to pair names using model builder.

View solution in original post

5 Replies
DuncanHornby
MVP Notable Contributor

Have a look at this discussion over on GIS SE. It gives you an example of how to pair names using model builder.

SimonWebster
Occasional Contributor

Thanks. That's fairly much what I needed

0 Kudos
ChrisDonohue__GISP
MVP Alum

Since it appears two Iterators will be needed, one way to approach this would be to employ 3 models:  1 each for the iterators and a connecting model where the first iterator model would be linked to the second iterator model.  In this scenario, probably the best place to put the Clip would be in the model with the second iterator.

A different approach that may work would be to employ Lists.  I have not done much with this approach myself, but it looks promising.

ArcGIS Help 10.1 

Chris Donohue, GISP

SimonWebster
Occasional Contributor

You're right, this is a method that would work. That said I rather like the idea of building an iterative method that is somewhat more resilient to upstream changes. For example, if we introduce another category as policy changes, then we go from 9 items, to 12. In this case an iterator that can cycle through the rasters (or polygons for anyone using that search term in future) would be able to adapt to that approach, where a list would require manual intervention. 

Still, good suggestion and a method I wasn't aware of. Thanks. 

0 Kudos
AbdullahAnter
Occasional Contributor III

How many raster that you want to clip and how many shape files will be used ?

0 Kudos