Given bounding box and one of the parameters width or height it will return the other parameter that will best
    fit the bounding box dimensions

    :param bbox: bounding box
    :type bbox: geometry.BBox
    :param width: image width or None if height is unknown
    :type width: int or None
    :param height: image height or None if height is unknown
    :type height: int or None
    :return: width or height rounded to integer
    :rtype: int

def get_image_dimension(bbox, width=None, height=None):
    """ Given bounding box and one of the parameters width or height it will return the other parameter that will best
    fit the bounding box dimensions

    :param bbox: bounding box
    :type bbox: geometry.BBox
    :param width: image width or None if height is unknown
    :type width: int or None
    :param height: image height or None if height is unknown
    :type height: int or None
    :return: width or height rounded to integer
    :rtype: int
    """
    utm_bbox = to_utm_bbox(bbox)
    east1, north1 = utm_bbox.lower_left
    east2, north2 = utm_bbox.upper_right
    if isinstance(width, int):
        return round(width * abs(north2 - north1) / abs(east2 - east1))
    return round(height * abs(east2 - east1) / abs(north2 - north1))