In the Select by Location dialog you can select multiple Target Layers. However it would often be very helpful to be able to select multiple Source Layers.
Example I want to select all service locations that intersect A phase Secondary Overhead an Underground. Secondary conductors are in 2 separate layers. In order to perform the select by location it needs to be run twice and switching to Add to currently selected features.
You can see this url for solution: http://www.hakankocaman.com/multiple-select-by-location-for-feature-count
Link is not english, he can't understand. I examine your tool, it is completely irrelevant with issue. You are using cursor and select tool in a loop. However, he demand a tool for selecting multiple sources like in ArcObjects.
You can use the Select Layer By Location geoprocessing tool in batch mode with the Selecting Features parameter used as the batch parameter to select multiple layers. As you mentioned, remember to specify the "Add to currently selected features" Selection Type so that each successive selection adds to the overall selected features.
@MargaretCrawford could you please explain the Batch mode in more detail. I have the same question about using multiple Select By layers in Select Layer by Location. I want to create a select by location for a polygon layer using a set distance from a line layer (streams) and also a another polygon layer (lakes). I want the resulting feature selection to contain all of the input polygons which are located within 500 feet of my stream layer as well as all of the input polygons which are located within 500 feet of my lake layer. It seems like a basic geoprocessing tool that should be available but I cannot find a way to do this without going though multiple workflows each time. Since I have to repeat this process over 50 times, it would be great to find a tool for this.
Hello @RobinHolland thank you for the question. Geoprocessing tools can be run in batch mode, which allows you to run the same tool multiple times using different input datasets or parameter settings. When you create a batch tool, you can choose the parameter that will drive the batch process, this is the value that will change each time the tool runs. All the other parameters will remain constant for each run.
In your example, here is how you can use a batch tool:
Note: Use Add to the current selection for the Selection Type, so that each successive selection adds to the overall selected features.
You can learn more about the Batch geoprocessing in the documentation: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/batch-geoprocessing.htm
Thank You! The procedure you sent seems to have worked. I was missing the final piece of choosing Add to the Current Selection. When I ran it with New Selection yesterday, I only got a selection of those features which were located within 500 feet of a stream and a lake both. Today with Add to the Current Selection, I finally got the full selection of those features located within 500 ft of a stream OR a lake. Interesting thing to note is that even though it worked, I did get a warning stating the selection type of Add to Selection was not valid.
It still selected the number of features I was expecting, so I am not sure why it gave me the warning. Thank you for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.