mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
more stations
This commit is contained in:
parent
3c62defdfd
commit
d524f94c47
@ -84,12 +84,17 @@ class SurvexStation(models.Model):
|
|||||||
alt, ref = self.srtm_alt()
|
alt, ref = self.srtm_alt()
|
||||||
|
|
||||||
diff = alt - self.z
|
diff = alt - self.z
|
||||||
if diff >= 0:
|
if diff >= 0.3:
|
||||||
colour = "blue"
|
colour = "blue"
|
||||||
sign = "+"
|
sign = "+"
|
||||||
else:
|
elif diff <= -0.3:
|
||||||
colour = "red"
|
colour = "red"
|
||||||
sign = ""
|
sign = ""
|
||||||
|
else:
|
||||||
|
diff = 0
|
||||||
|
colour = "grey"
|
||||||
|
sign = ""
|
||||||
|
|
||||||
|
|
||||||
if abs(diff) > 60:
|
if abs(diff) > 60:
|
||||||
weight = "bold"
|
weight = "bold"
|
||||||
|
@ -49,9 +49,73 @@ class MapLocations(object):
|
|||||||
("225-96", "BAlm", "Reference", "Bräuning Alm trig point"),
|
("225-96", "BAlm", "Reference", "Bräuning Alm trig point"),
|
||||||
] # 12 fixed points
|
] # 12 fixed points
|
||||||
|
|
||||||
|
# Where we have a lot of survey stations which have not been assigned to proper Entrances and Caves yet, but we
|
||||||
|
# want to see them in the /stations report page:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
p = []
|
p = []
|
||||||
|
|
||||||
def points(self):
|
def points(self):
|
||||||
|
nullent = Entrance.objects.all()[0] # hope this doesn't barf
|
||||||
|
pending = [
|
||||||
|
("1623.p2013-cucc-pit", "no ent", False, nullent),
|
||||||
|
|
||||||
|
("1626.p2013-cucc-draftyholes", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-pitarea", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-goodpit", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-goodpit-DUP", "no ent", False, nullent),
|
||||||
|
("1626.p2023-cucc-22mpit", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-lineofpits", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-12mpit", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-20mpit", "no ent", False, nullent),
|
||||||
|
("1626.p2013-cucc-2s-drop", "no ent", False, nullent),
|
||||||
|
# to add in the rest of the entrances from the 2013 prospecting trip
|
||||||
|
|
||||||
|
# fix p2013-cucc-01 reference 486512 284436 1825 ; 11:02
|
||||||
|
# *fix p2013-cucc-01-DUP reference 486519 284448 1823
|
||||||
|
|
||||||
|
# *fix p2013-cucc-01B reference 486492 284508 1828 ; 11:37
|
||||||
|
|
||||||
|
# *fix p2013-cucc-01cp reference 486507 284580 1843 ; 11:44
|
||||||
|
|
||||||
|
# *fix p2013-cucc-rift reference 486410 284622 1835 ; 12:00
|
||||||
|
|
||||||
|
# *fix p2013-cucc-slope reference 486485 284591 1844 ; 11:51
|
||||||
|
|
||||||
|
# *fix p2013-cucc-snowplug2 reference 486042 284531 1813 ; 13:03
|
||||||
|
|
||||||
|
# *fix p2013-cucc-draft4pit reference 486374 284438 1786 ; 13:58 ; * GOOD
|
||||||
|
# *fix p2013-cucc-draft4pit-DUP reference 486375 284447 1774
|
||||||
|
|
||||||
|
# *fix p2013-cucc-DraftHole reference 486277 284716 1856 ; 12:28
|
||||||
|
|
||||||
|
# *fix p2013-cucc-setofsnowholes reference 486060 284584 1848 ; 12:51
|
||||||
|
|
||||||
|
# *fix p2013-cucc-stotp20 reference 486176 284738 1864 ; 12:37
|
||||||
|
|
||||||
|
# *fix p2013-cucc-snowplug reference 486349 284666 1833 ; 12:13
|
||||||
|
|
||||||
|
# *fix p2013-cucc-draft3pit reference 486332 284428 1769
|
||||||
|
|
||||||
|
# *fix p2013-cucc-shelter1 reference 486533 284546 1831
|
||||||
|
|
||||||
|
# *fix p2013-cucc-draft2pit reference 486333 284485 1779
|
||||||
|
|
||||||
|
# ;*fix p2013-cucc-01-DUP ; marked as duplicate
|
||||||
|
# ;*fix p2013-cucc-draft4pit-DUP ; marked as duplicate
|
||||||
|
|
||||||
|
("1626.p2014-ms-01", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-02", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-03", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-04", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-05", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-06", "no ent", False, nullent),
|
||||||
|
("1626.p2014-ms-07", "no ent", False, nullent),
|
||||||
|
|
||||||
|
]
|
||||||
|
self.p = pending
|
||||||
for ent in Entrance.objects.all():
|
for ent in Entrance.objects.all():
|
||||||
for st, ent_type in {ent.other_station: "other", ent.tag_station: "tag"}.items():
|
for st, ent_type in {ent.other_station: "other", ent.tag_station: "tag"}.items():
|
||||||
if st != "":
|
if st != "":
|
||||||
@ -74,6 +138,8 @@ def validate_entrance_stations(ent=None):
|
|||||||
|
|
||||||
def station_lower_case(station):
|
def station_lower_case(station):
|
||||||
nonlocal url
|
nonlocal url
|
||||||
|
if not station:
|
||||||
|
return
|
||||||
so = SurvexStation.objects.filter(name=station.lower())
|
so = SurvexStation.objects.filter(name=station.lower())
|
||||||
if so.count() == 1:
|
if so.count() == 1:
|
||||||
message = f"X - Entrance {ent} station '{station}' should be '{station.lower()}'"
|
message = f"X - Entrance {ent} station '{station}' should be '{station.lower()}'"
|
||||||
@ -119,6 +185,7 @@ def validate_entrance_stations(ent=None):
|
|||||||
if so.count() != 0:
|
if so.count() != 0:
|
||||||
message =f"{so.count()} found for Entrance {ent} '{ent_type}' station '{st}' {so}"
|
message =f"{so.count()} found for Entrance {ent} '{ent_type}' station '{st}' {so}"
|
||||||
else:
|
else:
|
||||||
|
# not found
|
||||||
message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'"
|
message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'"
|
||||||
if st == ent.best_station():
|
if st == ent.best_station():
|
||||||
message = message + " - AND THIS IS THE 'BEST' ONE"
|
message = message + " - AND THIS IS THE 'BEST' ONE"
|
||||||
@ -296,6 +363,8 @@ def LoadPositions():
|
|||||||
|
|
||||||
|
|
||||||
for sid in mappoints:
|
for sid in mappoints:
|
||||||
|
if not sid: # catch None entry
|
||||||
|
continue
|
||||||
if sbid.endswith(sid) or sbid.endswith(sid.lower()):
|
if sbid.endswith(sid) or sbid.endswith(sid.lower()):
|
||||||
blockpath = "." + sbid[: -len(sid)].strip(".") # only the most recent one that is mappoints
|
blockpath = "." + sbid[: -len(sid)].strip(".") # only the most recent one that is mappoints
|
||||||
if sid in found_points:
|
if sid in found_points:
|
||||||
|
@ -19,8 +19,18 @@ th, td {
|
|||||||
<td style="text-align:left; " id="{{s.name|safe}}"> <a href="/entrances#{{s.name|safe}}">{{s.name|safe}}</a> </td>
|
<td style="text-align:left; " id="{{s.name|safe}}"> <a href="/entrances#{{s.name|safe}}">{{s.name|safe}}</a> </td>
|
||||||
<td style="text-align:right; width:10"> {{s.x|floatformat:2}} </td>
|
<td style="text-align:right; width:10"> {{s.x|floatformat:2}} </td>
|
||||||
<td style="text-align:right; width:10"> {{s.y|floatformat:2}} </td>
|
<td style="text-align:right; width:10"> {{s.y|floatformat:2}} </td>
|
||||||
|
<!--
|
||||||
<td style="text-align:right; width:10"> <em>{{s.lat|floatformat:6}} </em></td>
|
<td style="text-align:right; width:10"> <em>{{s.lat|floatformat:6}} </em></td>
|
||||||
<td style="text-align:right; width:10"> <em>{{s.long|floatformat:6}} </em></td>
|
<td style="text-align:right; width:10"> <em>{{s.long|floatformat:6}} </em></td>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<td>{% if s.lat %}
|
||||||
|
<a href="https://www.openstreetmap.org/?mlat={{ s.lat|floatformat:7}}&mlon={{s.long|floatformat:7}}"><em>{{s.lat|floatformat:6}} </em>{% endif %}</td>
|
||||||
|
|
||||||
|
<td>{% if s.lat %}
|
||||||
|
<a href="https://www.openstreetmap.org/?mlat={{ s.lat|floatformat:7}}&mlon={{s.long|floatformat:7}}"><em>{{s.long|floatformat:6}} </em>{% endif %}</td>
|
||||||
|
|
||||||
|
|
||||||
<td style="text-align:right; "> {{s.z|floatformat:0}} </td>
|
<td style="text-align:right; "> {{s.z|floatformat:0}} </td>
|
||||||
<td style="text-align:right; "> {{s.srtm_diff.0|safe}} </td>
|
<td style="text-align:right; "> {{s.srtm_diff.0|safe}} </td>
|
||||||
<td style="text-align:right; "> {{s.srtm_diff.1|floatformat:0}} </td>
|
<td style="text-align:right; "> {{s.srtm_diff.1|floatformat:0}} </td>
|
||||||
|
Loading…
Reference in New Issue
Block a user