From b35f002e1a453a12d104bbba6cd6ca354d18fcb6 Mon Sep 17 00:00:00 2001 From: jullinator Date: Thu, 30 Aug 2018 19:21:53 +0200 Subject: leaflet updated --- algorithms.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'algorithms.py') diff --git a/algorithms.py b/algorithms.py index f39910c..1a62118 100644 --- a/algorithms.py +++ b/algorithms.py @@ -11,4 +11,13 @@ def length_haversine(p1, p2): a = math.sin(dlat / 2) ** 2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlng / 2) ** 2 c = 2 * math.asin(math.sqrt(a)) - return 6372797.560856 * c # return the distance in meters \ No newline at end of file + return 6372797.560856 * c # return the distance in meters + +def get_closest_node_id(nodes, source_node): + """ Search through all nodes and return the id of the node + that is closest to 'source_node'. """ + pass + +def find_shortest_path(nodes, source_id, target_id): + """ Return the shortest path using Dijkstra's algortihm. """ + return [] \ No newline at end of file -- cgit v1.2.1