How do I create a line between two polygons based on the polygons' attributes. For example, I want to show migration between polygons, Alaska and Wyoming. The Alaska polygon has an origin state attribute with value, "Alaska", and a destination state attribute with value, "Wyoming". Is there a geoprocessing tool or other process that will draw a line between the Alaska and Wyoming polygons based on these attributes. I'm trying to create a map similar to this but based on states not counties:
nothing automagic, but with the correct coordinates in the polygon layer table you could connect the centroids of the polygons
Add Geometry Attributes—Data Management toolbox | ArcGIS Desktop using the centroid coordinates for the two polygons.
Create a new *.csv text file containing
alaskaX, alaskaY, wyomingX, wymoningY as the header, then add the coordinates of the centroid on the next line
12124, 123132, 12312, 123123 more appropriate values obviously
Use the csv file and ...
XY To Line—Data Management toolbox | ArcGIS Desktop
to make the geodesic between them. Make sure you use define the coordinate system being used (Define Projection tool in arctoolbox)
I created a tool a couple of years ago that works on a table that contains the from and to XY coordinates and creates the lines between them: https://community.esri.com/message/452166?commentID=452166#comment-452166
Although this would require some pro-processing of the data, it could be done.