Commit 659e7445 authored by Romain Casati's avatar Romain Casati
Browse files

Pyroutelib3 example added.

parent 6751fee1
Pipeline #415347 passed with stages
in 3 minutes and 3 seconds
{"cells":[{"metadata":{"trusted":true},"cell_type":"code","source":"from pyroutelib3 import Router\nimport folium\n\ndepart = [47.08428480854615, 2.3939454203269217]\narrivee = [47.08187952227819, 2.398992969262373]\nmilieu = [sum(c) / 2 for c in zip(depart, arrivee)]\n\nm = folium.Map(location=milieu, zoom_start=17)\n\nfolium.Marker(depart, popup=\"Départ\").add_to(m)\nfolium.Marker(arrivee, popup=\"Arrivée\").add_to(m)\n\nrouter = Router(\"foot\")\nnode_depart = router.findNode(*depart)\nnode_arrivee = router.findNode(*arrivee)\nstatus, route = router.doRoute(node_depart, node_arrivee)\nif status == 'success':\n routeLatLons = list(map(router.nodeLatLon, route))\n folium.PolyLine(routeLatLons, color=\"green\", weight=5, opacity=0.7).add_to(m)\n\nm","execution_count":null,"outputs":[]}],"metadata":{"celltoolbar":"Format de la Cellule Texte Brut","colab":{"name":"python4tp.ipynb","provenance":[],"toc_visible":true},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.1"},"toc":{"base_numbering":"0","nav_menu":{"height":"369px","width":"618.333px"},"number_sections":true,"sideBar":true,"skip_h1_title":false,"title_cell":"Table des Matières","title_sidebar":"Sommaire","toc_cell":true,"toc_position":{"height":"calc(100% - 180px)","left":"10px","top":"150px","width":"165px"},"toc_section_display":true,"toc_window_display":true}},"nbformat":4,"nbformat_minor":2}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment