Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions siteupdate/python-teresco/siteupdate.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -2242,13 +2242,14 @@ def run(self):
# read in fp file
nmpfplist = []
nmpfpfile = open(args.highwaydatapath+'/nmpfps.log','r')
nmpfilelines = nmpfpfile.readlines()
for line in nmpfilelines:
nmpfpfilelines = nmpfpfile.readlines()
for line in nmpfpfilelines:
if len(line.rstrip('\n ')) > 0:
nmpfplist.append(line.rstrip('\n '))
nmpfpfile.close()

nmpfile = open(args.logfilepath+'/nearmisspoints.log','w')
nmploglines = []
nmplog = open(args.logfilepath+'/nearmisspoints.log','w')
nmpnmp = open(args.logfilepath+'/tm-master.nmp','w')
for w in all_waypoints.point_list():
if w.near_miss_points is not None:
Expand DownExpand Up@@ -2287,15 +2288,21 @@ def run(self):
extra_field += "LI"
if extra_field != "":
extra_field = " " + extra_field
nmpfile.write(nmpline.rstrip() + '\n')
nmploglines.append(nmpline.rstrip())

# write actual lines to nmp file, indicating FP and/or LI
# write actual lines to .nmp file, indicating FP and/or LI
# for marked FPs or looks intentional items
for nmpnmpline in nmpnmplines:
nmpnmp.write(nmpnmpline + extra_field + "\n")
nmpfile.close()
nmpnmp.close()

# sort and write actual lines to nearmisspoints.log
nmploglines.sort()
for n in nmploglines:
nmplog.write(n + '\n')
nmploglines = None
nmplog.close()

# report any unmatched nmpfps.log entries
nmpfpsunmatchedfile = open(args.logfilepath+'/nmpfpsunmatched.log','w')
for line in nmpfplist:
Expand Down