feat(B05): 계획노선 편집 분석 지형 고르기 — 라이다 있는 프로젝트도 수치지형도로 분석(133-1)

- 편집 모달 「분석 지형: 라이다 · 수치지형도」 고르기 · 라이다와 수치지형도 서피스가 둘 다 있을 때만 보임 · 기본 라이다 · 값은 화면 상태 pref(routeedit-terrain)
- 고르면 등고선 · 구간 기울기 · 거리 재기 지반고 · 횡단 미리보기 · 종단 띠를 고른 지형으로 다시 그림 · 노선 추천도 고른 지형으로 요청
- 서버 통로(elevations · cross-preview · profile-preview · initial)가 terrain(las · sheet) 을 받아 sampler 를 고름 · GET route/terrain-sources 새 길
- 확정 params · [확인] 재계산 · 종 · 횡단 · 3D 정본은 안 바뀜
- 지표면 허용 목록에 sheet_* 여섯 넣음 — 54-22 뒤 LAS 없는 프로젝트 sheet_laplace 가 막혀 있던 길도 풀림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoSr2sqvYtBf1dtQdus88s
This commit is contained in:
2026-10-09 09:27:57 +09:00
co-authored by Claude Opus 5.5
parent 338c307620
commit 9f717a6a72
15 changed files with 396 additions and 36 deletions
@@ -1,17 +1,24 @@
"""WF1 지표면 확정 선택값의 기본값·DB 스냅샷 처리."""
import json
from typing import Any
from pathlib import Path
from typing import Any, Literal
import aiomysql
from config.config_system import (
SHEET_SURFACE_DEFAULT_METHOD,
SURFACE_CONFIRM_DEFAULT_FILTER,
SURFACE_CONFIRM_DEFAULT_METHOD,
SURFACE_CONFIRM_DEFAULT_SMOOTH,
SURFACE_CONTOUR_INTERVAL_M,
)
#: B05 계획노선 편집 모달의 분석 지형 — las = 확정 지표면 그대로 · sheet = 수치지형도 서피스
AnalysisTerrain = Literal["las", "sheet"]
#: 수치지형도 분석 지형 — LAS 없는 프로젝트 자동 확정(WF1)과 같은 모델
SHEET_ANALYSIS_FILTER = f"sheet_{SHEET_SURFACE_DEFAULT_METHOD}"
SURFACE_CONFIRM_PARAM_KEYS = (
"source_filter",
"method",
@@ -63,6 +70,26 @@ async def get_surface_confirmation_params(
return resolved
def _is_sheet(params: dict[str, Any]) -> bool:
return str(params.get("source_filter") or "").startswith("sheet_")
def analysis_terrain_params(params: dict[str, Any], terrain: AnalysisTerrain) -> dict[str, Any]:
"""편집 모달 분석에 쓸 지표면 params — 확정 params 는 안 고침(정본 · 종 · 횡단 그대로)."""
if terrain != "sheet" or _is_sheet(params):
return params
return {**params, "source_filter": SHEET_ANALYSIS_FILTER, "method": "dtm", "smooth": True}
def analysis_terrain_sources(params: dict[str, Any], models_dir: Path) -> list[str]:
"""고를 수 있는 분석 지형 — 확정이 LAS 이고 수치지형도 서피스가 있을 때만 둘."""
if _is_sheet(params):
return ["sheet"]
if (Path(models_dir) / f"dtm_{SHEET_ANALYSIS_FILTER}.npz").is_file():
return ["las", "sheet"]
return ["las"]
async def update_contour_interval_param(
connection: aiomysql.Connection,
project_id: str,