accessmod/processing.py
def generate_geojson(src_file: str, dst_file: str) -> str:
    """Generate a GeoJSON copy from input vector file.

    This is for dataviz purposes. NB: Paths must be local.
    """
    # target crs is epsg:4326 in dataviz
    DST_CRS = CRS.from_epsg(4326)

    src_geodata = gpd.read_file(src_file)

    # set default crs
    if not src_geodata.crs:
        src_geodata.crs = DST_CRS

    # reproject if needed
    if src_geodata.crs == DST_CRS:
        return src_file
    else:
        dst_geodata = src_geodata.to_crs(DST_CRS)
        dst_geodata.to_file(dst_file, driver="GeoJSON")

    return dst_file
Generate a GeoJSON copy from input vector file.

    This is for dataviz purposes. NB: Paths must be local.
    
Generate a GeoJSON copy from input vector file.
This is for dataviz purposes. NB: Paths must be local.
Generate a GeoJSON copy from input vector file . This is for dataviz purposes . NB : Paths must be local .
def generate_geojson(src_file: str, dst_file: str) -> str:
    DST_CRS = CRS.from_epsg(4326)
    src_geodata = gpd.read_file(src_file)
    if not src_geodata.crs:
        src_geodata.crs = DST_CRS
    if src_geodata.crs == DST_CRS:
        return src_file
    else:
        dst_geodata = src_geodata.to_crs(DST_CRS)
        dst_geodata.to_file(dst_file, driver="GeoJSON")
    return dst_file
def generate_geojson ( src_file : str , dst_file : str ) -> str : DST_CRS = CRS . from_epsg ( 4326 ) src_geodata = gpd . read_file ( src_file ) if not src_geodata . crs : src_geodata . crs = DST_CRS if src_geodata . crs == DST_CRS : return src_file else : dst_geodata = src_geodata . to_crs ( DST_CRS ) dst_geodata . to_file ( dst_file , driver = "GeoJSON" ) return dst_file
Generate a GeoJSON copy from input vector file.
Generate a GeoJSON copy from input vector file .
"""Generate a GeoJSON copy from input vector file.

    This is for dataviz purposes. NB: Paths must be local.
    """ # target crs is epsg:4326 in dataviz # set default crs # reproject if needed
src_file
str
dst_file
str