The shapefile I created contains 5 points. Their FID's are (0,1,2,3,4). I need to calculate the distance between all of them. The output table should contain the following info -

points to compare      distance
        0-1           float value
        0-2           float value
        0-3           float value
        0-4           float value
        1-2           float value
        1-3           float value
        1-4           float value
        2-3           float value
        2-4           float value
        3-4           float value

I have found some ways of calculating the distance from one particular point to other multiple points. But trying to calculate the distance between all of them. Is there any way to do that?

I am using ArcMap 10.6 and ArcPy 2.7.

  • Please edit your post to include your license level (basic, standard, advanced). If you have an advanced license, the Near tool will do the trick. – Andy Oct 3 '18 at 19:13
  • Are you wanting straight distance, geodesic (great-circle) distance, or distance-along-a-network ? – Kirk Kuykendall Oct 3 '18 at 21:22

If you have access to the Network Analyst extension with ArcMap, you can use the OD Cost Matrix solver to return the information you need. Input your points as both origins and destinations, apply accumulation settings of distance, then solve.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.