I have this code
import numpy as np
import pandas as pd
from scipy.spatial import distance
mn= [(252, 468), (252, 495), (274, 481), (280, 458), (298, 479), (301, 458), (324, 499)]
name=['loc1','loc2','loc3','loc4','loc5','lco6','loc7']
zz= [(329, 478), (336, 455), (346, 499), (352, 478), (374, 468), (381, 499), (395, 459), (406, 488)]
L = pd.Series()
for name, i in list(zip(name, mn)):
for e in zz:
L[name] = distance.euclidean(e, i)
print(L)
w=100
dd = np.sqrt(np.power(L, 2) + np.power(w, 2))
print(dd)
Here is what it gives as an output for L & dd:
loc1 155.293271
loc2 154.159009
loc3 132.185476
loc4 129.522199
loc5 108.374351
lco6 109.201648
loc7 82.734515
dtype: float64
loc1 184.705170
loc2 183.752551
loc3 165.749811
loc4 163.633737
loc5 147.461859
lco6 148.070929
loc7 129.788289
my trouble that it only gives L&dd for one point in zz, but what I want to have L for each point in zz and then be able to use it to get dd for each value in L.
Thanks for your help!