0

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.

enter image description here

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."

New contributor
Chad Leftwich is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

I think an issue you may run into is that polygons can not be used as Facilities when using Network Analyst. I came across this post which is similar to the issue you are having.

https://community.esri.com/thread/28048

From what I read, it seems like an alternative process would be to use the "Feature Vertices To Points" tool to create a series of individual points to replace your polygons. From there you can use the points as Facilities in order to run the "New Closest Facility" tool through Network Analyst. This would give you more accurate results than just using a centroid point of each polygon.

New contributor
Spencer is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Thank you for the help. That got me part of the way toward solving the problem. However, I got the error "The network dataset must have at least one time-based and one distance-based cost attribute." when I tried to use my network dataset. It doesn't have a time attribute, and I can't find a way to include one, so I may have reached a dead end at least with the data I'm using. – Chad Leftwich Dec 3 at 5:57
  • Do you or your organization have a subscription to ArcGIS Online? The built in network analysis tools utilize ESRI streetmap data, which could be used to run your analysis with. – Spencer Dec 3 at 19:58

Your Answer

Chad Leftwich is a new contributor. Be nice, and check out our Code of Conduct.

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.