fix(B04): 배수유역·유입·배수 컨텍스트도 shapefile 노선을 읽게 한다
실측(2026-08-31): 업로드 후 화면에서 "계획 노선 CSV를 읽지 못했습니다: ...shp" 경고가 반복됐다. find_planned_route_file 은 shapefile을 우선 돌려주는데 받는 쪽이 아직 read_planned_route_csv 였다 - 확장자 분기가 없는 판독기라 .shp 를 CSV로 열다 실패하고 노선 없이 진행했다. 앞선 커밋에서 Service_Chain, SheetSurface, Router_GIS 는 바꿨으나 아래 세 곳을 놓쳤다(조사 당시 grep 출력이 잘려 목록에서 빠졌다): - B04_PreProcess_Router_Watershed.py (2곳) - B04_PreProcess_Router_Inflow.py - common_util_drainage_context.py 셋 다 read_planned_route 로 바꿨다 - CSV/shapefile을 확장자로 갈라 읽는다. 검증: ruff check 통과, tmp/tests 302 passed (잔여 실패 11건은 기존 실패로 HEAD 사본에서 동일 재현). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user