Select to view content in your preferred language

ArcGIS 10.0 - Iterate Issue

1588
8
11-25-2014 02:49 PM
JoeFaliti
Deactivated User

Hi,

I have not used iterators too much but according to what I have read, the tools you want to run with each iteration go into a single model and the tools that you want to run differently than the iterator need to go into a "main" model and the iterator in a submodel.

I conceptualize the process I am trying to develop as iterating all tools; however, when running the model, it returns some outputs as expected, while others are not.

The first part runs fine, selecting polygons grouped by a field value.  Then it saves each to layer file.

When I add a select by location tool, using the same input layer and the inline variable of the individual grouped by layers (%Value%) as the selecting features, it works, but not correctly for every iteration.

I have some more processes down stream, but this is where it seems to go wrong.

Please see the two screen shots...

Thanks for any advice 🙂

-Joe

Tags (1)
0 Kudos
8 Replies
ChrisDonohue__GISP
MVP Alum

Quick question to help clarify this - is the input labeled "InZips (3)" the same as the input "InZips"?  It looks like you stated that above, but I wanted to confirm it.  The reason I ask is twofold:

1.  If it is the same, usually it would be connected to the first input ("InZips").

2.  The other reason is the Select By Location appears at first glance to be unneeded.  The features are already selected, and how it is set up now seems to reselect the already selected features.  I suspect I am missing something obvious, or there is another intent to this.  Can you clarify what the Select By Location is for?

Thanks,

Chris Donohue, GISP

0 Kudos
JoeFaliti
Deactivated User

Hi Chris,

Thanks for the response.  To clarify, the iterator selects and creates seperate layers based on like named features.  The select by location tool is meant to select the adjacent polygons and then save those to layer files as well.

Thanks again!

-Joe

0 Kudos
ChrisDonohue__GISP
MVP Alum

That helps.

Just a thought - maybe try the Select By Location directly off "I_InZips_Name" instead of the layer file.  Layer files have some unusual properties and are sometimes problematic when doing analysis.

Also, can you mention what the characteristics are of the results that didn't work?  What exactly about them is unexpected/not working?  This will help in troubleshooting.

0 Kudos
JoeFaliti
Deactivated User

Thanks, I'll try skipping the save to layer step.

The trouble is that 118 of the 311 outputs have all features selected.  This is coming from the select by features, or the layers that you advise not to save.

I will try again without saving the %Value%lyr(s).

Thanks again!

-Joe

0 Kudos
ChrisDonohue__GISP
MVP Alum

The lyr files can still be saved if you want.  What would change is the model would branch instead of being linear.  One branch off I_InZips_Name would go to the Save to Layer File, another branch off I_InZips_Name would go to Select By Location.

Anyway, see if it helps to do the direct feed from I_InZipsName to the Select By Location - that's the critical part to troubleshoot first, as it looks to be where things are going awry.

0 Kudos
JoeFaliti
Deactivated User

The suggested branched method yields the same result.NoLyr.png

0 Kudos
ChrisDonohue__GISP
MVP Alum

Another idea - review the Select Layer By Location "Selection Types (optional)" to see if the setting is not the appropriate one.  It may be that it is defaulted to a different setting than needed.

SelectLayerByLocation.jpg

0 Kudos
JoeFaliti
Deactivated User

Chris,

I believe the setting is correctly configured to NEW_SELECTION.

Thanks for the suggestion.

-Joe

0 Kudos