def polygon_extrema(polygon):
    """
    Returns the longitude and latitude extrema from a geojson polygon.
    """
    polygon_geometry = polygon.features[0].geometry.coordinates[0][0]
    min_lon = polygon_geometry[0][0]
    max_lon = polygon_geometry[0][0]
    min_lat = polygon_geometry[0][1]
    max_lat = polygon_geometry[0][1]
    for [lon, lat] in polygon_geometry:
        if min_lon > lon:
            min_lon = lon
        if max_lon < lon:
            max_lon = lon
        if min_lat > lat:
            min_lat = lat
        if max_lat < lat:
            max_lat = lat
    return (min_lon, max_lon, min_lat, max_lat)