Distances
add_distance_to_lat_lon(latitude, longitude, x, y)
Given a latitude and a longitude (in degrees), and two distances (x, y) in km, adds those distances to lat and lon
Parameters:
Name | Type | Description | Default |
---|---|---|---|
latitude
|
|
required | |
longitude
|
|
required | |
x
|
|
required | |
y
|
|
required |
Source code in june/utils/distances.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
haversine_distance(origin, destination)
Taken from https://gist.github.com/rochacbruno/2883505
Author: Wayne Dyck
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin, destination
|
tuple[float, float]
|
Points to calculate the distance between. Takes into account the curvature of the earth. |
required |
Source code in june/utils/distances.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|