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
12 changes: 12 additions & 0 deletions siteupdate/python-teresco/siteupdate.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,15 @@ def total_nodes(self):
else:
return 1 + self.nw_child.total_nodes() + self.ne_child.total_nodes() + self.sw_child.total_nodes() + self.se_child.total_nodes()

def sort(self):
if self.points is None:
self.ne_child.sort()
self.nw_child.sort()
self.se_child.sort()
self.sw_child.sort()
else:
self.points.sort(key=lambda waypoint: waypoint.route.root + "@" + waypoint.label)

class Waypoint:
"""This class encapsulates the information about a single waypoint
from a .wpt file.
Expand DownExpand Up@@ -2146,6 +2155,9 @@ def run(self):
#for h in highway_systems:
# read_wpts_for_highway_system(h)

print(et.et() + "Sorting waypoints in Quadtree.")
all_waypoints.sort()

print(et.et() + "Finding unprocessed wpt files.", flush=True)
unprocessedfile = open(args.logfilepath+'/unprocessedwpts.log','w',encoding='utf-8')
if len(all_wpt_files) > 0:
Expand Down