verify.py 文件源码

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

项目:wradlib 作者: wradlib 项目源码 文件源码
def __init__(self, r, az, sitecoords, proj, x, y, nnear=9):
        self.nnear = nnear
        self.az = az
        self.r = r
        self.x = x
        self.y = y
        # compute the centroid coordinates in lat/lon
        bin_lon, bin_lat = georef.polar2centroids(r, az, sitecoords)
        # reproject the centroids to cartesian map coordinates
        binx, biny = georef.reproject(bin_lon, bin_lat,
                                      projection_target=proj)
        self.binx, self.biny = binx.ravel(), biny.ravel()
        # compute the KDTree
        tree = KDTree(list(zip(self.binx, self.biny)))
        # query the tree for nearest neighbours
        self.dist, self.ix = tree.query(list(zip(x, y)), k=nnear)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号