summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/models/caves.py7
-rw-r--r--core/views/caves.py1
-rw-r--r--parsers/locations.py7
3 files changed, 8 insertions, 7 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index cd8bb10..539006b 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -412,11 +412,10 @@ class Entrance(TroggleModel):
return ""
def latlong(self):
- """Gets lat long assuming that it has to get it from the associated stations, but in fact the Entrance itself
- has easting/northing and lat/long fields which perhaps we should try first... or last ?!
+ """Gets lat long assuming that it has to get it from the associated stations
"""
- if self.easting and self.northing:
- return utmToLatLng(33, float(self.easting), float(self.northing), northernHemisphere=True)
+ # if self.easting and self.northing: # hmm not a good idea I think
+ # return utmToLatLng(33, float(self.easting), float(self.northing), northernHemisphere=True)
station = None
if self.other_station:
diff --git a/core/views/caves.py b/core/views/caves.py
index 15f0fda..a6c9659 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -315,6 +315,7 @@ def cavepage(request, karea=None, subpath=None, slug=None):
message = f"Failed to find cave from identifier given: {slug}."
return render(request, "errors/generic.html", {"message": message})
+ # lack of validation for karea, it could be any 4 digits.
kpath = karea + subpath
# print(f" ! cavepage:'{kpath}' kataster area:'{karea}' rest of path:'{subpath}'")
try:
diff --git a/parsers/locations.py b/parsers/locations.py
index bf786ab..a8f94fb 100644
--- a/parsers/locations.py
+++ b/parsers/locations.py
@@ -77,9 +77,10 @@ poslineregex = re.compile(r"^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d
def LoadPositions():
"""First load the survex stations for entrances and fixed points (about 600) into the database.
- Run cavern to produce a complete .3d file, then run 3dtopos to produce a table of
- all survey point positions. Then lookup each position by name to see if we have it in the database
- and if we do, then save the x/y/z coordinates. This gives us coordinates of the entrances.
+ Run 'cavern' to produce a complete .3d file, then run 'survexport -pos' to produce a table of
+ all survey point positions in UTM cooridnates. Then lookup each of the 600 positions by name to
+ see if we have it in the database and if we do, then save the UTM x/y/z coordinates.
+ This gives us coordinates of the entrances.
If we don't have it in the database, print an error message and discard it.
"""
svx_t = 0