map_generating.py
def haversine_distance(lng1, lat1, lng2, lat2) -> float:
    '''
    Return the distance between two point on Earth with given longitudes and
    latitudes.
    >>> haversine_distance(24.05, 48.08, 24.06, 48.09)
    1.3372365823409342
    >>> haversine_distance(48.08, 24.05, 48.09, 24.06)
    1.5057991000504831
    '''
    lng1, lat1, lng2, lat2 = map(radians, [lng1, lat1, lng2, lat2]) #convert to radians
    dlng = lng2-lng1
    dlat = lat2-lat1
    value = 2*asin(sqrt(sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlng/2)**2))
    #haversine formula
    return value*6371

    Return the distance between two point on Earth with given longitudes and
    latitudes.
    >>> haversine_distance(24.05, 48.08, 24.06, 48.09)
    1.3372365823409342
    >>> haversine_distance(48.08, 24.05, 48.09, 24.06)
    1.5057991000504831
    
Return the distance between two point on Earth with given longitudes and
latitudes.
Return the distance between two point on Earth with given longitudes and latitudes .
def haversine_distance(lng1, lat1, lng2, lat2) -> float:
    lng1, lat1, lng2, lat2 = map(radians, [lng1, lat1, lng2, lat2]) 
    dlng = lng2-lng1
    dlat = lat2-lat1
    value = 2*asin(sqrt(sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlng/2)**2))
    return value*6371
def haversine_distance ( lng1 , lat1 , lng2 , lat2 ) -> float : lng1 , lat1 , lng2 , lat2 = map ( radians , [ lng1 , lat1 , lng2 , lat2 ] ) dlng = lng2 - lng1 dlat = lat2 - lat1 value = 2 * asin ( sqrt ( sin ( dlat / 2 ) ** 2 + cos ( lat1 ) * cos ( lat2 ) * sin ( dlng / 2 ) ** 2 ) ) return value * 6371
Return the distance between two point on Earth with given longitudes and
latitudes.
Return the distance between two point on Earth with given longitudes and latitudes .
'''
    Return the distance between two point on Earth with given longitudes and
    latitudes.
    >>> haversine_distance(24.05, 48.08, 24.06, 48.09)
    1.3372365823409342
    >>> haversine_distance(48.08, 24.05, 48.09, 24.06)
    1.5057991000504831
    ''' #convert to radians #haversine formula
lng1
lat1
lng2
lat2