In the Scholars’ Lab we recently worked with a researcher whose study areas focused on several groups of US counties. Of interest was the distance from every county within a group to every other county in that same group. We used geographic information systems (GIS) software to calculate these distances.

GIS software creates, manages, analyzes, and visualizes geographically referenced data. Environmental Systems Research Institute (ESRI) in Redlands, California, produces ArcGIS desktop, a GIS software suite. The following examples use ArcGIS ArcMap software version 9.3.1 at the ArcInfo product level. Instructions for accessing GIS software at the University of Virginia are here: http://guides.lib.virginia.edu/gis. If you are not affiliated with UVA, contact your local IT support person or ESRI for information on accessing this GIS software.

**Calculating polygon centroids** – When working with polygon features (like county boundaries) in GIS it is often necessary to locate the geographic center or centroid of each polygon as a point feature. In ESRI’s ArcGIS desktop software the ‘Feature To Point’ tool creates polygon centroids.

For more information see the ArcGIS online help for the ‘Feature To Point’ tool:

** **

** **

** **

** **

** **

** **

** **

** **

** **

** **

**Creating a point distance table** – Given a set of point features, GIS software can calculate the straight-line distance from each point in the set to every other point in the set. The output distance table contains one row for each point-to-point combination along with the calculated distance. In ESRI’s ArcGIS desktop software the ‘Point Distance’ tool creates a point distance table.

For more information see the ArcGIS online help for the Point Distance tool: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1353&pid=1347&topicname=Point_Distance_%28Analysis%29

** **

** **

** **

** **

** **

**Example using the ‘Feature To Point’ and ‘Point Distance’ tools – **Given a polygon dataset representing boundaries of a group of US counties, calculate the distance between each county in the group and every other county in the group.

- After ensuring the county polygon boundary file is projected using a distance-preserving projection, select the county polygons for the study area.
- Convert the selected county polygons to county polygon centroid points using the ‘Feature To Point’ tool.
- Generate the point distance table for all county centroid points created in step 2 using the ‘Point Distance’ tool. Distance is expressed in the linear unit of the input dataset, which is meters in our example.

hi

i need to calculate distance from different villages to one point (headquarter). Also i am using web server data for village points. how can i calculate the distance and make a suitable table.

Hello, thank you for a helpful post. This is almost exactly what I’m trying to do on a project, but…

Is it possible to do this same kind of analysis using polygon to polygon proximity, rather than using centroids? So, looking at the edges of the polygon and determining the shortest distance from one polygon to another polygon?

Shortest distance from Polygon 1 to Polygon 2

Polygon 1 to Polygon 3

Polygon 1 to Polygon 4

etc.

Thank you! Please let me know, I’m very interested.

Hi,

Thank you for the nice explanation.

I used your approach to calculate the distances among communities in Flanders (the northern part of Belgium, Europe). The result is a 3 column table, the two relevant communities and the distance. However, I would like to bring this in a table with the communities on the top row and left column and the distances at the intersects.

Example: http://www.namibia-accommodation.co.za/namibia-distance-table.html

Anybody a suggestion on how this could be done efficiently? I have hundreds of communities, so manually is not really an option.

So, what do you actually use for calculation. I am really struggling with this… help page and explanation was not helpful…..

The ArcGIS tool called ‘Point Distance’ calculates the distance and stores the distance value in the output table.

For those asking about the unit of measure for results from the Point Distance tool, these units match the linear units of the coordinate system of your input dataset.

If you are seeing very small numbers for distance values, it’s likely due to a projection issue. See the instructions for Step 1. Your county polygon layer must be projected using a distance-preserving (equidistant) projection. If your polygon layer is instead in an unprojected Geographic Coordinate System with units expressed in decimal degrees, the results will also be in decimal degrees, an angular measurement. These angular measurements are of no use in calculating distance.

So be sure your polygon boundary file is projected before you begin step 1. See http://goo.gl/pMpb0 for an overview of projections and see http://goo.gl/oGkDG for help on the Project tool.

Kelly,

Thanks for the guide on using the Point Distance tool. I’m running into the same problem as Adam in New York. I’m calculating the distance between county centroids and place centroids, but I keep getting values in the 0.1 to 1.9 range.

Any tips?

Thanks,

Lena

Kelly,

This is great, but I’m still having trouble generating correct distance values. I’m calculating the distance between census tract centroids in New York State and I keep generating values in the range of 0.5-1.5. I have no idea what units these values are in; I am unable to find a conversion factor for miles that works consistently.

I have tried changing the projection of my centroid shape file but that has not helped.

Any advice would be much appreciated.

Thank you,

Adam

Hi Ty,

The ArcGIS tool “Generate Near Table” eliminates the centroid bias you describe. This tool assigns a “0” distance to adjacent polygons. More info from the ArcGIS online help here: http://bit.ly/cZMD0d

Kelly Johnston

These final measurements are biased high since the centroid is used. ArcGis does not have a easily applied method for finding the distances between polygons (counties).