Esempio n. 1
0
def byDistanceTo(x, y=None):
    """ Method to compare two Region objects by distance of their top left.
    or a regions top left to the given point by coordinates"""
    return DistanceComparator(x, y)
Esempio n. 2
0
def distanceComparator(x, y=None):
    """ Method to compare two Region objects by distance of their top left.
    or a regions top left to the given point by coordinates"""
    if y is None:
        return DistanceComparator(x).compare  # x is Region or Location
    return DistanceComparator(x, y).compare  # x/y as coordinates