accessmod/processing.py
def enforce_crs(geodataframe: gpd.GeoDataFrame, crs: CRS) -> gpd.GeoDataFrame:
    """Enforce a given CRS on a geodataframe.

    If the geodataframe does not have any CRS assigned, it is assumed
    to be in WGS84.

    Parameters
    ----------
    geodataframe : geodataframe
        Input geopandas geodataframe.
    crs : pyproj CRS
        Target CRS.

    Return
    ------
    geodataframe
        Projected geodataframe.
    """
    if not geodataframe.crs:
        geodataframe.crs = CRS.from_epsg(4326)
        logger.debug("Geodataframe did not have any CRS assigned.")
    if geodataframe.crs != crs:
        geodataframe.to_crs(crs, inplace=True)
        logger.debug("Reprojected geodataframe.")
    return geodataframe
Enforce a given CRS on a geodataframe.

    If the geodataframe does not have any CRS assigned, it is assumed
    to be in WGS84.

    Parameters
    ----------
    geodataframe : geodataframe
        Input geopandas geodataframe.
    crs : pyproj CRS
        Target CRS.

    Return
    ------
    geodataframe
        Projected geodataframe.
    
Enforce a given CRS on a geodataframe.
If the geodataframe does not have any CRS assigned, it is assumed
to be in WGS84.

Parameters



Return

geodataframe
Projected geodataframe.
Enforce a given CRS on a geodataframe . If the geodataframe does not have any CRS assigned it is assumed to be in WGS84 . Parameters Return geodataframe Projected geodataframe .
def enforce_crs(geodataframe: gpd.GeoDataFrame, crs: CRS) -> gpd.GeoDataFrame:
    if not geodataframe.crs:
        geodataframe.crs = CRS.from_epsg(4326)
        logger.debug("Geodataframe did not have any CRS assigned.")
    if geodataframe.crs != crs:
        geodataframe.to_crs(crs, inplace=True)
        logger.debug("Reprojected geodataframe.")
    return geodataframe
def enforce_crs ( geodataframe : gpd . GeoDataFrame , crs : CRS ) -> gpd . GeoDataFrame : if not geodataframe . crs : geodataframe . crs = CRS . from_epsg ( 4326 ) logger . debug ( "Geodataframe did not have any CRS assigned." ) if geodataframe . crs != crs : geodataframe . to_crs ( crs , inplace = True ) logger . debug ( "Reprojected geodataframe." ) return geodataframe
Enforce a given CRS on a geodataframe.
Enforce a given CRS on a geodataframe .
"""Enforce a given CRS on a geodataframe.

    If the geodataframe does not have any CRS assigned, it is assumed
    to be in WGS84.

    Parameters
    ----------
    geodataframe : geodataframe
        Input geopandas geodataframe.
    crs : pyproj CRS
        Target CRS.

    Return
    ------
    geodataframe
        Projected geodataframe.
    """
geodataframe
gpd.GeoDataFrame
crs
CRS