From a85f859f886ac2a22a94a604f2ce46395c148476 Mon Sep 17 00:00:00 2001 From: Philip Sargent <philip.sargent@gmail.com> Date: Sat, 16 Sep 2023 21:12:49 +0300 Subject: [PATCH] add WGS84 lat/long entrance locations --- core/views/statistics.py | 2 ++ templates/eastings.html | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/views/statistics.py b/core/views/statistics.py index ebe70dd..f056ab1 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -281,6 +281,8 @@ def eastings(request): for e in entrances: if e.easting or e.northing: ents.append(e) + if e.lat_wgs84 or e.long_wgs84: + ents.append(e) stations = SurvexStation.objects.all() diff --git a/templates/eastings.html b/templates/eastings.html index 235db76..3def5c3 100644 --- a/templates/eastings.html +++ b/templates/eastings.html @@ -18,13 +18,18 @@ Coordinate systems in Austria are explained in:<br> <a href="/handbook/survey/coord.htm">Basic Coordinate Systems</a>. <p>The data in the table immediately below has been hand-entered and is sometimes very wrong. +<p>The Lat. Long. coordinates are manually entered using a phone or a hand-held GPS device at (or near) the entrance. <p>For the Cave column, if there is an official cave name, then it is shown. Otherwise whatever other name we can find for it is shown <em>in italics</em>. For the Entrance column, if the entrance has a name (e.g. Grüner Eingang in Schwarzmooskogeleishöhle) then it is shown. Otherwise it says "Anon:" followed by whatever other name we can find for it, usually the entrance id slug, <em>in italics</em>. - +<style> +th, td { + padding-left: 5px; + padding-right: 5px; +</style> <table> -<tr><th>Cave</th><th>Entrance</th><th>Easting</th><th>Northing</th><th>tag</th><th>tag exact</th><th>tag other</th><th>slug</th></tr> +<tr><th>Cave</th><th>Entrance</th><th>Easting</th><th>Northing</th><th>Lat</th><th>Long</th><th>tag</th><th>tag exact</th><th>tag other</th><th>slug</th></tr> {% for ent in ents %} <tr> <td style="text-align:left"> @@ -45,6 +50,8 @@ For the Entrance column, if the entrance has a name (e.g. Grüner Eingang in </td> <td style="text-align:right">{{ent.easting|floatformat:2}}</td> <td style="text-align:right">{{ent.northing|floatformat:2}}</td> + <td style="text-align:right">{{ent.lat_wgs84|floatformat:6}}</td> + <td style="text-align:right">{{ent.long_wgs84|floatformat:6}}</td> <td style="text-align:right">{{ent.tag_station}}</td> <td style="text-align:right">{{ent.exact_station}}</td> <td style="text-align:right">{{ent.other_station}}</td>