2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

Comments chnaged to be more accurate

This commit is contained in:
Philip Sargent 2023-09-30 20:35:40 +03:00
parent 904b6309cf
commit 8dcae6437e
3 changed files with 8 additions and 7 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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