fix(507-2 B05 관): 자동 세류선 관 라벨 · 노선 바꾼 [저장] 관 겹 생성 막음 · 지운 자동 관 지움 표지 — 요구 311-3

- 관 라벨 stream_label = 세류선 UFID · 교차 차례 · 처음 교차점 좌표 · 끌기 · 옵션 고침에도 남음 · 관 PUT 때 id 로 되붙임
- 노선 [저장] = 라벨(관 · 지움 표지)이 같은 세류선 가장 가까운 새 교차점을 짝으로 잡음 · 짝 잡힌 교차엔 관 안 더함
- 지운 자동 관 = pipe_points.json dismissed_streams · 라벨 없던 옛 관은 자리만 → 다음 노선 [저장] 때 라벨
- 라벨 없는 옛 stream 관 = 옛 노선 누가거리 5 m 안 교차 라벨 · 겹친 관 안 지움(로그 수)
- 추천 [적용] = 표지 없음 · [초기화] = 초기값 파일 그대로
- 세류선 교차 셈을 common_util_stream_crossing 으로 옮김(common_util_route_geometry 700줄 넘음)
- 시험 test_507_2_stream_pipe_label · test_494_2 가짜 저장 인자

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 16:36:00 +09:00
co-authored by Claude Opus 5.5
parent de1377e45e
commit d72481a52e
9 changed files with 478 additions and 87 deletions
@@ -54,11 +54,8 @@ from B04_PreProcess.B04_PreProcess_Engine_Watershed_Stream import (
PrimaryRegion,
build_primary_region,
)
from common_util.common_util_route_geometry import (
RouteVertex,
StructureCandidate,
find_stream_crossings,
)
from common_util.common_util_route_geometry import RouteVertex, StructureCandidate
from common_util.common_util_stream_crossing import find_stream_crossings
from config.config_system import (
DRAINAGE_ARROW_BLOCK_M,
DRAINAGE_ARROW_MIN_AGREEMENT,
@@ -47,13 +47,17 @@ from common_util.common_util_drainage_pipes import (
clear_pipe_points,
load_pipe_points,
parse_pipe_points,
pipe_points_path,
pipe_signature,
read_dismissed,
read_pipe_points_file,
route_signature,
save_detail_basins,
save_pipe_points,
)
from common_util.common_util_json import LONLAT_DIGITS, round_floats
from common_util.common_util_route_geometry import StructureCandidate
from common_util.common_util_stream_crossing import keep_labels
from config.config_system import (
DRAINAGE_PIPE_MAX_SPACING_M,
DRAINAGE_PIPE_MIN_SPACING_M,
@@ -611,9 +615,13 @@ async def put_pipe_points(
context, detail, points, _, stale = resolved
signature = route_signature(context.vertices)
# 자동 세류선 관 라벨 되붙임 · 지운 자동 관 = 지움 표지(507-2)
path = pipe_points_path(context.stored_path)
dismissed = read_dismissed(path)
keep_labels(points, read_pipe_points_file(path), dismissed)
# 좌표를 같이 남긴다 — 다른 선(B05 최적 경로)으로 읽어도 그 자리에 되놓는다.
saved = await asyncio.to_thread(
save_pipe_points, context.stored_path, signature, points, context.vertices
save_pipe_points, context.stored_path, signature, points, context.vertices, dismissed
)
if not stale: # 낡은 분석 — 관 자리 · 속성만 정본으로 · 세부 유역 산출물은 안 씀
await asyncio.to_thread(