mirror of https://gitlab.com/bashrc2/epicyon
Remove latitude and longitude directions
parent
f8577499c3
commit
fb5fc51fc5
10
maps.py
10
maps.py
|
|
@ -317,11 +317,21 @@ def get_location_from_post(post_json_object: {}) -> str:
|
||||||
continue
|
continue
|
||||||
if property_dict['name'] == "GPSLongitude":
|
if property_dict['name'] == "GPSLongitude":
|
||||||
longitude = property_dict['value']
|
longitude = property_dict['value']
|
||||||
|
if isinstance(longitude, str):
|
||||||
|
if 'E' in longitude:
|
||||||
|
longitude = longitude.replace('E', '')
|
||||||
|
elif 'W' in longitude:
|
||||||
|
longitude = longitude.replace('W', '')
|
||||||
if not is_float(longitude):
|
if not is_float(longitude):
|
||||||
if isinstance(longitude, str):
|
if isinstance(longitude, str):
|
||||||
longitude = float(longitude)
|
longitude = float(longitude)
|
||||||
if property_dict['name'] == "GPSLatitude":
|
if property_dict['name'] == "GPSLatitude":
|
||||||
latitude = property_dict['value']
|
latitude = property_dict['value']
|
||||||
|
if isinstance(latitude, str):
|
||||||
|
if 'S' in latitude:
|
||||||
|
latitude = latitude.replace('S', '')
|
||||||
|
elif 'N' in latitude:
|
||||||
|
latitude = latitude.replace('N', '')
|
||||||
if not is_float(latitude):
|
if not is_float(latitude):
|
||||||
if isinstance(latitude, str):
|
if isinstance(latitude, str):
|
||||||
latitude = float(latitude)
|
latitude = float(latitude)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue