def __init__(self, mode=1, precision_mode=2):
self.mode = mode
if precision_mode == 0:
loc_path = RG_FILE_1000
elif precision_mode == 1:
loc_path = RG_FILE_5000
else:
loc_path = RG_FILE_15000
if not os.path.exists(loc_path):
loc_path = rel_path(loc_path)
# coordinates, locations = self.extract(path)
coordinates, self.locations = self.extract(loc_path)
if mode == 1: # Single-process
self.tree = KDTree(coordinates)
else: # Multi-process
self.tree = KDTree_MP.cKDTree_MP(coordinates)
评论列表
文章目录