2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +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 "" return ""
def latlong(self): def latlong(self):
"""Gets lat long assuming that it has to get it from the associated stations, but in fact the Entrance itself """Gets lat long assuming that it has to get it from the associated stations
has easting/northing and lat/long fields which perhaps we should try first... or last ?!
""" """
if self.easting and self.northing: # if self.easting and self.northing: # hmm not a good idea I think
return utmToLatLng(33, float(self.easting), float(self.northing), northernHemisphere=True) # return utmToLatLng(33, float(self.easting), float(self.northing), northernHemisphere=True)
station = None station = None
if self.other_station: 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}." message = f"Failed to find cave from identifier given: {slug}."
return render(request, "errors/generic.html", {"message": message}) return render(request, "errors/generic.html", {"message": message})
# lack of validation for karea, it could be any 4 digits.
kpath = karea + subpath kpath = karea + subpath
# print(f" ! cavepage:'{kpath}' kataster area:'{karea}' rest of path:'{subpath}'") # print(f" ! cavepage:'{kpath}' kataster area:'{karea}' rest of path:'{subpath}'")
try: try:

View File

@ -77,9 +77,10 @@ poslineregex = re.compile(r"^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d
def LoadPositions(): def LoadPositions():
"""First load the survex stations for entrances and fixed points (about 600) into the database. """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 Run 'cavern' to produce a complete .3d file, then run 'survexport -pos' to produce a table of
all survey point positions. Then lookup each position by name to see if we have it in the database all survey point positions in UTM cooridnates. Then lookup each of the 600 positions by name to
and if we do, then save the x/y/z coordinates. This gives us coordinates of the entrances. 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. If we don't have it in the database, print an error message and discard it.
""" """
svx_t = 0 svx_t = 0