def bounds_to_geojson(bounds):
    """
    Convert a rio BoundingBox to geojson with optional buffer
    :param bounds: BoundingBox
    :return: geojson with applied buffer
    """
    return {
        "type": "Polygon",
        "coordinates": [
            [
                [bounds.left, bounds.top],
                [bounds.right, bounds.top],
                [bounds.right, bounds.bottom],
                [bounds.left, bounds.bottom],
                [bounds.left, bounds.top],
            ]
        ],
    }