def bbox_to_resolution(bbox, width, height):
    """ Calculates pixel resolution in meters for a given bbox of a given width and height.

    :param bbox: bounding box
    :type bbox: geometry.BBox
    :param width: width of bounding box in pixels
    :type width: int
    :param height: height of bounding box in pixels
    :type height: int
    :return: resolution east-west at north and south, and resolution north-south in meters for given CRS
    :rtype: float, float
    :raises: ValueError if CRS is not supported
    """
    utm_bbox = to_utm_bbox(bbox)
    east1, north1 = utm_bbox.lower_left
    east2, north2 = utm_bbox.upper_right
    return abs(east2 - east1) / width, abs(north2 - north1) / height
def bbox_to_resolution ( bbox , width , height ) : utm_bbox = to_utm_bbox ( bbox ) east1 , north1 = utm_bbox . lower_left east2 , north2 = utm_bbox . upper_right return abs ( east2 - east1 ) / width , abs ( north2 - north1 ) / height
Calculates pixel resolution in meters for a given bbox of a given width and height.

    :param bbox: bounding box
    :type bbox: geometry.BBox
    :param width: width of bounding box in pixels
    :type width: int
    :param height: height of bounding box in pixels
    :type height: int
    :return: resolution east-west at north and south, and resolution north-south in meters for given CRS
    :rtype: float, float
    :raises: ValueError if CRS is not supported