forked from expo/troggle
survex legs bug fix
This commit is contained in:
parent
70efb10ece
commit
42b615d16b
parsers
@ -708,7 +708,7 @@ def LoadLogbooks():
|
|||||||
expd[year] += 1
|
expd[year] += 1
|
||||||
yt=0
|
yt=0
|
||||||
for y in expd:
|
for y in expd:
|
||||||
print("{} {}".format(y, expd[y]), nlbe[y])
|
# print("{} {}".format(y, expd[y]), nlbe[y])
|
||||||
yt += expd[y]
|
yt += expd[y]
|
||||||
print("total {} log entries in all expeditions".format(yt))
|
print("total {} log entries in all expeditions".format(yt))
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ class LoadingSurvex():
|
|||||||
if cave:
|
if cave:
|
||||||
newdirectory.cave = cave
|
newdirectory.cave = cave
|
||||||
newfile.cave = cave
|
newfile.cave = cave
|
||||||
print("\n"+str(newdirectory.cave),file=sys.stderr)
|
# print(f"\n - New directory {newdirectory} for cave {newdirectory.cave}",file=sys.stderr)
|
||||||
else: # probably a surface survey
|
else: # probably a surface survey
|
||||||
self.ReportNonCaveIncludes(headpath, svxid)
|
self.ReportNonCaveIncludes(headpath, svxid)
|
||||||
|
|
||||||
@ -1063,8 +1063,8 @@ class LoadingSurvex():
|
|||||||
else: # not a *cmd so we are reading data OR a ";" rx_comment failed. We hope.
|
else: # not a *cmd so we are reading data OR a ";" rx_comment failed. We hope.
|
||||||
self.LoadSurvexLeg(survexblock, sline, comment)
|
self.LoadSurvexLeg(survexblock, sline, comment)
|
||||||
|
|
||||||
self.legsnumber = slengthtotal
|
self.legsnumber = nlegstotal
|
||||||
self.slength = nlegstotal
|
self.slength = slengthtotal
|
||||||
|
|
||||||
def PushdownStackScan(self, survexblock, path, fin, flinear, fcollate):
|
def PushdownStackScan(self, survexblock, path, fin, flinear, fcollate):
|
||||||
"""Follows the *include links in all the survex files from the root file 1623.svx
|
"""Follows the *include links in all the survex files from the root file 1623.svx
|
||||||
@ -1382,6 +1382,7 @@ def FindAndLoadSurvex(survexblockroot):
|
|||||||
for d in svx_load.survexdict:
|
for d in svx_load.survexdict:
|
||||||
tf += len(svx_load.survexdict[d])
|
tf += len(svx_load.survexdict[d])
|
||||||
print(" - Number of SurvexFiles: {}".format(tf))
|
print(" - Number of SurvexFiles: {}".format(tf))
|
||||||
|
print(f" - Number of Survex legs: {legsnumber}")
|
||||||
svx_load = None
|
svx_load = None
|
||||||
|
|
||||||
return legsnumber
|
return legsnumber
|
||||||
@ -1421,14 +1422,13 @@ def LoadSurvexBlocks():
|
|||||||
print(' - Loading Survex Blocks...')
|
print(' - Loading Survex Blocks...')
|
||||||
memstart = get_process_memory()
|
memstart = get_process_memory()
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
legsnumber = FindAndLoadSurvex(survexblockroot)
|
FindAndLoadSurvex(survexblockroot)
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
memend = get_process_memory()
|
memend = get_process_memory()
|
||||||
print(" - MEMORY start:{:.3f} MB end:{:.3f} MB increase={:.3f} MB".format(memstart,memend, memend-memstart))
|
print(" - MEMORY start:{:.3f} MB end:{:.3f} MB increase={:.3f} MB".format(memstart,memend, memend-memstart))
|
||||||
|
|
||||||
survexblockroot.save()
|
survexblockroot.save()
|
||||||
|
|
||||||
print(" - total number of survex legs: {}".format(legsnumber))
|
|
||||||
print(' - Loaded All Survex Blocks.')
|
print(' - Loaded All Survex Blocks.')
|
||||||
|
|
||||||
poslineregex = re.compile(r"^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*)\s*\)\s*([^\s]+)$")
|
poslineregex = re.compile(r"^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*)\s*\)\s*([^\s]+)$")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user