Find neighboring polygons which share a common feature in ArcMap 10.4

adjacencyarcgis-desktoparcmapnearest neighbor

I am currently using ArcMap 10.4.

My task is to find which polygons share a border given a specific feature. I would like to automate this workflow.

For instance, I have 2 polygon feature dataset (check the figure 1): one with regions (blue border) and the other one with bridges ( pink). I want to find out which regions have in common a bridge.
I used the Polygon Neighbors but this gave me, as a result, all the neighbors that one region has, for instance, (figure1): the region 10 has as neighbors: 9 and 11, however, what I need is to get ONLY the neighbors with shared bridge: in this case, for the region 10, I will need ONLY as result, the region 9, because there is a bridge on the shared border between 9 and 10.

For region 9, I need to get 10 and 11, because 9 shares a bridge WITH 10 and WITH 11.

For region 6, I need to get 5, and so on.

figure 1

Best Answer

This can be done in ModelBuilder as you have asked to automate this.

Use a feature selection iterator to iterate over your regions. Output of that feeds into a select by location tool to select your bridges. The selection on the bridges can be fed back into another select by location tool to select all regions that are selecting the selected bridges. Remove from that selection the region itself and you have your answer.

The key to all this is to know that all geoprocessing tools honour selections first.

Whilst ModelBuilder would undoubtedly be the quickest way to automate all this I suspect a scripting approach would be easier to manage the looping aspects of this processing problem.

Related Question