Skip to content
Snippets Groups Projects
Commit 0a248eb1 authored by Alexandre Pradeilles's avatar Alexandre Pradeilles
Browse files

fct gestion street

parent db2feaaf
Branches
No related tags found
No related merge requests found
......@@ -60,15 +60,9 @@ def classement_arbres(liste_coord):
if __name__=="__main__":
<<<<<<< HEAD
t1 = time.time()
lat, lon = 48.898867, 2.237485
print(tree_position(lat, lon))
=======
'''t1 = time.time()
lat, lon = 48.892046, 2.249319
#print(tree_position(lat, lon))
>>>>>>> 6899c2939dfc49fc78620b32ffd1efe547f87229
t2 = time.time()
#print(t2-t1)
......
......@@ -20,6 +20,18 @@ def circular_research(lat, lon, main_street):
step += 4*10**(-5)
return None
def circular_research_2(lat, lon, main_street=''):
#Recherche un rue autre que main_street par recherche circulaire autour du point d'intersection
step = 2*10**(-5)
found = False
while not(found):
for i in range(8):
street = check_position(lat, lon, step, main_street, i)
if not(street == main_street):
return street
step += 2*10**(-5)
return street
def check_position(lat, lon, step, main_street, i):
#Calcul les positions autour du point centrale et récupère la rue associée à cette position
street = ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment