diff options
author | Martin Green <martin.speleo@gmail.com> | 2023-05-01 00:01:41 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2023-05-01 00:01:41 +0100 |
commit | 896af43994f048334f77fc0985533f226e70346f (patch) | |
tree | 3a439a9efc80bc74eced567212b31a3774931d5e /core/models/caves.py | |
parent | 2ee63a98044718a7f366aee03cac206b720ef5a8 (diff) | |
download | troggle-896af43994f048334f77fc0985533f226e70346f.tar.gz troggle-896af43994f048334f77fc0985533f226e70346f.tar.bz2 troggle-896af43994f048334f77fc0985533f226e70346f.zip |
kml file output for google earth etc
Diffstat (limited to 'core/models/caves.py')
-rw-r--r-- | core/models/caves.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/models/caves.py b/core/models/caves.py index 91453fc..0c8fdad 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -420,6 +420,26 @@ class Entrance(TroggleModel): return cavelist[0].url_parent() else: return "" + + def latlong(self): + station = None + if self.other_station: + try: + station = SurvexStation.objects.get(name = self.other_station) + except: + pass + if self.tag_station: + try: + station = SurvexStation.objects.get(name = self.tag_station) + except: + pass + if self.exact_station: + try: + station = SurvexStation.objects.get(name = self.exact_station) + except: + pass + if station: + return station.latlong() def GetCaveLookup(): |