def partition_bbox(xmin, ymin, xmax, ymax):
    """ Cut a bounding box into four smaller bounding boxes.
    """
    xmid, ymid = xmin / 2 + xmax / 2, ymin / 2 + ymax / 2

    return [
        (xmin, ymin, xmid, ymid),
        (xmin, ymid, xmid, ymax),
        (xmid, ymin, xmax, ymid),
        (xmid, ymid, xmax, ymax),
    ]