diff --git a/coord_to_intersections.py b/coord_to_intersections.py index 86723c158cba50c795defca5e4a94a0886dbd5c7..c0944101702c645d84ad7a9ee4c7fb885c2c80e3 100644 --- a/coord_to_intersections.py +++ b/coord_to_intersections.py @@ -5,7 +5,7 @@ def coord_to_inter(liste_coord,lat,long,main_street): for inter in liste_coord: d=(inter[0]-long)**2 + (inter[1]-lat)**2 dist.append(d) - while len(inter)<1 : + while len(inter_street)<1 : candidat=liste_coord[dist.index(min(dist))] nom_de_rue=circular_research(candidat[1], candidat[0], main_street) if nom_de_rue== None : @@ -17,7 +17,7 @@ def coord_to_inter(liste_coord,lat,long,main_street): indice=dist.index(min(dist)) dist.pop(indice) liste_coord.pop(indice) - while len(inter)<2 : + while len(inter_street)<2 : candidat=liste_coord[dist.index(min(dist))] dist_1_2= (candidat[0]-inter_street[0][0])**2 + (candidat[1]-inter_street[0][1])**2 dist_main_2= min(dist)