How do I find the neighbours of each country and export that data to create a graph?

899
4
02-28-2020 09:29 AM
TiagoAlmeida
New Contributor

Hello, I'm new to ArcGIS and I would like to know how to create a graph of the world where each country is a node and exists a link between countries if they are neighbours.

Additionally, it would be perfect if each link had the distance between the centroids of those countries.

Thank you

0 Kudos
4 Replies
DavidPike
MVP Frequent Contributor

Feature to point for each country to create centroud points. Make yourself aware of the output options in the help file. Also countries may have island territories and exclaves etc which will skew your points.

Use select by location to find neighbouring countries for each country and point to line for each country selected.

The actual process will be more involved than this simple explanation, and would best be scripted as it will need iteration. 

0 Kudos
TiagoAlmeida
New Contributor

Thank you, I was able to do it for one country but how do I make the script

now?

David Pike <geonet@esri.com> escreveu no dia sexta, 28/02/2020 à(s) 19:09:

GeoNet, The Esri Community | GIS and Geospatial Professional Community

<https://community.esri.com/?et=watches.email.thread>

Re: How do I find the neighbours of each country and export that data to

create a graph?

reply from David Pike

<https://community.esri.com/people/Davepike101@hotmail.com?et=watches.email.thread>

in New to GIS - View the full discussion

<https://community.esri.com/message/912307-re-how-do-i-find-the-neighbours-of-each-country-and-export-that-data-to-create-a-graph?commentID=912307&et=watches.email.thread#comment-912307>

0 Kudos
DanPatterson_Retired
MVP Emeritus

export the results of the run to a script

0 Kudos
DavidPike
MVP Frequent Contributor

In the script turn the FC into a feature layer.

Use a select by attribute to select each country row within a for loop. Append the results to a point FC.

0 Kudos