3

I need to do exactly what the help topic http://resources.arcgis.com/EN/HELP/MAIN/10.1/index.html#/Select_By_Location_Select_based_on_spatial_relationship_within_the_layer/0017000000tr000000/ says can be done, but they do not include the model architecture:

The Select Layer By Location tool allows the Input Feature Layer to be the same the layer specified in theSelecting Features parameter. A useful application of this behavior is to select adjacent, connected, or nearby features within a layer. Different Relationship options can be used to generate the desired analysis or result. For details of how the Relationship options differ, see Select By Location: graphical examples.

A loop inside a script or the For or While iterators in ModelBuilder can be used in conjunction with this approach to expand a selection based on a number of iterations or until some criterion is met. One common criterion is expand until no new features are added to the selection. The Get Count tool can be used to establish when the number of selected features stops changing (therefore stops growing).

Could someone show me how this type of model is put together?

I'm especially having trouble determining where I can put GetCount functions in the model to get numbers of selected features before and after each Select by Location, and also figuring out where to put a While iterator (if indeed that is the correct iterator to use) so that only the Select by Location process is repeated and not the entire model.

  • I don't know modelbuilder well, but I can give some pointers. You will need to set it up in a variable, if/then/else check, and iterator. Variable gets assigned (count or something), if/then/else checks for count = something, if it is continue, else hit the iterator and run your select by location and loop back to the if/then/else. I am sure if you Google each of these concepts you'll come up with a process. You may need to set up a temp layer to store selected features to be used as a layer in select by location. – Branco Sep 29 '15 at 15:48
  • I've googled my butt off, and I keep finding post lamenting the fact that there are no good examples, like: gis.stackexchange.com/questions/41702/… and gis.stackexchange.com/questions/162343/… and geonet.esri.com/thread/63571 Again, I really just need to see the model structure for exactly what Esri describes in their help topic. – Andrew Zimba Sep 29 '15 at 15:56
  • Figured it out finally. Have to make a submodel that does the initial selection, then a submodel that does the select by location, set up your input and output parameters for each submodel correctly, and then hook them together. – Andrew Zimba Sep 29 '15 at 17:26
  • 2
    Post that as an answer and accept it. Include a screenshot or more detail if you could for others who may find this question while searching here. – Branco Sep 29 '15 at 17:51
2

Figured it out finally. Have to make a submodel that does the initial selection, then a submodel that does the select by location, set up your input and output parameters for each submodel correctly, and then hook them together.

Full model Sub-models

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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