mirror of https://gitlab.com/bashrc2/epicyon
South is negative
parent
fb5fc51fc5
commit
b0ddc2e96d
4
maps.py
4
maps.py
|
|
@ -327,14 +327,18 @@ def get_location_from_post(post_json_object: {}) -> 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']
|
||||||
|
is_south = False
|
||||||
if isinstance(latitude, str):
|
if isinstance(latitude, str):
|
||||||
if 'S' in latitude:
|
if 'S' in latitude:
|
||||||
latitude = latitude.replace('S', '')
|
latitude = latitude.replace('S', '')
|
||||||
|
is_south = True
|
||||||
elif 'N' in latitude:
|
elif 'N' in latitude:
|
||||||
latitude = latitude.replace('N', '')
|
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)
|
||||||
|
if is_south and latitude > 0:
|
||||||
|
latitude = -latitude
|
||||||
if latitude is not None and \
|
if latitude is not None and \
|
||||||
longitude is not None:
|
longitude is not None:
|
||||||
locn2 = {
|
locn2 = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue