def _parse_bbox_list(bbox_list):
        """ Helper method for parsing a list of bounding boxes
        """
        if isinstance(bbox_list, BBoxCollection):
            return bbox_list.bbox_list, bbox_list.crs

        if not isinstance(bbox_list, list) or not bbox_list:
            raise ValueError('Expected non-empty list of BBox objects')

        for bbox in bbox_list:
            if not isinstance(bbox, BBox):
                raise ValueError('Elements in the list should be of type {}, got {}'.format(BBox.__name__, type(bbox)))

        crs = bbox_list[0].crs
        for bbox in bbox_list:
            if bbox.crs is not crs:
                raise ValueError('All bounding boxes should have the same CRS')

        return bbox_list, crs
def _parse_bbox_list ( bbox_list ) : if isinstance ( bbox_list , BBoxCollection ) : return bbox_list . bbox_list , bbox_list . crs if not isinstance ( bbox_list , list ) or not bbox_list : raise ValueError ( 'Expected non-empty list of BBox objects' ) for bbox in bbox_list : if not isinstance ( bbox , BBox ) : raise ValueError ( 'Elements in the list should be of type {}, got {}' . format ( BBox . __name__ , type ( bbox ) ) ) crs = bbox_list [ 0 ] . crs for bbox in bbox_list : if bbox . crs is not crs : raise ValueError ( 'All bounding boxes should have the same CRS' ) return bbox_list , crs
Helper method for parsing a list of bounding boxes