Calculating county-to-county distances with GIS

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:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1798&pid=1790&topicname=Feature_To_Point_%28Data_Management%29

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.

Point Distance

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.

  1. After ensuring the county polygon boundary file is projected using a distance-preserving projection, select the county polygons for the study area.
  2. Convert the selected county polygons to county polygon centroid points using the ‘Feature To Point’ tool. Counties with Centroids
  3. 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.

As a former Geographic Information Systems Specialist for the Scholars' Lab, Kelly worked with faculty, staff, and students to visualize, analyze, create, and manage geographic data. He earned a master's degree in Geographic Information Science from Indiana University Purdue University Indianapolis. His research interests include applied geography and cartography as an art form.

8 Comments

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

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

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

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

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

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Archives