def get_geolocation(image_path):
    """Retrieves the geolocation information from the given GeoTIFF image.

    The returned :class:`fiftyone.core.labels.GeoLocation` will contain the
    lon/lat coordinates of the center of the image in its ``point`` attribute
    and the coordinates of its corners (clockwise, starting from the top-left)
    in its ``polygon`` attribute.

    Args:
        image_path: the path to the GeoTIFF image

    Returns:
        a :class:`fiftyone.core.labels.GeoLocation`
    """
    with open(image_path, "rb") as f:
        with rasterio.open(f, "r") as image:
            center = image.transform * (0.5 * image.width, 0.5 * image.height)

            proj = pyproj.Proj(image.crs)
            cp = proj(*center, inverse=True)
            tl = proj(image.bounds.left, image.bounds.top, inverse=True)
            tr = proj(image.bounds.right, image.bounds.top, inverse=True)
            br = proj(image.bounds.right, image.bounds.bottom, inverse=True)
            bl = proj(image.bounds.left, image.bounds.bottom, inverse=True)

    return fol.GeoLocation(point=cp, polygon=[[tl, tr, br, bl, tl]])
Retrieves the geolocation information from the given GeoTIFF image.

    The returned :class:`fiftyone.core.labels.GeoLocation` will contain the
    lon/lat coordinates of the center of the image in its ``point`` attribute
    and the coordinates of its corners (clockwise, starting from the top-left)
    in its ``polygon`` attribute.

    Args:
        image_path: the path to the GeoTIFF image

    Returns:
        a :class:`fiftyone.core.labels.GeoLocation`
    
fiftyone/utils/geotiff.py