diff --git a/B04_PreProcess/B04_PreProcess_Router_Inflow.py b/B04_PreProcess/B04_PreProcess_Router_Inflow.py index 594e143a..ab520978 100644 --- a/B04_PreProcess/B04_PreProcess_Router_Inflow.py +++ b/B04_PreProcess/B04_PreProcess_Router_Inflow.py @@ -27,7 +27,7 @@ from B04_PreProcess.B04_PreProcess_Engine_Watershed_Grid import GridSpec from B05_Profile.B05_Profile_Repository import get_surface_crs_epsg from common_util.common_util_route_geometry import ( find_planned_route_file, - read_planned_route_csv, + read_planned_route, ) from common_util.common_util_storage import resolve_stored_project_path from config.config_db import get_db_pool @@ -80,7 +80,7 @@ async def _resolve_epsg(project_id: UUID, stored_path: str) -> str: epsg = await get_surface_crs_epsg(connection, project_id, 0) project_root = Path(resolve_stored_project_path(stored_path)) route_file = find_planned_route_file(project_root / "B03_FileInput" / "input") - planned = read_planned_route_csv(route_file) if route_file else None + planned = read_planned_route(route_file) if route_file else None source = (planned.epsg if planned else None) or epsg or 5186 return f"EPSG:{source}" diff --git a/B04_PreProcess/B04_PreProcess_Router_Watershed.py b/B04_PreProcess/B04_PreProcess_Router_Watershed.py index 54949168..d77acbc9 100644 --- a/B04_PreProcess/B04_PreProcess_Router_Watershed.py +++ b/B04_PreProcess/B04_PreProcess_Router_Watershed.py @@ -39,7 +39,7 @@ from B05_Profile.B05_Profile_Repository import get_surface_crs_epsg from common_util.common_util_route_geometry import ( StructureCandidate, find_planned_route_file, - read_planned_route_csv, + read_planned_route, ) from common_util.common_util_storage import resolve_stored_project_path from common_util.common_util_wamis_rainfall import ( @@ -172,7 +172,7 @@ async def _prepare(project_id: UUID) -> dict[str, Any] | JSONResponse: status_code=404, content={"status": "error", "message": "계획 노선 파일이 업로드되지 않았습니다."}, ) - planned = read_planned_route_csv(route_file) + planned = read_planned_route(route_file) if planned is None or len(planned.vertices) < 2: return JSONResponse( status_code=400, @@ -246,7 +246,7 @@ def _route_center_lonlat(stored_path: str, fallback_epsg: int | None) -> tuple[f route_file = find_planned_route_file(_route_input_dir(stored_path)) if route_file is None: return None - planned = read_planned_route_csv(route_file) + planned = read_planned_route(route_file) if planned is None or not planned.vertices: return None middle = planned.vertices[len(planned.vertices) // 2] diff --git a/common_util/common_util_drainage_context.py b/common_util/common_util_drainage_context.py index 9bc3b0f3..bce2711f 100644 --- a/common_util/common_util_drainage_context.py +++ b/common_util/common_util_drainage_context.py @@ -31,7 +31,7 @@ from common_util.common_util_route_geometry import ( RouteVertex, build_route_vertices, find_planned_route_file, - read_planned_route_csv, + read_planned_route, ) from common_util.common_util_route_profile import Z_SOURCE_CSV, resolve_route_profile from common_util.common_util_storage import resolve_stored_project_path @@ -114,7 +114,7 @@ async def load_drainage_context(project_id: UUID) -> tuple[DrainageContext | Non def _read_planned_route(project_root: Path): """원청 계획노선 CSV를 찾아 읽는다(파일 접근이라 스레드에서 돈다).""" path = find_planned_route_file(project_root / _INPUT_SUBDIR) - return read_planned_route_csv(path) if path else None + return read_planned_route(path) if path else None def _open_sampler(project_root: Path, surface_params: dict[str, Any]):