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.

closed as off-topic by PolyGeo Oct 22 '18 at 3:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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