def _find_bboxes_in_rect(bboxes, left, bottom, right, top):
    """ Given a list of polygon bounding boxes and a rectangle defined by
    left/bottom/right/top, this function returns those polygons which overlap
    the rectangle. """
    result = (bboxes[:,0] <= right) & (bboxes[:,2] >= left) & \
             (bboxes[:,1] <= top)   & (bboxes[:,3] >= bottom)
    return result