mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 04:57:11 +00:00
undropped caves code -> GPX
This commit is contained in:
@@ -113,7 +113,13 @@ class SurvexStation(models.Model):
|
||||
|
||||
return diff_str, ref
|
||||
|
||||
|
||||
def gpx_location(s): # s == self
|
||||
# <wpt lon="13.82093593" lat="47.69501184"><ele>1857.90</ele><name>tunnocks</name></wpt>
|
||||
latitude, longitude = utmToLatLng(33, s.x, s.y, northernHemisphere=True)
|
||||
if s.name:
|
||||
return f'<wpt lon="{longitude:0.8f}" lat="{latitude:0.8f}"><ele>{s.z:0.0f}</ele><name>{s.name[5:]}</name></wpt>\n'
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
def utmToLatLng(zone, easting, northing, northernHemisphere=True): # move this to utils.py ?
|
||||
|
||||
Reference in New Issue
Block a user