diff --git a/docs/OWNER_FEEDBACK.md b/docs/OWNER_FEEDBACK.md index 3225b00..be950b7 100644 --- a/docs/OWNER_FEEDBACK.md +++ b/docs/OWNER_FEEDBACK.md @@ -356,3 +356,7 @@ git push 최신(HEAD 7f86104, Everything up-to-date). 운영 도메인 kintex.wi ### 세션 5 추가 — V65 비상구 실좌표 + 캔버스 트렌치 실데이터 (2026-07-16) 비상구: H1~H8 실측 34개(DOOR 경계 클러스터, 장애물 door 스트립과 교차 일치 검증), H9/H10 가정 유지(신뢰 부족 명시). 캔버스: 트렌치 실데이터 도트 표시+합성 그리드 폴백. 게이트 전부 통과 → push→배포. 잔여: K2 트렌치(전력간선 도면). + +### 세션 5 추가 — V66 K2 트렌치 실측 시드 (2026-07-16) + +K2(H6~H10) 트렌치 실측 완료 — 65채널·941포인트(H6 9채널·H7/H8/H9/H10 각 14채널, 피치 9m·6m 샘플링). 소스는 전력간선 평면도(77MB) 분석 결과 그 안의 유틸라인 xref가 크롭본(x≤509.2m)+위상 ~3.5m 오차로 부적합 판정 → **홀 프레임과 동일 원점인 원본-1층 평면도의 블록 내부 TRENCH 레이어**(V61 때 "부재" 오판 교정 — xref 블록 내부라 최상위 순회에 안 잡혔던 것)를 스트리밍 파서+INSERT 체인 변환으로 추출(생성기 `tools/cad/extract_trench_seed_k2.py` 결정적 재생성). 전력간선 도면은 교차검증(각도 0°/±11°/−12° 홀 배치각 일치·9m 피치·쌍선 구조 일치)으로 활용. 오버레이 시각 검증 — 시드 포인트가 CAD 쌍선 채널 정위치. 이로써 **전 홀(H1~H10) 트렌치 실측 완료(PLANNING R4 잔여 해소)**. 게이트: gradle test 통과. 커밋까지(푸시는 상위 세션 게이트). diff --git a/docs/analysis/cad-extraction.md b/docs/analysis/cad-extraction.md index f33f40f..a689e46 100644 --- a/docs/analysis/cad-extraction.md +++ b/docs/analysis/cad-extraction.md @@ -132,4 +132,28 @@ H7/H8 블록 252m=126×2·폭 90m 정확 일치) + 회전 프로브 렌더 시 V63/V64 장애물 door 스트립과 좌표 교차 일치(같은 소스) 검증. 생성기 extract_exit_seed.py. - **캔버스 트렌치**: 합성 9m 그리드 → HallInfo.trenches 실데이터 공급 포인트 도트(r0.5m, supplies 툴팁) 표시, 실데이터 없으면 합성 그리드 폴백 유지. -- **잔여**: K2 트렌치(전력간선 77MB 도면) — 별도 진행. +- **잔여**: K2 트렌치(전력간선 77MB 도면) — 별도 진행. → V66에서 해소. + +## V66 K2 트렌치 실측 시드 (2026-07-16) + +- **소스 확정 — 원본-1층 평면도.dwg (홀 프레임과 동일 도면·동일 원점)**: V61 때 "K2 도면에 트렌치 + 레이어 부재"로 판단했던 것은 **오판** — 트렌치 선들이 xref **블록 내부**(`UT TRENCH` 블록 563세그 등 + 4개 컨테이너, 897세그)에 있어 최상위(iterdxf) 순회에 안 잡혔던 것. 스트리밍 태그 파서로 + BLOCKS+ENTITIES 전체를 파싱하고 INSERT 체인 변환을 적용해 복원(4GB RAM 노트북 안전 — ezdxf 미적재). +- **전력간선 평면도(E3-59~69, 77MB)는 교차검증용**: ①트렌치는 `원본-1층 평면도$0$전시장 유틸라인` + xref(단일 삽입 @ (858.96, 50.75)m, 스케일1·회전0)와 *MS 직접선에 존재 ②각도 클러스터 + 0°/±11°/−12° = 홀 배치각과 정확 일치(좌표계 회전 정합 증명) ③채널 구조 = 가로 쌍선·9m 피치로 + 원본 평면도와 일치. **단** 유틸라인 xref 콘텐츠가 x=509.2m에서 잘린 크롭본(H7 서측 20m·H6 대부분 누락, + H8만 전깊이)이고 채널 위상이 원본 대비 ~3.5m 어긋나 시드 소스로 부적합 → 프레임과 자동 정합되는 + 원본 평면도를 정본으로 채택. +- **추출(생성기 `tools/cad/extract_trench_seed_k2.py`, 결정적 재생성)**: 홀 프레임(±11~12° 회전) + 로컬 변환 → 수평(|dv|≤1m) 세그를 프레임에 Liang-Barsky **클리핑**(중점 판정은 서측으로 길게 뻗는 + 장선을 놓침) → 연장 ≥30m → 행 스냅 0.5m·쌍선 병합 1.5m → 채널 중심선 → 6m 간격 포인트(V61 규약). +- **결과(65채널·941포인트)**: H6 9채널(y7.5~86.9, 피치 9m 기본·구조 베이 2곳 12.5m) / + H7 14채널(y5.8~121.6) / H8 14채널(y4.6~121.1) / H9 14채널(y7.1~124.1) / H10 14채널(y8.1~125.1). + H7/H8 중간 행 서측 시작 x≈9~13(계단 코어 회피), H9/H10 하부 행 동측 단축(에스컬레이터 코어) — + CAD 원선 그대로. 오버레이 검증(scratchpad `v66_overlay.png`): 시드 포인트가 쌍선 채널 위 정위치. +- **V66**: H6~H10 가정(is_assumed) 포인트 삭제 → 실측 941포인트(`H{n}-RT-{행}-{k}`, is_assumed=false). + 공급 플래그 V5 정책 유지. 이로써 **전 홀(H1~H10) 트렌치 실측 완료** — PLANNING R4 트렌치 잔여 해소. +- **한계**: ①포인트 6m 간격은 샘플링 규약(채널 위치·연장만 실측) ②채널 중간 국소 단절(H9 x78~86 + 일부 행)은 min..max 연속으로 근사(K1 동일 단순화) ③세로 피더 트렌치는 M4 후속. diff --git a/src/backend/src/main/resources/db/migration/V66__k2_trench_measured_seed.sql b/src/backend/src/main/resources/db/migration/V66__k2_trench_measured_seed.sql new file mode 100644 index 0000000..4372060 --- /dev/null +++ b/src/backend/src/main/resources/db/migration/V66__k2_trench_measured_seed.sql @@ -0,0 +1,979 @@ +-- V66: K2 홀6~10 트렌치 실측 시드 — CAD(원본-1층 평면도.dwg) TRENCH 레이어 추출(V61의 K2판). +-- 생성기: tools/cad/extract_trench_seed_k2.py (재생성 가능·결정적). 근거: docs/analysis/cad-extraction.md §K2 트렌치. +-- 실측: 홀 프레임(±11~12° 회전) 로컬 가로 채널(쌍선 병합 중심선)·연장 실좌표. 포인트 6m 간격은 샘플링 규약. +-- 교차검증: 전력간선 평면도(E3-59~69)의 채널 구조(9m 피치·쌍선·홀 배치각)와 정합 — +-- 단, 그 도면의 유틸라인 xref는 크롭본(x<=509.2m)이라 시드 소스는 홀 프레임과 동일 원점인 원본 평면도 사용. +-- 정책: 실측 확보 홀(H6~H10)의 가정(is_assumed) 포인트를 실측 포인트로 대체(K1 V61과 동일). +-- 공급 플래그는 V5 정책 유지(공동구 — 전 서비스 true·gas는 홀 보유 여부), 위치만 실측 대체. + +-- H6: 실측 채널 9개 +DELETE FROM trench WHERE hall_id = 'H6' AND is_assumed; +INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed) +VALUES + ('H6-RT-1-1', 'H6', ST_SetSRID(ST_MakePoint(3.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-2', 'H6', ST_SetSRID(ST_MakePoint(9.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-3', 'H6', ST_SetSRID(ST_MakePoint(15.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-4', 'H6', ST_SetSRID(ST_MakePoint(21.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-5', 'H6', ST_SetSRID(ST_MakePoint(27.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-6', 'H6', ST_SetSRID(ST_MakePoint(33.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-7', 'H6', ST_SetSRID(ST_MakePoint(39.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-8', 'H6', ST_SetSRID(ST_MakePoint(45.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-9', 'H6', ST_SetSRID(ST_MakePoint(51.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-1-10', 'H6', ST_SetSRID(ST_MakePoint(57.94, 7.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-1', 'H6', ST_SetSRID(ST_MakePoint(3.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-2', 'H6', ST_SetSRID(ST_MakePoint(9.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-3', 'H6', ST_SetSRID(ST_MakePoint(15.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-4', 'H6', ST_SetSRID(ST_MakePoint(21.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-5', 'H6', ST_SetSRID(ST_MakePoint(27.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-6', 'H6', ST_SetSRID(ST_MakePoint(33.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-7', 'H6', ST_SetSRID(ST_MakePoint(39.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-8', 'H6', ST_SetSRID(ST_MakePoint(45.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-9', 'H6', ST_SetSRID(ST_MakePoint(51.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-2-10', 'H6', ST_SetSRID(ST_MakePoint(57.93, 16.50), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-1', 'H6', ST_SetSRID(ST_MakePoint(3.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-2', 'H6', ST_SetSRID(ST_MakePoint(9.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-3', 'H6', ST_SetSRID(ST_MakePoint(15.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-4', 'H6', ST_SetSRID(ST_MakePoint(21.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-5', 'H6', ST_SetSRID(ST_MakePoint(27.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-6', 'H6', ST_SetSRID(ST_MakePoint(33.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-7', 'H6', ST_SetSRID(ST_MakePoint(39.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-8', 'H6', ST_SetSRID(ST_MakePoint(45.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-9', 'H6', ST_SetSRID(ST_MakePoint(51.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-3-10', 'H6', ST_SetSRID(ST_MakePoint(57.93, 25.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-1', 'H6', ST_SetSRID(ST_MakePoint(3.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-2', 'H6', ST_SetSRID(ST_MakePoint(9.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-3', 'H6', ST_SetSRID(ST_MakePoint(15.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-4', 'H6', ST_SetSRID(ST_MakePoint(21.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-5', 'H6', ST_SetSRID(ST_MakePoint(27.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-6', 'H6', ST_SetSRID(ST_MakePoint(33.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-7', 'H6', ST_SetSRID(ST_MakePoint(39.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-8', 'H6', ST_SetSRID(ST_MakePoint(45.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-9', 'H6', ST_SetSRID(ST_MakePoint(51.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-4-10', 'H6', ST_SetSRID(ST_MakePoint(57.92, 38.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-1', 'H6', ST_SetSRID(ST_MakePoint(3.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-2', 'H6', ST_SetSRID(ST_MakePoint(9.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-3', 'H6', ST_SetSRID(ST_MakePoint(15.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-4', 'H6', ST_SetSRID(ST_MakePoint(21.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-5', 'H6', ST_SetSRID(ST_MakePoint(27.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-6', 'H6', ST_SetSRID(ST_MakePoint(33.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-7', 'H6', ST_SetSRID(ST_MakePoint(39.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-8', 'H6', ST_SetSRID(ST_MakePoint(45.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-9', 'H6', ST_SetSRID(ST_MakePoint(51.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-5-10', 'H6', ST_SetSRID(ST_MakePoint(57.91, 47.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-1', 'H6', ST_SetSRID(ST_MakePoint(3.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-2', 'H6', ST_SetSRID(ST_MakePoint(9.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-3', 'H6', ST_SetSRID(ST_MakePoint(15.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-4', 'H6', ST_SetSRID(ST_MakePoint(21.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-5', 'H6', ST_SetSRID(ST_MakePoint(27.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-6', 'H6', ST_SetSRID(ST_MakePoint(33.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-7', 'H6', ST_SetSRID(ST_MakePoint(39.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-8', 'H6', ST_SetSRID(ST_MakePoint(45.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-9', 'H6', ST_SetSRID(ST_MakePoint(51.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-6-10', 'H6', ST_SetSRID(ST_MakePoint(57.91, 56.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-1', 'H6', ST_SetSRID(ST_MakePoint(3.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-2', 'H6', ST_SetSRID(ST_MakePoint(9.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-3', 'H6', ST_SetSRID(ST_MakePoint(15.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-4', 'H6', ST_SetSRID(ST_MakePoint(21.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-5', 'H6', ST_SetSRID(ST_MakePoint(27.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-6', 'H6', ST_SetSRID(ST_MakePoint(33.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-7', 'H6', ST_SetSRID(ST_MakePoint(39.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-8', 'H6', ST_SetSRID(ST_MakePoint(45.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-9', 'H6', ST_SetSRID(ST_MakePoint(51.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-7-10', 'H6', ST_SetSRID(ST_MakePoint(57.90, 68.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-1', 'H6', ST_SetSRID(ST_MakePoint(3.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-2', 'H6', ST_SetSRID(ST_MakePoint(9.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-3', 'H6', ST_SetSRID(ST_MakePoint(15.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-4', 'H6', ST_SetSRID(ST_MakePoint(21.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-5', 'H6', ST_SetSRID(ST_MakePoint(27.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-6', 'H6', ST_SetSRID(ST_MakePoint(33.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-7', 'H6', ST_SetSRID(ST_MakePoint(39.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-8', 'H6', ST_SetSRID(ST_MakePoint(45.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-9', 'H6', ST_SetSRID(ST_MakePoint(51.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-8-10', 'H6', ST_SetSRID(ST_MakePoint(57.89, 77.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-1', 'H6', ST_SetSRID(ST_MakePoint(3.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-2', 'H6', ST_SetSRID(ST_MakePoint(9.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-3', 'H6', ST_SetSRID(ST_MakePoint(15.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-4', 'H6', ST_SetSRID(ST_MakePoint(21.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-5', 'H6', ST_SetSRID(ST_MakePoint(27.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-6', 'H6', ST_SetSRID(ST_MakePoint(33.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-7', 'H6', ST_SetSRID(ST_MakePoint(39.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-8', 'H6', ST_SetSRID(ST_MakePoint(45.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-9', 'H6', ST_SetSRID(ST_MakePoint(51.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false), + ('H6-RT-9-10', 'H6', ST_SetSRID(ST_MakePoint(57.88, 86.88), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H6'), false) +ON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed; + +-- H7: 실측 채널 14개 +DELETE FROM trench WHERE hall_id = 'H7' AND is_assumed; +INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed) +VALUES + ('H7-RT-1-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-1-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 5.75), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-2-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-3-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-4-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-5-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-1', 'H7', ST_SetSRID(ST_MakePoint(13.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-2', 'H7', ST_SetSRID(ST_MakePoint(19.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-3', 'H7', ST_SetSRID(ST_MakePoint(25.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-4', 'H7', ST_SetSRID(ST_MakePoint(31.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-5', 'H7', ST_SetSRID(ST_MakePoint(37.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-6', 'H7', ST_SetSRID(ST_MakePoint(43.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-7', 'H7', ST_SetSRID(ST_MakePoint(49.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-8', 'H7', ST_SetSRID(ST_MakePoint(55.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-9', 'H7', ST_SetSRID(ST_MakePoint(61.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-10', 'H7', ST_SetSRID(ST_MakePoint(67.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-11', 'H7', ST_SetSRID(ST_MakePoint(73.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-12', 'H7', ST_SetSRID(ST_MakePoint(79.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-6-13', 'H7', ST_SetSRID(ST_MakePoint(85.00, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-1', 'H7', ST_SetSRID(ST_MakePoint(13.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-2', 'H7', ST_SetSRID(ST_MakePoint(19.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-3', 'H7', ST_SetSRID(ST_MakePoint(25.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-4', 'H7', ST_SetSRID(ST_MakePoint(31.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-5', 'H7', ST_SetSRID(ST_MakePoint(37.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-6', 'H7', ST_SetSRID(ST_MakePoint(43.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-7', 'H7', ST_SetSRID(ST_MakePoint(49.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-8', 'H7', ST_SetSRID(ST_MakePoint(55.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-9', 'H7', ST_SetSRID(ST_MakePoint(61.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-10', 'H7', ST_SetSRID(ST_MakePoint(67.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-11', 'H7', ST_SetSRID(ST_MakePoint(73.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-12', 'H7', ST_SetSRID(ST_MakePoint(79.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-7-13', 'H7', ST_SetSRID(ST_MakePoint(85.00, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-1', 'H7', ST_SetSRID(ST_MakePoint(13.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-2', 'H7', ST_SetSRID(ST_MakePoint(19.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-3', 'H7', ST_SetSRID(ST_MakePoint(25.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-4', 'H7', ST_SetSRID(ST_MakePoint(31.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-5', 'H7', ST_SetSRID(ST_MakePoint(37.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-6', 'H7', ST_SetSRID(ST_MakePoint(43.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-7', 'H7', ST_SetSRID(ST_MakePoint(49.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-8', 'H7', ST_SetSRID(ST_MakePoint(55.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-9', 'H7', ST_SetSRID(ST_MakePoint(61.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-10', 'H7', ST_SetSRID(ST_MakePoint(67.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-11', 'H7', ST_SetSRID(ST_MakePoint(73.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-12', 'H7', ST_SetSRID(ST_MakePoint(79.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-8-13', 'H7', ST_SetSRID(ST_MakePoint(85.00, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-1', 'H7', ST_SetSRID(ST_MakePoint(13.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-2', 'H7', ST_SetSRID(ST_MakePoint(19.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-3', 'H7', ST_SetSRID(ST_MakePoint(25.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-4', 'H7', ST_SetSRID(ST_MakePoint(31.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-5', 'H7', ST_SetSRID(ST_MakePoint(37.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-6', 'H7', ST_SetSRID(ST_MakePoint(43.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-7', 'H7', ST_SetSRID(ST_MakePoint(49.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-8', 'H7', ST_SetSRID(ST_MakePoint(55.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-9', 'H7', ST_SetSRID(ST_MakePoint(61.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-10', 'H7', ST_SetSRID(ST_MakePoint(67.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-11', 'H7', ST_SetSRID(ST_MakePoint(73.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-12', 'H7', ST_SetSRID(ST_MakePoint(79.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-9-13', 'H7', ST_SetSRID(ST_MakePoint(85.00, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-10-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-11-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-12-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-13-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-1', 'H7', ST_SetSRID(ST_MakePoint(4.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-2', 'H7', ST_SetSRID(ST_MakePoint(10.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-3', 'H7', ST_SetSRID(ST_MakePoint(16.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-4', 'H7', ST_SetSRID(ST_MakePoint(22.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-5', 'H7', ST_SetSRID(ST_MakePoint(28.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-6', 'H7', ST_SetSRID(ST_MakePoint(34.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-7', 'H7', ST_SetSRID(ST_MakePoint(40.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-8', 'H7', ST_SetSRID(ST_MakePoint(46.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-9', 'H7', ST_SetSRID(ST_MakePoint(52.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-10', 'H7', ST_SetSRID(ST_MakePoint(58.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-11', 'H7', ST_SetSRID(ST_MakePoint(64.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-12', 'H7', ST_SetSRID(ST_MakePoint(70.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-13', 'H7', ST_SetSRID(ST_MakePoint(76.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-14', 'H7', ST_SetSRID(ST_MakePoint(82.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false), + ('H7-RT-14-15', 'H7', ST_SetSRID(ST_MakePoint(88.85, 121.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H7'), false) +ON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed; + +-- H8: 실측 채널 14개 +DELETE FROM trench WHERE hall_id = 'H8' AND is_assumed; +INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed) +VALUES + ('H8-RT-1-1', 'H8', ST_SetSRID(ST_MakePoint(4.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-2', 'H8', ST_SetSRID(ST_MakePoint(10.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-3', 'H8', ST_SetSRID(ST_MakePoint(16.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-4', 'H8', ST_SetSRID(ST_MakePoint(22.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-5', 'H8', ST_SetSRID(ST_MakePoint(28.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-6', 'H8', ST_SetSRID(ST_MakePoint(34.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-7', 'H8', ST_SetSRID(ST_MakePoint(40.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-8', 'H8', ST_SetSRID(ST_MakePoint(46.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-9', 'H8', ST_SetSRID(ST_MakePoint(52.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-10', 'H8', ST_SetSRID(ST_MakePoint(58.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-11', 'H8', ST_SetSRID(ST_MakePoint(64.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-12', 'H8', ST_SetSRID(ST_MakePoint(70.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-13', 'H8', ST_SetSRID(ST_MakePoint(76.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-14', 'H8', ST_SetSRID(ST_MakePoint(82.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-1-15', 'H8', ST_SetSRID(ST_MakePoint(88.85, 4.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-1', 'H8', ST_SetSRID(ST_MakePoint(4.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-2', 'H8', ST_SetSRID(ST_MakePoint(10.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-3', 'H8', ST_SetSRID(ST_MakePoint(16.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-4', 'H8', ST_SetSRID(ST_MakePoint(22.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-5', 'H8', ST_SetSRID(ST_MakePoint(28.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-6', 'H8', ST_SetSRID(ST_MakePoint(34.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-7', 'H8', ST_SetSRID(ST_MakePoint(40.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-8', 'H8', ST_SetSRID(ST_MakePoint(46.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-9', 'H8', ST_SetSRID(ST_MakePoint(52.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-10', 'H8', ST_SetSRID(ST_MakePoint(58.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-11', 'H8', ST_SetSRID(ST_MakePoint(64.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-12', 'H8', ST_SetSRID(ST_MakePoint(70.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-13', 'H8', ST_SetSRID(ST_MakePoint(76.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-14', 'H8', ST_SetSRID(ST_MakePoint(82.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-2-15', 'H8', ST_SetSRID(ST_MakePoint(88.85, 13.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-1', 'H8', ST_SetSRID(ST_MakePoint(4.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-2', 'H8', ST_SetSRID(ST_MakePoint(10.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-3', 'H8', ST_SetSRID(ST_MakePoint(16.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-4', 'H8', ST_SetSRID(ST_MakePoint(22.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-5', 'H8', ST_SetSRID(ST_MakePoint(28.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-6', 'H8', ST_SetSRID(ST_MakePoint(34.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-7', 'H8', ST_SetSRID(ST_MakePoint(40.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-8', 'H8', ST_SetSRID(ST_MakePoint(46.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-9', 'H8', ST_SetSRID(ST_MakePoint(52.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-10', 'H8', ST_SetSRID(ST_MakePoint(58.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-11', 'H8', ST_SetSRID(ST_MakePoint(64.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-12', 'H8', ST_SetSRID(ST_MakePoint(70.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-13', 'H8', ST_SetSRID(ST_MakePoint(76.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-14', 'H8', ST_SetSRID(ST_MakePoint(82.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-3-15', 'H8', ST_SetSRID(ST_MakePoint(88.85, 22.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-1', 'H8', ST_SetSRID(ST_MakePoint(4.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-2', 'H8', ST_SetSRID(ST_MakePoint(10.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-3', 'H8', ST_SetSRID(ST_MakePoint(16.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-4', 'H8', ST_SetSRID(ST_MakePoint(22.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-5', 'H8', ST_SetSRID(ST_MakePoint(28.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-6', 'H8', ST_SetSRID(ST_MakePoint(34.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-7', 'H8', ST_SetSRID(ST_MakePoint(40.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-8', 'H8', ST_SetSRID(ST_MakePoint(46.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-9', 'H8', ST_SetSRID(ST_MakePoint(52.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-10', 'H8', ST_SetSRID(ST_MakePoint(58.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-11', 'H8', ST_SetSRID(ST_MakePoint(64.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-12', 'H8', ST_SetSRID(ST_MakePoint(70.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-13', 'H8', ST_SetSRID(ST_MakePoint(76.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-14', 'H8', ST_SetSRID(ST_MakePoint(82.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-4-15', 'H8', ST_SetSRID(ST_MakePoint(88.85, 31.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-1', 'H8', ST_SetSRID(ST_MakePoint(4.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-2', 'H8', ST_SetSRID(ST_MakePoint(10.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-3', 'H8', ST_SetSRID(ST_MakePoint(16.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-4', 'H8', ST_SetSRID(ST_MakePoint(22.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-5', 'H8', ST_SetSRID(ST_MakePoint(28.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-6', 'H8', ST_SetSRID(ST_MakePoint(34.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-7', 'H8', ST_SetSRID(ST_MakePoint(40.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-8', 'H8', ST_SetSRID(ST_MakePoint(46.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-9', 'H8', ST_SetSRID(ST_MakePoint(52.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-10', 'H8', ST_SetSRID(ST_MakePoint(58.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-11', 'H8', ST_SetSRID(ST_MakePoint(64.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-12', 'H8', ST_SetSRID(ST_MakePoint(70.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-13', 'H8', ST_SetSRID(ST_MakePoint(76.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-14', 'H8', ST_SetSRID(ST_MakePoint(82.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-5-15', 'H8', ST_SetSRID(ST_MakePoint(88.85, 40.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-1', 'H8', ST_SetSRID(ST_MakePoint(8.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-2', 'H8', ST_SetSRID(ST_MakePoint(14.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-3', 'H8', ST_SetSRID(ST_MakePoint(20.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-4', 'H8', ST_SetSRID(ST_MakePoint(26.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-5', 'H8', ST_SetSRID(ST_MakePoint(32.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-6', 'H8', ST_SetSRID(ST_MakePoint(38.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-7', 'H8', ST_SetSRID(ST_MakePoint(44.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-8', 'H8', ST_SetSRID(ST_MakePoint(50.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-9', 'H8', ST_SetSRID(ST_MakePoint(56.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-10', 'H8', ST_SetSRID(ST_MakePoint(62.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-11', 'H8', ST_SetSRID(ST_MakePoint(68.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-12', 'H8', ST_SetSRID(ST_MakePoint(74.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-13', 'H8', ST_SetSRID(ST_MakePoint(80.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-6-14', 'H8', ST_SetSRID(ST_MakePoint(86.70, 49.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-1', 'H8', ST_SetSRID(ST_MakePoint(8.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-2', 'H8', ST_SetSRID(ST_MakePoint(14.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-3', 'H8', ST_SetSRID(ST_MakePoint(20.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-4', 'H8', ST_SetSRID(ST_MakePoint(26.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-5', 'H8', ST_SetSRID(ST_MakePoint(32.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-6', 'H8', ST_SetSRID(ST_MakePoint(38.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-7', 'H8', ST_SetSRID(ST_MakePoint(44.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-8', 'H8', ST_SetSRID(ST_MakePoint(50.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-9', 'H8', ST_SetSRID(ST_MakePoint(56.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-10', 'H8', ST_SetSRID(ST_MakePoint(62.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-11', 'H8', ST_SetSRID(ST_MakePoint(68.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-12', 'H8', ST_SetSRID(ST_MakePoint(74.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-13', 'H8', ST_SetSRID(ST_MakePoint(80.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-7-14', 'H8', ST_SetSRID(ST_MakePoint(86.70, 58.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-1', 'H8', ST_SetSRID(ST_MakePoint(9.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-2', 'H8', ST_SetSRID(ST_MakePoint(15.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-3', 'H8', ST_SetSRID(ST_MakePoint(21.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-4', 'H8', ST_SetSRID(ST_MakePoint(27.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-5', 'H8', ST_SetSRID(ST_MakePoint(33.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-6', 'H8', ST_SetSRID(ST_MakePoint(39.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-7', 'H8', ST_SetSRID(ST_MakePoint(45.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-8', 'H8', ST_SetSRID(ST_MakePoint(51.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-9', 'H8', ST_SetSRID(ST_MakePoint(57.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-10', 'H8', ST_SetSRID(ST_MakePoint(63.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-11', 'H8', ST_SetSRID(ST_MakePoint(69.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-12', 'H8', ST_SetSRID(ST_MakePoint(75.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-13', 'H8', ST_SetSRID(ST_MakePoint(81.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-8-14', 'H8', ST_SetSRID(ST_MakePoint(87.60, 67.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-1', 'H8', ST_SetSRID(ST_MakePoint(12.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-2', 'H8', ST_SetSRID(ST_MakePoint(18.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-3', 'H8', ST_SetSRID(ST_MakePoint(24.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-4', 'H8', ST_SetSRID(ST_MakePoint(30.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-5', 'H8', ST_SetSRID(ST_MakePoint(36.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-6', 'H8', ST_SetSRID(ST_MakePoint(42.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-7', 'H8', ST_SetSRID(ST_MakePoint(48.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-8', 'H8', ST_SetSRID(ST_MakePoint(54.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-9', 'H8', ST_SetSRID(ST_MakePoint(60.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-10', 'H8', ST_SetSRID(ST_MakePoint(66.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-11', 'H8', ST_SetSRID(ST_MakePoint(72.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-12', 'H8', ST_SetSRID(ST_MakePoint(78.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-9-13', 'H8', ST_SetSRID(ST_MakePoint(84.15, 76.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-1', 'H8', ST_SetSRID(ST_MakePoint(3.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-2', 'H8', ST_SetSRID(ST_MakePoint(9.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-3', 'H8', ST_SetSRID(ST_MakePoint(15.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-4', 'H8', ST_SetSRID(ST_MakePoint(21.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-5', 'H8', ST_SetSRID(ST_MakePoint(27.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-6', 'H8', ST_SetSRID(ST_MakePoint(33.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-7', 'H8', ST_SetSRID(ST_MakePoint(39.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-8', 'H8', ST_SetSRID(ST_MakePoint(45.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-9', 'H8', ST_SetSRID(ST_MakePoint(51.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-10', 'H8', ST_SetSRID(ST_MakePoint(57.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-11', 'H8', ST_SetSRID(ST_MakePoint(63.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-12', 'H8', ST_SetSRID(ST_MakePoint(69.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-13', 'H8', ST_SetSRID(ST_MakePoint(75.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-14', 'H8', ST_SetSRID(ST_MakePoint(81.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-10-15', 'H8', ST_SetSRID(ST_MakePoint(87.95, 85.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-1', 'H8', ST_SetSRID(ST_MakePoint(3.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-2', 'H8', ST_SetSRID(ST_MakePoint(9.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-3', 'H8', ST_SetSRID(ST_MakePoint(15.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-4', 'H8', ST_SetSRID(ST_MakePoint(21.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-5', 'H8', ST_SetSRID(ST_MakePoint(27.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-6', 'H8', ST_SetSRID(ST_MakePoint(33.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-7', 'H8', ST_SetSRID(ST_MakePoint(39.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-8', 'H8', ST_SetSRID(ST_MakePoint(45.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-9', 'H8', ST_SetSRID(ST_MakePoint(51.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-10', 'H8', ST_SetSRID(ST_MakePoint(57.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-11', 'H8', ST_SetSRID(ST_MakePoint(63.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-12', 'H8', ST_SetSRID(ST_MakePoint(69.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-13', 'H8', ST_SetSRID(ST_MakePoint(75.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-14', 'H8', ST_SetSRID(ST_MakePoint(81.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-11-15', 'H8', ST_SetSRID(ST_MakePoint(87.95, 94.38), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-1', 'H8', ST_SetSRID(ST_MakePoint(3.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-2', 'H8', ST_SetSRID(ST_MakePoint(9.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-3', 'H8', ST_SetSRID(ST_MakePoint(15.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-4', 'H8', ST_SetSRID(ST_MakePoint(21.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-5', 'H8', ST_SetSRID(ST_MakePoint(27.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-6', 'H8', ST_SetSRID(ST_MakePoint(33.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-7', 'H8', ST_SetSRID(ST_MakePoint(39.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-8', 'H8', ST_SetSRID(ST_MakePoint(45.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-9', 'H8', ST_SetSRID(ST_MakePoint(51.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-10', 'H8', ST_SetSRID(ST_MakePoint(57.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-11', 'H8', ST_SetSRID(ST_MakePoint(63.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-12', 'H8', ST_SetSRID(ST_MakePoint(69.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-13', 'H8', ST_SetSRID(ST_MakePoint(75.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-14', 'H8', ST_SetSRID(ST_MakePoint(81.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-12-15', 'H8', ST_SetSRID(ST_MakePoint(87.95, 103.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-1', 'H8', ST_SetSRID(ST_MakePoint(3.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-2', 'H8', ST_SetSRID(ST_MakePoint(9.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-3', 'H8', ST_SetSRID(ST_MakePoint(15.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-4', 'H8', ST_SetSRID(ST_MakePoint(21.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-5', 'H8', ST_SetSRID(ST_MakePoint(27.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-6', 'H8', ST_SetSRID(ST_MakePoint(33.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-7', 'H8', ST_SetSRID(ST_MakePoint(39.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-8', 'H8', ST_SetSRID(ST_MakePoint(45.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-9', 'H8', ST_SetSRID(ST_MakePoint(51.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-10', 'H8', ST_SetSRID(ST_MakePoint(57.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-11', 'H8', ST_SetSRID(ST_MakePoint(63.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-12', 'H8', ST_SetSRID(ST_MakePoint(69.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-13', 'H8', ST_SetSRID(ST_MakePoint(75.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-14', 'H8', ST_SetSRID(ST_MakePoint(81.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-13-15', 'H8', ST_SetSRID(ST_MakePoint(87.95, 112.56), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-1', 'H8', ST_SetSRID(ST_MakePoint(3.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-2', 'H8', ST_SetSRID(ST_MakePoint(9.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-3', 'H8', ST_SetSRID(ST_MakePoint(15.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-4', 'H8', ST_SetSRID(ST_MakePoint(21.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-5', 'H8', ST_SetSRID(ST_MakePoint(27.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-6', 'H8', ST_SetSRID(ST_MakePoint(33.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-7', 'H8', ST_SetSRID(ST_MakePoint(39.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-8', 'H8', ST_SetSRID(ST_MakePoint(45.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-9', 'H8', ST_SetSRID(ST_MakePoint(51.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-10', 'H8', ST_SetSRID(ST_MakePoint(57.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-11', 'H8', ST_SetSRID(ST_MakePoint(63.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-12', 'H8', ST_SetSRID(ST_MakePoint(69.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-13', 'H8', ST_SetSRID(ST_MakePoint(75.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-14', 'H8', ST_SetSRID(ST_MakePoint(81.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false), + ('H8-RT-14-15', 'H8', ST_SetSRID(ST_MakePoint(87.95, 121.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H8'), false) +ON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed; + +-- H9: 실측 채널 14개 +DELETE FROM trench WHERE hall_id = 'H9' AND is_assumed; +INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed) +VALUES + ('H9-RT-1-1', 'H9', ST_SetSRID(ST_MakePoint(0.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-2', 'H9', ST_SetSRID(ST_MakePoint(6.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-3', 'H9', ST_SetSRID(ST_MakePoint(12.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-4', 'H9', ST_SetSRID(ST_MakePoint(18.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-5', 'H9', ST_SetSRID(ST_MakePoint(24.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-6', 'H9', ST_SetSRID(ST_MakePoint(30.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-7', 'H9', ST_SetSRID(ST_MakePoint(36.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-8', 'H9', ST_SetSRID(ST_MakePoint(42.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-9', 'H9', ST_SetSRID(ST_MakePoint(48.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-10', 'H9', ST_SetSRID(ST_MakePoint(54.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-11', 'H9', ST_SetSRID(ST_MakePoint(60.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-12', 'H9', ST_SetSRID(ST_MakePoint(66.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-13', 'H9', ST_SetSRID(ST_MakePoint(72.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-14', 'H9', ST_SetSRID(ST_MakePoint(78.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-15', 'H9', ST_SetSRID(ST_MakePoint(84.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-1-16', 'H9', ST_SetSRID(ST_MakePoint(90.96, 7.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-1', 'H9', ST_SetSRID(ST_MakePoint(0.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-2', 'H9', ST_SetSRID(ST_MakePoint(6.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-3', 'H9', ST_SetSRID(ST_MakePoint(12.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-4', 'H9', ST_SetSRID(ST_MakePoint(18.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-5', 'H9', ST_SetSRID(ST_MakePoint(24.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-6', 'H9', ST_SetSRID(ST_MakePoint(30.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-7', 'H9', ST_SetSRID(ST_MakePoint(36.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-8', 'H9', ST_SetSRID(ST_MakePoint(42.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-9', 'H9', ST_SetSRID(ST_MakePoint(48.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-10', 'H9', ST_SetSRID(ST_MakePoint(54.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-11', 'H9', ST_SetSRID(ST_MakePoint(60.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-12', 'H9', ST_SetSRID(ST_MakePoint(66.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-13', 'H9', ST_SetSRID(ST_MakePoint(72.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-14', 'H9', ST_SetSRID(ST_MakePoint(78.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-15', 'H9', ST_SetSRID(ST_MakePoint(84.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-2-16', 'H9', ST_SetSRID(ST_MakePoint(90.99, 16.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-1', 'H9', ST_SetSRID(ST_MakePoint(1.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-2', 'H9', ST_SetSRID(ST_MakePoint(7.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-3', 'H9', ST_SetSRID(ST_MakePoint(13.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-4', 'H9', ST_SetSRID(ST_MakePoint(19.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-5', 'H9', ST_SetSRID(ST_MakePoint(25.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-6', 'H9', ST_SetSRID(ST_MakePoint(31.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-7', 'H9', ST_SetSRID(ST_MakePoint(37.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-8', 'H9', ST_SetSRID(ST_MakePoint(43.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-9', 'H9', ST_SetSRID(ST_MakePoint(49.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-10', 'H9', ST_SetSRID(ST_MakePoint(55.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-11', 'H9', ST_SetSRID(ST_MakePoint(61.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-12', 'H9', ST_SetSRID(ST_MakePoint(67.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-13', 'H9', ST_SetSRID(ST_MakePoint(73.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-14', 'H9', ST_SetSRID(ST_MakePoint(79.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-15', 'H9', ST_SetSRID(ST_MakePoint(85.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-3-16', 'H9', ST_SetSRID(ST_MakePoint(91.03, 25.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-1', 'H9', ST_SetSRID(ST_MakePoint(1.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-2', 'H9', ST_SetSRID(ST_MakePoint(7.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-3', 'H9', ST_SetSRID(ST_MakePoint(13.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-4', 'H9', ST_SetSRID(ST_MakePoint(19.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-5', 'H9', ST_SetSRID(ST_MakePoint(25.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-6', 'H9', ST_SetSRID(ST_MakePoint(31.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-7', 'H9', ST_SetSRID(ST_MakePoint(37.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-8', 'H9', ST_SetSRID(ST_MakePoint(43.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-9', 'H9', ST_SetSRID(ST_MakePoint(49.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-10', 'H9', ST_SetSRID(ST_MakePoint(55.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-11', 'H9', ST_SetSRID(ST_MakePoint(61.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-12', 'H9', ST_SetSRID(ST_MakePoint(67.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-13', 'H9', ST_SetSRID(ST_MakePoint(73.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-14', 'H9', ST_SetSRID(ST_MakePoint(79.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-15', 'H9', ST_SetSRID(ST_MakePoint(85.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-4-16', 'H9', ST_SetSRID(ST_MakePoint(91.07, 34.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-1', 'H9', ST_SetSRID(ST_MakePoint(1.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-2', 'H9', ST_SetSRID(ST_MakePoint(7.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-3', 'H9', ST_SetSRID(ST_MakePoint(13.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-4', 'H9', ST_SetSRID(ST_MakePoint(19.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-5', 'H9', ST_SetSRID(ST_MakePoint(25.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-6', 'H9', ST_SetSRID(ST_MakePoint(31.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-7', 'H9', ST_SetSRID(ST_MakePoint(37.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-8', 'H9', ST_SetSRID(ST_MakePoint(43.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-9', 'H9', ST_SetSRID(ST_MakePoint(49.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-10', 'H9', ST_SetSRID(ST_MakePoint(55.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-11', 'H9', ST_SetSRID(ST_MakePoint(61.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-12', 'H9', ST_SetSRID(ST_MakePoint(67.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-13', 'H9', ST_SetSRID(ST_MakePoint(73.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-14', 'H9', ST_SetSRID(ST_MakePoint(79.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-15', 'H9', ST_SetSRID(ST_MakePoint(85.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-5-16', 'H9', ST_SetSRID(ST_MakePoint(91.11, 43.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-1', 'H9', ST_SetSRID(ST_MakePoint(1.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-2', 'H9', ST_SetSRID(ST_MakePoint(7.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-3', 'H9', ST_SetSRID(ST_MakePoint(13.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-4', 'H9', ST_SetSRID(ST_MakePoint(19.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-5', 'H9', ST_SetSRID(ST_MakePoint(25.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-6', 'H9', ST_SetSRID(ST_MakePoint(31.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-7', 'H9', ST_SetSRID(ST_MakePoint(37.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-8', 'H9', ST_SetSRID(ST_MakePoint(43.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-9', 'H9', ST_SetSRID(ST_MakePoint(49.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-10', 'H9', ST_SetSRID(ST_MakePoint(55.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-11', 'H9', ST_SetSRID(ST_MakePoint(61.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-12', 'H9', ST_SetSRID(ST_MakePoint(67.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-13', 'H9', ST_SetSRID(ST_MakePoint(73.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-14', 'H9', ST_SetSRID(ST_MakePoint(79.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-15', 'H9', ST_SetSRID(ST_MakePoint(85.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-6-16', 'H9', ST_SetSRID(ST_MakePoint(91.14, 52.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-1', 'H9', ST_SetSRID(ST_MakePoint(1.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-2', 'H9', ST_SetSRID(ST_MakePoint(7.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-3', 'H9', ST_SetSRID(ST_MakePoint(13.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-4', 'H9', ST_SetSRID(ST_MakePoint(19.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-5', 'H9', ST_SetSRID(ST_MakePoint(25.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-6', 'H9', ST_SetSRID(ST_MakePoint(31.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-7', 'H9', ST_SetSRID(ST_MakePoint(37.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-8', 'H9', ST_SetSRID(ST_MakePoint(43.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-9', 'H9', ST_SetSRID(ST_MakePoint(49.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-10', 'H9', ST_SetSRID(ST_MakePoint(55.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-11', 'H9', ST_SetSRID(ST_MakePoint(61.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-12', 'H9', ST_SetSRID(ST_MakePoint(67.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-13', 'H9', ST_SetSRID(ST_MakePoint(73.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-14', 'H9', ST_SetSRID(ST_MakePoint(79.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-15', 'H9', ST_SetSRID(ST_MakePoint(85.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-7-16', 'H9', ST_SetSRID(ST_MakePoint(91.18, 61.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-1', 'H9', ST_SetSRID(ST_MakePoint(1.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-2', 'H9', ST_SetSRID(ST_MakePoint(7.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-3', 'H9', ST_SetSRID(ST_MakePoint(13.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-4', 'H9', ST_SetSRID(ST_MakePoint(19.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-5', 'H9', ST_SetSRID(ST_MakePoint(25.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-6', 'H9', ST_SetSRID(ST_MakePoint(31.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-7', 'H9', ST_SetSRID(ST_MakePoint(37.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-8', 'H9', ST_SetSRID(ST_MakePoint(43.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-9', 'H9', ST_SetSRID(ST_MakePoint(49.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-10', 'H9', ST_SetSRID(ST_MakePoint(55.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-11', 'H9', ST_SetSRID(ST_MakePoint(61.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-12', 'H9', ST_SetSRID(ST_MakePoint(67.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-13', 'H9', ST_SetSRID(ST_MakePoint(73.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-14', 'H9', ST_SetSRID(ST_MakePoint(79.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-8-15', 'H9', ST_SetSRID(ST_MakePoint(85.22, 70.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-1', 'H9', ST_SetSRID(ST_MakePoint(1.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-2', 'H9', ST_SetSRID(ST_MakePoint(7.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-3', 'H9', ST_SetSRID(ST_MakePoint(13.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-4', 'H9', ST_SetSRID(ST_MakePoint(19.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-5', 'H9', ST_SetSRID(ST_MakePoint(25.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-6', 'H9', ST_SetSRID(ST_MakePoint(31.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-7', 'H9', ST_SetSRID(ST_MakePoint(37.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-8', 'H9', ST_SetSRID(ST_MakePoint(43.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-9', 'H9', ST_SetSRID(ST_MakePoint(49.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-10', 'H9', ST_SetSRID(ST_MakePoint(55.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-11', 'H9', ST_SetSRID(ST_MakePoint(61.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-12', 'H9', ST_SetSRID(ST_MakePoint(67.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-13', 'H9', ST_SetSRID(ST_MakePoint(73.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-14', 'H9', ST_SetSRID(ST_MakePoint(79.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-9-15', 'H9', ST_SetSRID(ST_MakePoint(85.25, 79.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-1', 'H9', ST_SetSRID(ST_MakePoint(1.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-2', 'H9', ST_SetSRID(ST_MakePoint(7.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-3', 'H9', ST_SetSRID(ST_MakePoint(13.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-4', 'H9', ST_SetSRID(ST_MakePoint(19.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-5', 'H9', ST_SetSRID(ST_MakePoint(25.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-6', 'H9', ST_SetSRID(ST_MakePoint(31.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-7', 'H9', ST_SetSRID(ST_MakePoint(37.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-8', 'H9', ST_SetSRID(ST_MakePoint(43.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-9', 'H9', ST_SetSRID(ST_MakePoint(49.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-10', 'H9', ST_SetSRID(ST_MakePoint(55.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-11', 'H9', ST_SetSRID(ST_MakePoint(61.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-12', 'H9', ST_SetSRID(ST_MakePoint(67.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-13', 'H9', ST_SetSRID(ST_MakePoint(73.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-14', 'H9', ST_SetSRID(ST_MakePoint(79.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-15', 'H9', ST_SetSRID(ST_MakePoint(85.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-10-16', 'H9', ST_SetSRID(ST_MakePoint(91.29, 88.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-1', 'H9', ST_SetSRID(ST_MakePoint(1.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-2', 'H9', ST_SetSRID(ST_MakePoint(7.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-3', 'H9', ST_SetSRID(ST_MakePoint(13.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-4', 'H9', ST_SetSRID(ST_MakePoint(19.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-5', 'H9', ST_SetSRID(ST_MakePoint(25.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-6', 'H9', ST_SetSRID(ST_MakePoint(31.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-7', 'H9', ST_SetSRID(ST_MakePoint(37.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-8', 'H9', ST_SetSRID(ST_MakePoint(43.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-9', 'H9', ST_SetSRID(ST_MakePoint(49.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-10', 'H9', ST_SetSRID(ST_MakePoint(55.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-11', 'H9', ST_SetSRID(ST_MakePoint(61.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-12', 'H9', ST_SetSRID(ST_MakePoint(67.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-13', 'H9', ST_SetSRID(ST_MakePoint(73.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-14', 'H9', ST_SetSRID(ST_MakePoint(79.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-15', 'H9', ST_SetSRID(ST_MakePoint(85.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-11-16', 'H9', ST_SetSRID(ST_MakePoint(91.33, 97.25), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-1', 'H9', ST_SetSRID(ST_MakePoint(1.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-2', 'H9', ST_SetSRID(ST_MakePoint(7.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-3', 'H9', ST_SetSRID(ST_MakePoint(13.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-4', 'H9', ST_SetSRID(ST_MakePoint(19.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-5', 'H9', ST_SetSRID(ST_MakePoint(25.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-6', 'H9', ST_SetSRID(ST_MakePoint(31.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-7', 'H9', ST_SetSRID(ST_MakePoint(37.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-8', 'H9', ST_SetSRID(ST_MakePoint(43.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-9', 'H9', ST_SetSRID(ST_MakePoint(49.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-10', 'H9', ST_SetSRID(ST_MakePoint(55.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-11', 'H9', ST_SetSRID(ST_MakePoint(61.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-12', 'H9', ST_SetSRID(ST_MakePoint(67.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-13', 'H9', ST_SetSRID(ST_MakePoint(73.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-14', 'H9', ST_SetSRID(ST_MakePoint(79.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-15', 'H9', ST_SetSRID(ST_MakePoint(85.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-12-16', 'H9', ST_SetSRID(ST_MakePoint(91.37, 106.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-1', 'H9', ST_SetSRID(ST_MakePoint(1.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-2', 'H9', ST_SetSRID(ST_MakePoint(7.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-3', 'H9', ST_SetSRID(ST_MakePoint(13.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-4', 'H9', ST_SetSRID(ST_MakePoint(19.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-5', 'H9', ST_SetSRID(ST_MakePoint(25.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-6', 'H9', ST_SetSRID(ST_MakePoint(31.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-7', 'H9', ST_SetSRID(ST_MakePoint(37.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-8', 'H9', ST_SetSRID(ST_MakePoint(43.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-9', 'H9', ST_SetSRID(ST_MakePoint(49.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-10', 'H9', ST_SetSRID(ST_MakePoint(55.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-11', 'H9', ST_SetSRID(ST_MakePoint(61.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-12', 'H9', ST_SetSRID(ST_MakePoint(67.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-13', 'H9', ST_SetSRID(ST_MakePoint(73.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-14', 'H9', ST_SetSRID(ST_MakePoint(79.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-15', 'H9', ST_SetSRID(ST_MakePoint(85.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-13-16', 'H9', ST_SetSRID(ST_MakePoint(91.40, 115.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-1', 'H9', ST_SetSRID(ST_MakePoint(1.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-2', 'H9', ST_SetSRID(ST_MakePoint(7.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-3', 'H9', ST_SetSRID(ST_MakePoint(13.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-4', 'H9', ST_SetSRID(ST_MakePoint(19.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-5', 'H9', ST_SetSRID(ST_MakePoint(25.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-6', 'H9', ST_SetSRID(ST_MakePoint(31.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-7', 'H9', ST_SetSRID(ST_MakePoint(37.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-8', 'H9', ST_SetSRID(ST_MakePoint(43.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-9', 'H9', ST_SetSRID(ST_MakePoint(49.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-10', 'H9', ST_SetSRID(ST_MakePoint(55.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-11', 'H9', ST_SetSRID(ST_MakePoint(61.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-12', 'H9', ST_SetSRID(ST_MakePoint(67.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-13', 'H9', ST_SetSRID(ST_MakePoint(73.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-14', 'H9', ST_SetSRID(ST_MakePoint(79.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-15', 'H9', ST_SetSRID(ST_MakePoint(85.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false), + ('H9-RT-14-16', 'H9', ST_SetSRID(ST_MakePoint(91.44, 124.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H9'), false) +ON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed; + +-- H10: 실측 채널 14개 +DELETE FROM trench WHERE hall_id = 'H10' AND is_assumed; +INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed) +VALUES + ('H10-RT-1-1', 'H10', ST_SetSRID(ST_MakePoint(1.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-2', 'H10', ST_SetSRID(ST_MakePoint(7.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-3', 'H10', ST_SetSRID(ST_MakePoint(13.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-4', 'H10', ST_SetSRID(ST_MakePoint(19.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-5', 'H10', ST_SetSRID(ST_MakePoint(25.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-6', 'H10', ST_SetSRID(ST_MakePoint(31.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-7', 'H10', ST_SetSRID(ST_MakePoint(37.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-8', 'H10', ST_SetSRID(ST_MakePoint(43.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-9', 'H10', ST_SetSRID(ST_MakePoint(49.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-10', 'H10', ST_SetSRID(ST_MakePoint(55.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-11', 'H10', ST_SetSRID(ST_MakePoint(61.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-12', 'H10', ST_SetSRID(ST_MakePoint(67.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-13', 'H10', ST_SetSRID(ST_MakePoint(73.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-14', 'H10', ST_SetSRID(ST_MakePoint(79.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-15', 'H10', ST_SetSRID(ST_MakePoint(85.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-1-16', 'H10', ST_SetSRID(ST_MakePoint(91.37, 8.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-1', 'H10', ST_SetSRID(ST_MakePoint(1.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-2', 'H10', ST_SetSRID(ST_MakePoint(7.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-3', 'H10', ST_SetSRID(ST_MakePoint(13.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-4', 'H10', ST_SetSRID(ST_MakePoint(19.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-5', 'H10', ST_SetSRID(ST_MakePoint(25.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-6', 'H10', ST_SetSRID(ST_MakePoint(31.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-7', 'H10', ST_SetSRID(ST_MakePoint(37.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-8', 'H10', ST_SetSRID(ST_MakePoint(43.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-9', 'H10', ST_SetSRID(ST_MakePoint(49.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-10', 'H10', ST_SetSRID(ST_MakePoint(55.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-11', 'H10', ST_SetSRID(ST_MakePoint(61.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-12', 'H10', ST_SetSRID(ST_MakePoint(67.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-13', 'H10', ST_SetSRID(ST_MakePoint(73.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-14', 'H10', ST_SetSRID(ST_MakePoint(79.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-15', 'H10', ST_SetSRID(ST_MakePoint(85.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-2-16', 'H10', ST_SetSRID(ST_MakePoint(91.34, 17.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-1', 'H10', ST_SetSRID(ST_MakePoint(1.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-2', 'H10', ST_SetSRID(ST_MakePoint(7.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-3', 'H10', ST_SetSRID(ST_MakePoint(13.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-4', 'H10', ST_SetSRID(ST_MakePoint(19.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-5', 'H10', ST_SetSRID(ST_MakePoint(25.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-6', 'H10', ST_SetSRID(ST_MakePoint(31.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-7', 'H10', ST_SetSRID(ST_MakePoint(37.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-8', 'H10', ST_SetSRID(ST_MakePoint(43.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-9', 'H10', ST_SetSRID(ST_MakePoint(49.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-10', 'H10', ST_SetSRID(ST_MakePoint(55.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-11', 'H10', ST_SetSRID(ST_MakePoint(61.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-12', 'H10', ST_SetSRID(ST_MakePoint(67.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-13', 'H10', ST_SetSRID(ST_MakePoint(73.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-14', 'H10', ST_SetSRID(ST_MakePoint(79.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-15', 'H10', ST_SetSRID(ST_MakePoint(85.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-3-16', 'H10', ST_SetSRID(ST_MakePoint(91.30, 26.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-1', 'H10', ST_SetSRID(ST_MakePoint(1.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-2', 'H10', ST_SetSRID(ST_MakePoint(7.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-3', 'H10', ST_SetSRID(ST_MakePoint(13.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-4', 'H10', ST_SetSRID(ST_MakePoint(19.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-5', 'H10', ST_SetSRID(ST_MakePoint(25.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-6', 'H10', ST_SetSRID(ST_MakePoint(31.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-7', 'H10', ST_SetSRID(ST_MakePoint(37.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-8', 'H10', ST_SetSRID(ST_MakePoint(43.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-9', 'H10', ST_SetSRID(ST_MakePoint(49.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-10', 'H10', ST_SetSRID(ST_MakePoint(55.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-11', 'H10', ST_SetSRID(ST_MakePoint(61.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-12', 'H10', ST_SetSRID(ST_MakePoint(67.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-13', 'H10', ST_SetSRID(ST_MakePoint(73.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-14', 'H10', ST_SetSRID(ST_MakePoint(79.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-15', 'H10', ST_SetSRID(ST_MakePoint(85.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-4-16', 'H10', ST_SetSRID(ST_MakePoint(91.26, 35.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-1', 'H10', ST_SetSRID(ST_MakePoint(1.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-2', 'H10', ST_SetSRID(ST_MakePoint(7.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-3', 'H10', ST_SetSRID(ST_MakePoint(13.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-4', 'H10', ST_SetSRID(ST_MakePoint(19.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-5', 'H10', ST_SetSRID(ST_MakePoint(25.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-6', 'H10', ST_SetSRID(ST_MakePoint(31.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-7', 'H10', ST_SetSRID(ST_MakePoint(37.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-8', 'H10', ST_SetSRID(ST_MakePoint(43.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-9', 'H10', ST_SetSRID(ST_MakePoint(49.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-10', 'H10', ST_SetSRID(ST_MakePoint(55.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-11', 'H10', ST_SetSRID(ST_MakePoint(61.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-12', 'H10', ST_SetSRID(ST_MakePoint(67.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-13', 'H10', ST_SetSRID(ST_MakePoint(73.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-14', 'H10', ST_SetSRID(ST_MakePoint(79.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-15', 'H10', ST_SetSRID(ST_MakePoint(85.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-5-16', 'H10', ST_SetSRID(ST_MakePoint(91.22, 44.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-1', 'H10', ST_SetSRID(ST_MakePoint(1.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-2', 'H10', ST_SetSRID(ST_MakePoint(7.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-3', 'H10', ST_SetSRID(ST_MakePoint(13.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-4', 'H10', ST_SetSRID(ST_MakePoint(19.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-5', 'H10', ST_SetSRID(ST_MakePoint(25.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-6', 'H10', ST_SetSRID(ST_MakePoint(31.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-7', 'H10', ST_SetSRID(ST_MakePoint(37.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-8', 'H10', ST_SetSRID(ST_MakePoint(43.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-9', 'H10', ST_SetSRID(ST_MakePoint(49.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-10', 'H10', ST_SetSRID(ST_MakePoint(55.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-11', 'H10', ST_SetSRID(ST_MakePoint(61.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-12', 'H10', ST_SetSRID(ST_MakePoint(67.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-13', 'H10', ST_SetSRID(ST_MakePoint(73.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-14', 'H10', ST_SetSRID(ST_MakePoint(79.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-15', 'H10', ST_SetSRID(ST_MakePoint(85.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-6-16', 'H10', ST_SetSRID(ST_MakePoint(91.19, 53.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-1', 'H10', ST_SetSRID(ST_MakePoint(1.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-2', 'H10', ST_SetSRID(ST_MakePoint(7.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-3', 'H10', ST_SetSRID(ST_MakePoint(13.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-4', 'H10', ST_SetSRID(ST_MakePoint(19.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-5', 'H10', ST_SetSRID(ST_MakePoint(25.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-6', 'H10', ST_SetSRID(ST_MakePoint(31.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-7', 'H10', ST_SetSRID(ST_MakePoint(37.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-8', 'H10', ST_SetSRID(ST_MakePoint(43.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-9', 'H10', ST_SetSRID(ST_MakePoint(49.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-10', 'H10', ST_SetSRID(ST_MakePoint(55.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-11', 'H10', ST_SetSRID(ST_MakePoint(61.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-12', 'H10', ST_SetSRID(ST_MakePoint(67.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-13', 'H10', ST_SetSRID(ST_MakePoint(73.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-14', 'H10', ST_SetSRID(ST_MakePoint(79.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-15', 'H10', ST_SetSRID(ST_MakePoint(85.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-7-16', 'H10', ST_SetSRID(ST_MakePoint(91.15, 62.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-1', 'H10', ST_SetSRID(ST_MakePoint(1.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-2', 'H10', ST_SetSRID(ST_MakePoint(7.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-3', 'H10', ST_SetSRID(ST_MakePoint(13.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-4', 'H10', ST_SetSRID(ST_MakePoint(19.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-5', 'H10', ST_SetSRID(ST_MakePoint(25.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-6', 'H10', ST_SetSRID(ST_MakePoint(31.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-7', 'H10', ST_SetSRID(ST_MakePoint(37.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-8', 'H10', ST_SetSRID(ST_MakePoint(43.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-9', 'H10', ST_SetSRID(ST_MakePoint(49.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-10', 'H10', ST_SetSRID(ST_MakePoint(55.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-11', 'H10', ST_SetSRID(ST_MakePoint(61.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-12', 'H10', ST_SetSRID(ST_MakePoint(67.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-13', 'H10', ST_SetSRID(ST_MakePoint(73.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-14', 'H10', ST_SetSRID(ST_MakePoint(79.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-8-15', 'H10', ST_SetSRID(ST_MakePoint(85.11, 71.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-1', 'H10', ST_SetSRID(ST_MakePoint(1.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-2', 'H10', ST_SetSRID(ST_MakePoint(7.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-3', 'H10', ST_SetSRID(ST_MakePoint(13.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-4', 'H10', ST_SetSRID(ST_MakePoint(19.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-5', 'H10', ST_SetSRID(ST_MakePoint(25.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-6', 'H10', ST_SetSRID(ST_MakePoint(31.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-7', 'H10', ST_SetSRID(ST_MakePoint(37.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-8', 'H10', ST_SetSRID(ST_MakePoint(43.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-9', 'H10', ST_SetSRID(ST_MakePoint(49.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-10', 'H10', ST_SetSRID(ST_MakePoint(55.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-11', 'H10', ST_SetSRID(ST_MakePoint(61.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-12', 'H10', ST_SetSRID(ST_MakePoint(67.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-13', 'H10', ST_SetSRID(ST_MakePoint(73.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-14', 'H10', ST_SetSRID(ST_MakePoint(79.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-9-15', 'H10', ST_SetSRID(ST_MakePoint(85.08, 80.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-1', 'H10', ST_SetSRID(ST_MakePoint(1.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-2', 'H10', ST_SetSRID(ST_MakePoint(7.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-3', 'H10', ST_SetSRID(ST_MakePoint(13.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-4', 'H10', ST_SetSRID(ST_MakePoint(19.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-5', 'H10', ST_SetSRID(ST_MakePoint(25.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-6', 'H10', ST_SetSRID(ST_MakePoint(31.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-7', 'H10', ST_SetSRID(ST_MakePoint(37.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-8', 'H10', ST_SetSRID(ST_MakePoint(43.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-9', 'H10', ST_SetSRID(ST_MakePoint(49.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-10', 'H10', ST_SetSRID(ST_MakePoint(55.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-11', 'H10', ST_SetSRID(ST_MakePoint(61.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-12', 'H10', ST_SetSRID(ST_MakePoint(67.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-13', 'H10', ST_SetSRID(ST_MakePoint(73.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-14', 'H10', ST_SetSRID(ST_MakePoint(79.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-15', 'H10', ST_SetSRID(ST_MakePoint(85.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-10-16', 'H10', ST_SetSRID(ST_MakePoint(91.04, 89.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-1', 'H10', ST_SetSRID(ST_MakePoint(1.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-2', 'H10', ST_SetSRID(ST_MakePoint(7.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-3', 'H10', ST_SetSRID(ST_MakePoint(13.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-4', 'H10', ST_SetSRID(ST_MakePoint(19.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-5', 'H10', ST_SetSRID(ST_MakePoint(25.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-6', 'H10', ST_SetSRID(ST_MakePoint(31.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-7', 'H10', ST_SetSRID(ST_MakePoint(37.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-8', 'H10', ST_SetSRID(ST_MakePoint(43.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-9', 'H10', ST_SetSRID(ST_MakePoint(49.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-10', 'H10', ST_SetSRID(ST_MakePoint(55.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-11', 'H10', ST_SetSRID(ST_MakePoint(61.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-12', 'H10', ST_SetSRID(ST_MakePoint(67.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-13', 'H10', ST_SetSRID(ST_MakePoint(73.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-14', 'H10', ST_SetSRID(ST_MakePoint(79.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-15', 'H10', ST_SetSRID(ST_MakePoint(85.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-11-16', 'H10', ST_SetSRID(ST_MakePoint(91.00, 98.00), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-1', 'H10', ST_SetSRID(ST_MakePoint(0.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-2', 'H10', ST_SetSRID(ST_MakePoint(6.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-3', 'H10', ST_SetSRID(ST_MakePoint(12.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-4', 'H10', ST_SetSRID(ST_MakePoint(18.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-5', 'H10', ST_SetSRID(ST_MakePoint(24.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-6', 'H10', ST_SetSRID(ST_MakePoint(30.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-7', 'H10', ST_SetSRID(ST_MakePoint(36.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-8', 'H10', ST_SetSRID(ST_MakePoint(42.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-9', 'H10', ST_SetSRID(ST_MakePoint(48.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-10', 'H10', ST_SetSRID(ST_MakePoint(54.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-11', 'H10', ST_SetSRID(ST_MakePoint(60.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-12', 'H10', ST_SetSRID(ST_MakePoint(66.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-13', 'H10', ST_SetSRID(ST_MakePoint(72.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-14', 'H10', ST_SetSRID(ST_MakePoint(78.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-15', 'H10', ST_SetSRID(ST_MakePoint(84.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-12-16', 'H10', ST_SetSRID(ST_MakePoint(90.96, 107.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-1', 'H10', ST_SetSRID(ST_MakePoint(0.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-2', 'H10', ST_SetSRID(ST_MakePoint(6.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-3', 'H10', ST_SetSRID(ST_MakePoint(12.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-4', 'H10', ST_SetSRID(ST_MakePoint(18.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-5', 'H10', ST_SetSRID(ST_MakePoint(24.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-6', 'H10', ST_SetSRID(ST_MakePoint(30.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-7', 'H10', ST_SetSRID(ST_MakePoint(36.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-8', 'H10', ST_SetSRID(ST_MakePoint(42.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-9', 'H10', ST_SetSRID(ST_MakePoint(48.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-10', 'H10', ST_SetSRID(ST_MakePoint(54.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-11', 'H10', ST_SetSRID(ST_MakePoint(60.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-12', 'H10', ST_SetSRID(ST_MakePoint(66.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-13', 'H10', ST_SetSRID(ST_MakePoint(72.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-14', 'H10', ST_SetSRID(ST_MakePoint(78.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-15', 'H10', ST_SetSRID(ST_MakePoint(84.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-13-16', 'H10', ST_SetSRID(ST_MakePoint(90.93, 116.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-1', 'H10', ST_SetSRID(ST_MakePoint(0.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-2', 'H10', ST_SetSRID(ST_MakePoint(6.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-3', 'H10', ST_SetSRID(ST_MakePoint(12.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-4', 'H10', ST_SetSRID(ST_MakePoint(18.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-5', 'H10', ST_SetSRID(ST_MakePoint(24.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-6', 'H10', ST_SetSRID(ST_MakePoint(30.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-7', 'H10', ST_SetSRID(ST_MakePoint(36.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-8', 'H10', ST_SetSRID(ST_MakePoint(42.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-9', 'H10', ST_SetSRID(ST_MakePoint(48.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-10', 'H10', ST_SetSRID(ST_MakePoint(54.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-11', 'H10', ST_SetSRID(ST_MakePoint(60.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-12', 'H10', ST_SetSRID(ST_MakePoint(66.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-13', 'H10', ST_SetSRID(ST_MakePoint(72.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-14', 'H10', ST_SetSRID(ST_MakePoint(78.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-15', 'H10', ST_SetSRID(ST_MakePoint(84.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false), + ('H10-RT-14-16', 'H10', ST_SetSRID(ST_MakePoint(90.89, 125.06), 0), true, true, true, true, (SELECT has_gas FROM hall WHERE id='H10'), false) +ON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed; + diff --git a/tools/cad/extract_trench_seed_k2.py b/tools/cad/extract_trench_seed_k2.py new file mode 100644 index 0000000..718c8c2 --- /dev/null +++ b/tools/cad/extract_trench_seed_k2.py @@ -0,0 +1,314 @@ +# -*- coding: utf-8 -*- +"""K2(제2전시장 H6~H10) 트렌치 실측 시드 생성기 — V66 (PLANNING R4 실측 대체, K1 V61의 K2판). + +소스: 원본-1층 평면도.dwg → LibreDWG dwg2dxf 변환본(예: scratchpad k2_plan1f.dxf). + 홀 프레임(FRAMES)을 실측한 파일과 동일 도면이라 좌표계가 자동 정합된다. + ※ "2전시장 E3-59~69 지상1층 전력간선 평면도(분할).dwg"는 교차검증용으로만 사용 — + 그 안의 '전시장 유틸라인' xref는 x=509.2m에서 잘린 크롭본 + 채널 위상이 ~3.5m 어긋나 + 시드 소스로 부적합(docs/analysis/cad-extraction.md §K2 트렌치 참조). + +방식: 111MB DXF를 ezdxf 없이 스트리밍 태그 파싱(4GB RAM 노트북 안전) — + BLOCKS 내부까지 트렌치 레이어(LINE/LWPOLYLINE) 수집, INSERT 체인 변환으로 월드 좌표 복원, + 홀 프레임(±11~12° 회전) 로컬로 변환·클리핑 후 가로 채널 행을 병합(쌍선 스냅 1.5m), + 채널을 따라 6m 간격 공급 포인트 생성(K1과 동일 샘플링 규약). + +사용: + python tools/cad/extract_trench_seed_k2.py + +좌표 규약: CAD mm → 홀 로컬 m. 홀 로컬 y=0은 도면 상단(v=v1), y = v1 - v (상하 반전). +""" +import io +import math +import sys +from collections import defaultdict + +MM = 1000.0 +MIN_RUN_M = 30.0 # 채널 인정 최소 연장(짧은 스퍼·피더 배제 — K1 동일) +POINT_STEP_M = 6.0 # 공급 포인트 샘플링 간격(K1 동일 규약) +ROW_SNAP_M = 1.5 # 쌍선(채널 양변) 병합 허용(K1 동일) +HORIZ_TOL_M = 1.0 # 프레임 로컬 수평 판정 허용 dv + +# 홀 프레임(fork 확정, docs/analysis/cad-extraction.md §K2): (회전deg, 중심, u0,u1, v0,v1) +FRAMES = { + "H6": (-12, (530, 405), 482, 542, 350.5, 443.5), + "H7": (0, (0, 0), 439, 529, 215.5, 341.5), + "H8": (0, (0, 0), 439, 529, 89.5, 215.5), + "H9": (-11, (245, 155), 196, 295, 95.5, 227.5), + "H10": (11, (255, 330), 194.5, 293.5, 250, 382), +} + +TRENCH_KEYS = [b"TRENCH", "트렌치".encode("cp949"), "트랜치".encode("cp949")] + + +def is_trench_layer(layer_bytes): + u = layer_bytes.upper() + return any(k in u for k in TRENCH_KEYS) + + +# ---------- 1) DXF 스트리밍 파싱 (BLOCKS + ENTITIES) ---------- + +def parse(src): + segs_by_container = defaultdict(list) # container(bytes) -> [(x1,y1,x2,y2)] mm + inserts_by_container = defaultdict(list) # container -> [(name,x,y,sx,sy,rot)] + section = None + container = None + ent = None + + def flush(ent): + if ent is None: + return + c = ent["container"] + if c is None or ent.get("paper"): + return + t = ent["type"] + if t == b"INSERT" and ent.get("name"): + inserts_by_container[c].append( + (ent["name"], ent.get("x", 0.0), ent.get("y", 0.0), + ent.get("sx", 1.0), ent.get("sy", 1.0), ent.get("rot", 0.0))) + return + if not is_trench_layer(ent.get("layer", b"")): + return + if t == b"LINE": + if all(k in ent for k in ("x", "y", "x2", "y2")): + segs_by_container[c].append((ent["x"], ent["y"], ent["x2"], ent["y2"])) + elif t == b"LWPOLYLINE": + pts = ent.get("pts", []) + for a, b in zip(pts, pts[1:]): + segs_by_container[c].append((a[0], a[1], b[0], b[1])) + + f = open(src, "rb", buffering=1024 * 1024 * 8) + expect_section_name = False + while True: + code_raw = f.readline() + if not code_raw: + break + val = f.readline() + if not val: + break + try: + code = int(code_raw) + except ValueError: + continue + v = val.strip() + if code == 0: + flush(ent) + ent = None + if v == b"SECTION": + expect_section_name = True + elif v == b"ENDSEC": + section = None + container = None + elif v == b"BLOCK" and section == b"BLOCKS": + ent = {"type": b"BLOCK", "container": None} + elif v == b"ENDBLK": + container = None + elif section in (b"BLOCKS", b"ENTITIES") and v in (b"LINE", b"LWPOLYLINE", b"INSERT"): + ent = {"type": v, "container": container} + continue + if expect_section_name and code == 2: + section = v + expect_section_name = False + if section == b"ENTITIES": + container = b"*MS" + continue + if ent is None: + continue + if ent["type"] == b"BLOCK": + if code == 2: + container = v + ent = None + continue + if code == 8: + ent["layer"] = v + elif code == 67: + ent["paper"] = v == b"1" + elif code == 2 and ent["type"] == b"INSERT": + ent["name"] = v + elif code == 10: + x = float(v) + if ent["type"] == b"LWPOLYLINE": + ent.setdefault("pts", []).append([x, 0.0]) + else: + ent["x"] = x + elif code == 20: + y = float(v) + if ent["type"] == b"LWPOLYLINE": + pts = ent.get("pts") + if pts: + pts[-1][1] = y + else: + ent["y"] = y + elif code == 11: + ent["x2"] = float(v) + elif code == 21: + ent["y2"] = float(v) + elif code == 41: + ent["sx"] = float(v) + elif code == 42: + ent["sy"] = float(v) + elif code == 50 and ent["type"] == b"INSERT": + ent["rot"] = float(v) + flush(ent) + f.close() + return segs_by_container, inserts_by_container + + +# ---------- 2) INSERT 체인 해석 → 월드 세그(m) ---------- + +def _transform(px, py, ins): + x0, y0, sx, sy, rot = ins + px, py = px * sx, py * sy + if rot: + t = math.radians(rot) + px, py = px * math.cos(t) - py * math.sin(t), px * math.sin(t) + py * math.cos(t) + return px + x0, py + y0 + + +def world_segs(segs_by_container, inserts_by_container): + cache = {} + + def placements(cname, depth=0): + if cname == b"*MS": + return [lambda p: p] + if depth > 6: + return [] + if cname in cache: + return cache[cname] + out = [] + for parent, inss in inserts_by_container.items(): + for ins in inss: + if ins[0] != cname: + continue + geo = ins[1:] + for up in placements(parent, depth + 1): + out.append(lambda p, geo=geo, up=up: up(_transform(p[0], p[1], geo))) + cache[cname] = out + return out + + ws = [] + for c, ss in segs_by_container.items(): + for pl in placements(c): + for (x1, y1, x2, y2) in ss: + wx1, wy1 = pl((x1, y1)) + wx2, wy2 = pl((x2, y2)) + ws.append((wx1 / MM, wy1 / MM, wx2 / MM, wy2 / MM)) + return ws + + +# ---------- 3) 홀 프레임 변환·클리핑·채널 병합 ---------- + +def _rot_frame(x, y, deg, c): + if deg == 0: + return x, y + t = math.radians(-deg) + dx, dy = x - c[0], y - c[1] + return c[0] + dx * math.cos(t) - dy * math.sin(t), c[1] + dx * math.sin(t) + dy * math.cos(t) + + +def _clip(ua, va, ub, vb, u0, u1, v0, v1): + """Liang-Barsky 세그 사각 클리핑.""" + du, dv = ub - ua, vb - va + t0, t1 = 0.0, 1.0 + for p, q in ((-du, ua - u0), (du, u1 - ua), (-dv, va - v0), (dv, v1 - va)): + if p == 0: + if q < 0: + return None + continue + r = q / p + if p < 0: + if r > t1: + return None + t0 = max(t0, r) + else: + if r < t0: + return None + t1 = min(t1, r) + if t0 > t1: + return None + return (ua + t0 * du, ua + t1 * du, (va + vb) / 2 + 0 * t0) # (cu0, cu1, vm) — 수평 전제 + + +def channels_of(ws): + """홀별 채널 [(center_y, x0, x1)] — 로컬 y=0 도면 상단(상하 반전).""" + out = {} + for hall, (deg, c, u0, u1, v0, v1) in FRAMES.items(): + rows = defaultdict(list) + for (x1, y1, x2, y2) in ws: + ua, va = _rot_frame(x1, y1, deg, c) + ub, vb = _rot_frame(x2, y2, deg, c) + if abs(vb - va) > HORIZ_TOL_M: + continue + cl = _clip(ua, va, ub, vb, u0, u1, v0, v1) + if cl is None: + continue + cu0, cu1, vm = cl + lx0, lx1 = min(cu0, cu1) - u0, max(cu0, cu1) - u0 + if lx1 - lx0 < MIN_RUN_M: + continue + rows[round((v1 - vm) * 2) / 2].append((lx0, lx1)) + merged = [] # (center_y, x0, x1) + for y, spans in sorted(rows.items()): + x0 = min(s[0] for s in spans) + x1 = max(s[1] for s in spans) + if merged and y - merged[-1][0] <= ROW_SNAP_M: + py, px0, px1 = merged[-1] + merged[-1] = ((py + y) / 2, min(px0, x0), max(px1, x1)) + else: + merged.append((y, x0, x1)) + out[hall] = merged + return out + + +# ---------- 4) SQL 산출 ---------- + +def main(): + src, out_sql = sys.argv[1], sys.argv[2] + segs_by_container, inserts_by_container = parse(src) + ws = world_segs(segs_by_container, inserts_by_container) + chans = channels_of(ws) + + sql = io.StringIO() + sql.write( + "-- V66: K2 홀6~10 트렌치 실측 시드 — CAD(원본-1층 평면도.dwg) TRENCH 레이어 추출(V61의 K2판).\n" + "-- 생성기: tools/cad/extract_trench_seed_k2.py (재생성 가능·결정적). 근거: docs/analysis/cad-extraction.md §K2 트렌치.\n" + "-- 실측: 홀 프레임(±11~12° 회전) 로컬 가로 채널(쌍선 병합 중심선)·연장 실좌표. 포인트 6m 간격은 샘플링 규약.\n" + "-- 교차검증: 전력간선 평면도(E3-59~69)의 채널 구조(9m 피치·쌍선·홀 배치각)와 정합 —\n" + "-- 단, 그 도면의 유틸라인 xref는 크롭본(x<=509.2m)이라 시드 소스는 홀 프레임과 동일 원점인 원본 평면도 사용.\n" + "-- 정책: 실측 확보 홀(H6~H10)의 가정(is_assumed) 포인트를 실측 포인트로 대체(K1 V61과 동일).\n" + "-- 공급 플래그는 V5 정책 유지(공동구 — 전 서비스 true·gas는 홀 보유 여부), 위치만 실측 대체.\n\n" + ) + report = [] + total = 0 + for hall, merged in chans.items(): + report.append(f"{hall}: 채널 {len(merged)}개 " + ", ".join(f"y={m[0]:.1f} x[{m[1]:.1f}..{m[2]:.1f}]" for m in merged)) + if not merged: + continue + total += len(merged) + sql.write(f"-- {hall}: 실측 채널 {len(merged)}개\n") + sql.write(f"DELETE FROM trench WHERE hall_id = '{hall}' AND is_assumed;\n") + values = [] + for ri, (cy, x0, x1) in enumerate(merged, 1): + k = 0 + x = x0 + while x <= x1 + 1e-6: + k += 1 + values.append( + f"('{hall}-RT-{ri}-{k}', '{hall}', ST_SetSRID(ST_MakePoint({x:.2f}, {cy:.2f}), 0), " + f"true, true, true, true, (SELECT has_gas FROM hall WHERE id='{hall}'), false)" + ) + x += POINT_STEP_M + sql.write( + "INSERT INTO trench (id, hall_id, geom, supply_power, supply_water, supply_air, supply_network, supply_gas, is_assumed)\nVALUES\n " + + ",\n ".join(values) + + "\nON CONFLICT (id) DO UPDATE SET geom = EXCLUDED.geom, is_assumed = EXCLUDED.is_assumed;\n\n" + ) + + with open(out_sql, "w", encoding="utf-8") as f: + f.write(sql.getvalue()) + for line in report: + print(line) + print(f"OK -> {out_sql} (채널 {total}개)") + + +if __name__ == "__main__": + main()