__init__.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:osm_rg 作者: Scitator 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号