def create_rectange_polygon(center: tuple, size_func, colour: str='#BE00FF',
    fill_opacity: float=1):
    """Creates a json describing a rectangle that is sent to Mapbox to be drawn on the request image."""
    size = size_func(center[2])
    tl = [center[1] - size, center[0] + size]
    tr = [center[1] + size, center[0] + size]
    br = [center[1] + size, center[0] - size]
    bl = [center[1] - size, center[0] - size]
    return {'type': 'Feature', 'geometry': {'type': 'Polygon',
        'coordinates': [[tl, tr, br, bl, tl]]}, 'properties': {'stroke':
        colour, 'fill': colour, 'fill-opacity': fill_opacity}}
