I have two polygon layers, and a roads layer that I've made into a network dataset. My goal is to find the closest polygon in one layer to each polygon in the other layer, but instead of just calculating the distance to find the closest I need to use the roads ND to see which of the polygons from the first layer is closest to the polygon from the second layer.
What tool can I use to do this?
I've assumed I can do it with something in the Network Analyst toolset, but I can't figure out what.
From the picture, I want to find the closest green polygon to both of the red polygons using the yellow roads.
I'm still relatively new to this, in my first course on the subject.
Edit: I received this solution on GeoNet, the Esri forum:
" Convert the vertices of your polygon features to points (Feature Vertices To Points—Data Management toolbox | ArcGIS Desktop) Do this twice: once for the green polygons and once for the red polygons Calculate an OD cost matrix with the Network Analyst (OD cost matrix analysis layer—ArcGIS Pro | ArcGIS Desktop ) Load the vertices from the red polygons as origins and the vertices from the green polygons as destinations (or vice-versa) Use the OD cost matrix to find out the shortest path between any vertex of a green polygon and any vertex of a red polygon. Use these vertices geographic positions to determine to which green or red polygon the vertices belong."