Q: How do I calculate the distance between matched pairs of points in ArcGIS?
Answer
The XY to Line tool can solve this problem in ArcGIS 10.X:
- Create a table that contains these fields (at the very least):
- Unique ID: This might be a concatenated field based on the IDs of your two points. If your table contains the IDs of both points as well as a concatenated ID field, you can join the data together at the end.
- X coordinate of the first point
- Y coordinate of the first point
- X coordinate of the second point
- Y coordinate of the second point
- Note: X and Y coordinate fields can be created by calculating geometry in a point layer's attribute table.
- Open the XY to Line tool (Data Management Tools > Features > XY to Line).
- Make sure the ID field is specified.
- GEODESIC should be the line type so that a straight line is created.
- Open the attribute table of the resulting layer.
- Add a field (type: Double) named DISTANCE
- Right click on the heading of DISTANCE, click Calculate Geometry, and calculate the length in whatever units you wish.
Further Resources
- ESRI: XY to Line
See Also
Created by MIT GIS Services. Email gishelp(at)mit.edu for more assistance.