I have a set of points (several independent files of different regions) and I want to make a selection according to a set of polygons (multiple files that form pairs with the points files). I want to use them to select by location through modelbuilder.

I want to inform only once the arguments, as is done, for instance, on batch processing. I have two interdependent arguments: each point layer/file should be selected by it's corresponding polygon layer/file (mask).

Is there a feature in the modelbuilder for this purpose? Any suggestions?

enter image description here


Use Iterate Feature Classes to iterate over the features classes in the folders:

Iterates over feature classes in a Workspace or Feature Dataset.

Learn how Iterate Feature Classes works in ModelBuilder

| improve this answer | |
  • I didn't get how to inform which target file (point) correspond to each mask file (polygon). They are not in a same layer separeted by attributes, but in different files. I keep trying to make this model works. Thank you. – Rodrigo Paiva Oct 10 '16 at 19:26
  • You dont need to when they are sorted the same in the folders as in the screenshot – BERA Oct 10 '16 at 19:28
  • You can also run model in batch mode: Right click the blue inputs and set as parameters, save and close the model, right click the model and run in batch mode. You can now specify multiple inputs – BERA Oct 10 '16 at 19:37
  • I was able to make batch option, but it results error. I was unable to perform the option with "iterate classes". 1) Batch option - I prepared the model by selecting the shapefiles as parameters. When I run individually it works. When I use the Batch option, It is created the play list, ok. But when I execute, seeing the log, the processing seems to be out of order (executes all "make layers", then all "select by location", and don't give back a coherent result). Do you know why does it happens? – Rodrigo Paiva Oct 10 '16 at 20:58
  • 2) I was not able to create the model with "Iterate Feature Classes". I have two folders (workspace) - points and mask. The Iterate Feature Classes seems to only accept one workspace at each time. I don't know if I have to add 2 Iterate Feature Classes (the modelbuilder does not allow) or if I should put both folders as subfolders of a single one and then divide them at the entrance of "select by location" (not sure how). – Rodrigo Paiva Oct 10 '16 at 20:58

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.