tile_system.py
def tile_to_quadkey(tile, level):
        """Transform tile coordinates to a quadkey"""
        tile_x = tile[:,0]
        tile_y = tile[:,1]
        quadkey = pd.DataFrame("'",index=np.arange(len(tile)),columns=['qk'])
        for i in range(level):
            bit = level - i
            digit = np.zeros_like(tile_x)
            mask = 1 << (bit - 1)  # if (bit - 1) > 0 else 1 >> (bit - 1)
            digit += ((tile_x & mask) != 0)*1
            digit += ((tile_y & mask) != 0)*2
            quadkey.qk = quadkey.qk + digit.astype(str)

        return quadkey.values.astype(str)
Transform tile coordinates to a quadkey
Transform tile coordinates to a quadkey
Transform tile coordinates to a quadkey
def tile_to_quadkey(tile, level):
        tile_x = tile[:,0]
        tile_y = tile[:,1]
        quadkey = pd.DataFrame("'",index=np.arange(len(tile)),columns=['qk'])
        for i in range(level):
            bit = level - i
            digit = np.zeros_like(tile_x)
            mask = 1 << (bit - 1)  
            digit += ((tile_x & mask) != 0)*1
            digit += ((tile_y & mask) != 0)*2
            quadkey.qk = quadkey.qk + digit.astype(str)
        return quadkey.values.astype(str)
def tile_to_quadkey ( tile , level ) : tile_x = tile [ : , 0 ] tile_y = tile [ : , 1 ] quadkey = pd . DataFrame ( "'" , index = np . arange ( len ( tile ) ) , columns = [ 'qk' ] ) for i in range ( level ) : bit = level - i digit = np . zeros_like ( tile_x ) mask = 1 << ( bit - 1 ) digit += ( ( tile_x & mask ) != 0 ) * 1 digit += ( ( tile_y & mask ) != 0 ) * 2 quadkey . qk = quadkey . qk + digit . astype ( str ) return quadkey . values . astype ( str )
Transform tile coordinates to a quadkey
Transform tile coordinates to a quadkey
"""Transform tile coordinates to a quadkey""" # if (bit - 1) > 0 else 1 >> (bit - 1)
tile
level