- 필터 = 업체 분류 · 점진 TIN · 둘의 다듬기 판만 · 분석 허용 목록 = Ground 등록부(available_filters) 한 벌 - 표현 = DTM · implicit 만 · 평활 = DTM 만 · config 기본 목록 · PRECOMPUTE · 설정 사전 맞춤(설정 지문 바뀜 — 768 에서 다시 지음) - 등고선 = 격자 · 굳힌 격자만(삼각망 굽기 · 외곽 맞춤 · implicit RBF 폴백 걷음) · 표본기 · 경로 찾기 tin · nurbs · meshfree 갈래 걷음 - 수치지형도 = 라플라스만(TIN 둘 · TPS · ANUDEM형 · 다중해상도 걷음) · B04 단추 하나 - 안 부르는 길 — B04 JSON 점군 GET · ground-stats GET + TS · B07 옛 계획평면도(라이다) 짓기 · lidar_source · LIDAR_ID · plan_lidar 종류 이름 · SOURCE_FILTER_LABELS · MODEL_METHODS(py) · MESH_* 설정 - 옛 manifest 의 지운 갈래 줄은 DB 로 되살리지 않음 · 옛 csf 행은 미리보기 · 등고선 그대로 열림 · 지운 이름 요청 = 400 - 낡은 글 — Ground · Pipeline 머리 · WF1 「없으면 csf」 · B07 음영 기본 「csf」 → 빈 값 · 등고선 폴백 「csf」 → 404 · B04 3D 보기 처음값 · B05 Schema · B06 Prebuild · 씨닝 설명 - 시험 지움 2 — test_b04_contour_raster · test_b04_contour_equivalence(지운 삼각망 굽기 · 없는 프로젝트를 봐 건너뛰던 것) - 시험 덜어냄 — test_b04_ground_filters CSF · 격자 최저 네 경우(지운 필터) - 시험 고침 — 허용 목록 · 형 검사에 걸린 csf · tin · grid_min_z · meshfree · tin_sheet 견본을 ptd · implicit · laplace 로(54_22 · 238_1 · 443 · 342_2 · 346_3 · 351_1 · 442_2 · 271 + helper · 344_1 · 133_1 · 343_2 · 637 · 754_1 · 763_1 깨진 tin → 깨진 implicit · 763_3 · b05 둘 · b06 · sheet_surface TIN(도엽선) 경우 지움) · 이름만 바꿈(273_2 · 343_1 · 343_3 · 624_1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
2.8 KiB
Python
67 lines
2.8 KiB
Python
"""측점 없는 구조물 알림 — 조용히 빠지던 것을 드러낸다 (계획서 3-14 ㉯, 2026-09-09).
|
|
|
|
관을 나중에 놓거나 옮기면 그 측점이 안 생긴다 — 측점을 만드는 자리가 B05 노선 [확정]
|
|
한 곳뿐이기 때문이다. 그 관은 횡단도에도 안 서고 수량·금액에서 통째로 빠진다.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
|
if str(PROJECT_ROOT) not in sys.path:
|
|
sys.path.insert(0, str(PROJECT_ROOT))
|
|
|
|
from B05_Profile.B05_Profile_Router_Confirm import ( # noqa: E402
|
|
load_sampling_snapshot,
|
|
sampling_snapshot_path,
|
|
)
|
|
from B06_Section.B06_Section_Router_Stations import ( # noqa: E402
|
|
STATION_MATCH_TOLERANCE_M,
|
|
_station_chainages,
|
|
router,
|
|
)
|
|
|
|
|
|
def test_두_길이_다_열려_있다() -> None:
|
|
"""점검(GET)과 만들기(POST)가 같은 주소에 선다 — 화면이 하나만 알면 된다."""
|
|
paths = {(route.path, tuple(sorted(route.methods))) for route in router.routes}
|
|
assert ("/api/projects/{project_id}/section/missing-stations", ("GET",)) in paths
|
|
assert ("/api/projects/{project_id}/section/missing-stations", ("POST",)) in paths
|
|
|
|
|
|
def test_종단_정본에서_측점을_읽는다(tmp_path: Path) -> None:
|
|
folder = tmp_path / "B06_Section" / "longitudinal"
|
|
folder.mkdir(parents=True)
|
|
(folder / "longitudinal.json").write_text(
|
|
json.dumps({"stations": [{"chainage_m": 0.0}, {"chainage_m": 85.05}, {"bad": 1}]}),
|
|
encoding="utf-8",
|
|
)
|
|
assert _station_chainages(tmp_path) == [0.0, 85.05]
|
|
|
|
|
|
def test_측점이_없으면_빈_목록(tmp_path: Path) -> None:
|
|
"""파일이 없다고 터지지 않는다 — 이 줄은 덤이라 화면을 막으면 안 된다."""
|
|
assert _station_chainages(tmp_path) == []
|
|
|
|
|
|
def test_같은_자리_판정은_측점_스냅_폭() -> None:
|
|
"""같은 측점 폭(213-1 · 0.006m) 한 벌(219-1) — 0.5m 면 0.1m 옮긴 관을 놓침(192-1)."""
|
|
assert STATION_MATCH_TOLERANCE_M == 0.006
|
|
|
|
|
|
def test_샘플링_조건이_없으면_None(tmp_path: Path) -> None:
|
|
"""조건을 지어내지 않는다 — 그 측점만 다른 지표에서 뽑히면 지반고가 어긋난다."""
|
|
assert load_sampling_snapshot(tmp_path) is None
|
|
path = sampling_snapshot_path(tmp_path)
|
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
path.write_text(json.dumps({"filter_key": "", "method": "dtm"}), encoding="utf-8")
|
|
assert load_sampling_snapshot(tmp_path) is None
|
|
path.write_text(
|
|
json.dumps({"filter_key": "ptd", "method": "implicit", "smooth": True}), encoding="utf-8"
|
|
)
|
|
snapshot = load_sampling_snapshot(tmp_path)
|
|
assert snapshot is not None and snapshot["method"] == "implicit" and snapshot["smooth"] is True
|