(self, to)
Generator
            Gives the difference of quadkeys between self and to
            Generator in case done on a low level
            Only works with quadkeys of same level
Generator
            Gives the difference of quadkeys between self and to
            Generator in case done on a low level
            Only works with quadkeys of same level
Generator Gives the difference of quadkeys between self and to Generator in case done on a low level Only works with quadkeys of same level
def xdifference(self, to):
        """ Generator
            Gives the difference of quadkeys between self and to
            Generator in case done on a low level
            Only works with quadkeys of same level
        """
        x,y = 0,1
        assert self.level == to.level
        self_tile = list(self.to_tile()[0])
        to_tile = list(to.to_tile()[0])
        if self_tile[x] >= to_tile[x] and self_tile[y] <= self_tile[y]:
            ne_tile, sw_tile = self_tile, to_tile
        else:
            sw_tile, ne_tile = self_tile, to_tile
        cur = ne_tile[:]
        while cur[x] >= sw_tile[x]:
            while cur[y] <= sw_tile[y]:
                yield from_tile(tuple(cur), self.level)
                cur[y] += 1
            cur[x] -= 1
            cur[y] = ne_tile[y]
def xdifference ( self , to ) : x , y = 0 , 1 assert self . level == to . level self_tile = list ( self . to_tile ( ) [ 0 ] ) to_tile = list ( to . to_tile ( ) [ 0 ] ) if self_tile [ x ] >= to_tile [ x ] and self_tile [ y ] <= self_tile [ y ] : ne_tile , sw_tile = self_tile , to_tile else : sw_tile , ne_tile = self_tile , to_tile cur = ne_tile [ : ] while cur [ x ] >= sw_tile [ x ] : while cur [ y ] <= sw_tile [ y ] : yield from_tile ( tuple ( cur ) , self . level ) cur [ y ] += 1 cur [ x ] -= 1 cur [ y ] = ne_tile [ y ]