Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBEC 2021
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léna Aix
EBEC 2021
Commits
b218d839
Commit
b218d839
authored
4 years ago
by
Alexandre Pradeilles
Browse files
Options
Downloads
Patches
Plain Diff
gestion main_street
parent
57184dd3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+8
-2
8 additions, 2 deletions
main.py
with
8 additions
and
2 deletions
main.py
+
8
−
2
View file @
b218d839
...
...
@@ -2,11 +2,17 @@ from request import requete_osm
from
coord_to_intersections
import
coord_to_inter
from
request2
import
search_osm
,
all_intersect
from
ordre_arbres
import
ordre_arbre
from
research
import
circular_research_2
import
time
def
tree_position
(
lat
,
lon
):
req
=
requete_osm
(
lat
,
lon
)
try
:
main_street
=
req
[
'
address
'
][
'
road
'
]
except
KeyError
:
main_street
=
circular_research_2
(
lat
,
lon
)
if
main_street
==
''
:
main_street
=
circular_research_2
(
lat
,
lon
)
print
(
main_street
)
city
=
req
[
'
address
'
][
'
town
'
]
country
=
req
[
'
address
'
][
'
country
'
]
...
...
@@ -47,7 +53,7 @@ def classement_arbres(liste_coord):
if
__name__
==
"
__main__
"
:
t1
=
time
.
time
()
lat
,
lon
=
48.89
2046
,
2.2
49319
lat
,
lon
=
48.89
8867
,
2.2
37485
print
(
tree_position
(
lat
,
lon
))
t2
=
time
.
time
()
print
(
t2
-
t1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment