feat(530-1 · 530-2): D 예정노선 지형 받기 · 2단계 분석 서버 — B05 엔진 인자 셋(models_dir · cache_dir · 복도 반폭) · D03 지형 서비스 · 분석 · API

- B05 지형 로더 models_dir · cache_dir=None · 비용면 cache_dir=None · 탐색 복도 corridor_m(기본 100 m · 기본이면 묶음 열쇠 그대로)
- D03_PlanAnalysis_Terrain — 지점 + 1 km 표본 3×3 도엽 · prune 없음 · 병합 옛 ∪ 새 · 위성 합집합 · 연도별 models_<연도> DEM · plan.prj
- D03_PlanAnalysis_Analyze — 연도 구간마다 갈래 넷 · 법정 기준 · 누가 이어 셈 · 파생 저장본(입력 지문)
- D03_PlanAnalysis_Router — POST plan/terrain · plan/analyze(뒤에서 · 진행률) · GET plan/progress · plan/analysis · PUT [저장]
- 지킴 시험 test_530_1_plan_terrain · test_530_2_plan_analyze · test_530_2_plan_router

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 19:38:40 +09:00
co-authored by Claude Opus 5.5
parent bc39953fbd
commit 17534a01ad
10 changed files with 1070 additions and 10 deletions
+10 -3
View File
@@ -212,11 +212,18 @@ def _build_cost_surface(models_dir: Path, filter_key: str, method: str, smooth:
def _load_or_build_cost_surface(
project_root: Path, models_dir: Path, filter_key: str, method: str, smooth: bool
project_root: Path,
models_dir: Path,
filter_key: str,
method: str,
smooth: bool,
cache_dir: Path | None = None,
):
"""비용면을 반환한다(서명 일치 시 캐시 재사용, 아니면 재빌드·재캐시)."""
"""비용면을 반환한다(서명 일치 시 캐시 재사용, 아니면 재빌드·재캐시).
`cache_dir` 없으면 `B05_Profile/route` — D 예정노선은 연도 구간마다 따로 줌(530-2)."""
check_surface_keys(filter_key, method)
cache_dir = project_root / _ROUTE_CACHE_SUBDIR
cache_dir = project_root / _ROUTE_CACHE_SUBDIR if cache_dir is None else Path(cache_dir)
suffix = "_smooth" if smooth else ""
cache_path = cache_dir / f"cost_surface_{filter_key}_{method}{suffix}.npz"
signature = _cost_surface_signature(models_dir, filter_key, method, smooth)