From 0a248eb1e967f3ef05167c32f24e1184cace29c3 Mon Sep 17 00:00:00 2001
From: "a.pradeilles" <alexandre.pradeilles@student-cs.fr>
Date: Thu, 15 Apr 2021 10:18:38 +0200
Subject: [PATCH] fct gestion street

---
 main.py     |  6 ------
 research.py | 12 ++++++++++++
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/main.py b/main.py
index 9ebd6f4..196cab5 100644
--- a/main.py
+++ b/main.py
@@ -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)
     
diff --git a/research.py b/research.py
index ab83ab6..4fa73a0 100644
--- a/research.py
+++ b/research.py
@@ -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 = ''
-- 
GitLab