grids.py 文件源码

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

项目:rastercube 作者: terrai 项目源码 文件源码
def get_cell_for_tile(self, tile):
        """
        Returns the cell corresponding to the given GLCF tile. The tile
        is identified by its UTM identifier (e.g. HG5152)
        """
        assert self.cell_width == self.GLCF_tile_width
        assert self.cell_height == self.GLCF_tile_height
        row_from = tile[0]
        row_to = tile[1]
        col_from = int(tile[2:4])
        col_to = int(tile[4:6])

        i = self.ROW_MAP[row_from.upper()] / 2
        j = (col_from - 1) / 2
        # print "GLCF cell ", i, j

        fracnum = np.ravel_multi_index((i, j), (self.n_cells_y, self.n_cells_x))
        return fracnum
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号