mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 19:17:08 +00:00
remove exact station
This commit is contained in:
@@ -256,7 +256,6 @@ class Entrance(TroggleModel):
|
||||
url = models.CharField(max_length=300, blank=True, null=True)
|
||||
|
||||
tag_station = models.TextField(blank=True, null=True)
|
||||
exact_station = models.TextField(blank=True, null=True)
|
||||
other_station = models.TextField(blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
@@ -298,9 +297,6 @@ class Entrance(TroggleModel):
|
||||
letter = ce.entranceletter
|
||||
print(f"### LETTER {letter}")
|
||||
return letter
|
||||
|
||||
def exact_location(self):
|
||||
return self.single(self.exact_station)
|
||||
|
||||
def other_location(self):
|
||||
return self.single(self.other_station)
|
||||
@@ -313,12 +309,6 @@ class Entrance(TroggleModel):
|
||||
return r + f"{s.x:0.0f}E {s.y:0.0f}N {s.z:0.0f}Alt"
|
||||
except:
|
||||
return r + f"{self.tag_station} Tag Station not in dataset"
|
||||
if self.exact_station:
|
||||
try:
|
||||
s = SurvexStation.objects.lookup(self.exact_station)
|
||||
return r + f"{s.x:0.0f}E {s.y:0.0f}N {s.z:0.0f}Alt"
|
||||
except:
|
||||
return r + f"{self.tag_station} Exact Station not in dataset"
|
||||
if self.other_station:
|
||||
try:
|
||||
s = SurvexStation.objects.lookup(self.other_station)
|
||||
@@ -334,8 +324,6 @@ class Entrance(TroggleModel):
|
||||
def best_station(self):
|
||||
if self.tag_station:
|
||||
return self.tag_station
|
||||
if self.exact_station:
|
||||
return self.exact_station
|
||||
if self.other_station:
|
||||
return self.other_station
|
||||
|
||||
@@ -433,11 +421,6 @@ class Entrance(TroggleModel):
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user