def project_geometry(
    geom: Geometry,
    *,
    crs: Any | None = None,  # noqa: ANN401
    to_crs: Any | None = None,  # noqa: ANN401
    to_latlong: bool = False,
) -> tuple[Geometry, Any]:
    """
    Project a Shapely geometry from its current CRS to another.

    If `to_latlong` is True, this projects the geometry to the coordinate
    reference system defined by `settings.default_crs`. Otherwise it projects
    it to the CRS defined by `to_crs`. If `to_crs` is `None`, it projects it
    to the CRS of an appropriate UTM zone given `geometry`'s bounds.

    Parameters
    ----------
    geom
        The geometry to be projected.
    crs
        The initial CRS of `geometry`. If None, it will be set to
        `settings.default_crs`.
    to_crs
        If None, project to an appropriate UTM zone. Otherwise project to this
        CRS.
    to_latlong
        If True, project to `settings.default_crs` and ignore `to_crs`.

    Returns
    -------
    geom_proj, crs
        The projected geometry and its new CRS.
    """
    if crs is None:
        crs = settings.default_crs

    gdf = gpd.GeoDataFrame(geometry=[geom], crs=crs)
    gdf_proj = project_gdf(gdf, to_crs=to_crs, to_latlong=to_latlong)
    geom_proj = gdf_proj["geometry"].iloc[0]
    return geom_proj, gdf_proj.crs

    Project a Shapely geometry from its current CRS to another.

    If `to_latlong` is True, this projects the geometry to the coordinate
    reference system defined by `settings.default_crs`. Otherwise it projects
    it to the CRS defined by `to_crs`. If `to_crs` is `None`, it projects it
    to the CRS of an appropriate UTM zone given `geometry`'s bounds.

    Parameters
    ----------
    geom
        The geometry to be projected.
    crs
        The initial CRS of `geometry`. If None, it will be set to
        `settings.default_crs`.
    to_crs
        If None, project to an appropriate UTM zone. Otherwise project to this
        CRS.
    to_latlong
        If True, project to `settings.default_crs` and ignore `to_crs`.

    Returns
    -------
    geom_proj, crs
        The projected geometry and its new CRS.
    
osmnx/projection.py