# Point-to-point distance (multipoint)

Question asked by joaopugliese on Apr 2, 2017
Latest reply on Apr 3, 2017 by Dan_Patterson

Hello dear ArcGIS programmers,

I have a dataset with points on the center of municipalities in south Brazil. I have also a set of coordinates that are approximate locations of Jesuit Missions. I need to find the closest distance a municipality is from a mission, aka the minimum distance.

I tried using MultiPoint to create a set of points and then use distance from that to obtain the minimum distance. Using syntax example I found online I didn't had much luck but to end in tears.

import arcpy

# A list of features and coordinate pairs
feature_info = [[[-50.963, -25.596], [-51.367, -25.191], [-54.353, -25.464], [-53.243, -28.28]],
[[-52.074, -22.597], [-50.463, -24.942], [-51.9, -22.69], [-51.689, -25.679]],
[[-51.689, -25.679], [-50.737, -24.489], [-50.975, -23,716], [-54.965, -28.2]],
[[-54.296, -28.512], [-53.899, -28.611], [-53.677, -28.538],[-55.959, -28.783]],
[[-53.15, -28.015], [53.243, -28.28], [-55.171, -27.776], [54.793, 27.485], [54.621, 27.478]]]

# A list that will hold each of the Multipoint objects
features = []

for feature in feature_info:
# Create a Multipoint object based on the array of points
# Append to the list of Multipoint objects
arcpy.Multipoint(feature)

As you can see, I wasn't even including the distance function in this example.

If anyone can help me with the distance calculation, I would surely appreciate. It's been a while since I started using ArcGIS for this only purpose and so far only managed to create a central point for every municipality.