server/api_class.py
def run_reverse_offline(paths: str, latitude: float, longitude: float) -> str:
    ''' this functions runs the reverse geocoding and retrieves the full address'''
    result = []
    paths = paths.split(' ')
    
    for i in paths:
        i = i.replace('\\\\', '\\')
        with open(i, encoding= 'utf8') as f:
            d = json.load(f)
            result.append(d)

    for i in result:
        lat = i['lat']
        lon = i['lon']
        # round to 4th decimal place to find a match more easily 
        if round(float(lat),4) == round(float(latitude), 4) and round(float(lon), 4) == round(float(longitude), 4):
            print(i['display_name'])
 this functions runs the reverse geocoding and retrieves the full address
this functions runs the reverse geocoding and retrieves the full address
this functions runs the reverse geocoding and retrieves the full address
def run_reverse_offline(paths: str, latitude: float, longitude: float) -> str:
    result = []
    paths = paths.split(' ')
    for i in paths:
        i = i.replace('\\\\', '\\')
        with open(i, encoding= 'utf8') as f:
            d = json.load(f)
            result.append(d)
    for i in result:
        lat = i['lat']
        lon = i['lon']
        if round(float(lat),4) == round(float(latitude), 4) and round(float(lon), 4) == round(float(longitude), 4):
            print(i['display_name'])
def run_reverse_offline ( paths : str , latitude : float , longitude : float ) -> str : result = [ ] paths = paths . split ( ' ' ) for i in paths : i = i . replace ( '\\\\' , '\\' ) with open ( i , encoding = 'utf8' ) as f : d = json . load ( f ) result . append ( d ) for i in result : lat = i [ 'lat' ] lon = i [ 'lon' ] if round ( float ( lat ) , 4 ) == round ( float ( latitude ) , 4 ) and round ( float ( lon ) , 4 ) == round ( float ( longitude ) , 4 ) : print ( i [ 'display_name' ] )
this functions runs the reverse geocoding and retrieves the full address
this functions runs the reverse geocoding and retrieves the full address
''' this functions runs the reverse geocoding and retrieves the full address''' # round to 4th decimal place to find a match more easily 
paths
str
latitude
float
longitude
float