--- type: concept status: stable related_pages: ["[[B05_Profile/B05_backend]]", "[[B06_Section/B06_backend]]", "[[architecture/shared_resources]]"] last_updated: 2026-07-19 source: docs/raw/verification/2026-07-19_verify_종횡단_생성_B05_이관.md --- # DB: 경로/종횡단 테이블 ← [[db_schema/overview]] ## routes (노선 경로) *사용처: [[B05_Profile/B05_db]]* | 컬럼 | 타입 | Null | Key | Default / Extra | |---|---|---|---|---| | `id` | `int(11)` | NO | PRI | `auto_increment` | | `project_id` | `char(36)` | NO | MUL | FK→projects.id | | `surface_model_id` | `int(11)` | YES | MUL | FK→surface_models.id | | `status` | `varchar(50)` | YES | | `DRAFT` ➡️ `CONFIRMED` ➡️ `ARCHIVED` | | `start_chainage_m` / `end_chainage_m` | `float` | YES | | 시작 시점 / 끝 시점 연장(m) | | `total_length_m` | `float` | YES | | 총 연장(m) | | `grade_percent` | `longtext` | YES | | 경사도 정보 JSON | | `constraints` / `algorithm_params` | `longtext` | YES | | 회피 구역 JSON / 알고리즘 가중치 파라미터 JSON | | `route_data_path` | `varchar(500)` | YES | | 노선 데이터 (GeoJSON) 파일 경로 | | `computed_at` / `created_at` | - | - | | 연산 완료 일시 / 생성 일시 | ## route_points (경로 좌표점) *사용처: [[B05_Profile/B05_db]]* | 컬럼 | 타입 | Null | Key | Default / Extra | |---|---|---|---|---| | `id` | `int(11)` | NO | PRI | `auto_increment` | | `route_id` | `int(11)` | NO | MUL | FK→routes.id | | `chainage_m` | `float` | YES | | 시점 거리(m) | | `elevation_m` / `slope_percent` | `float` | YES | | 표고(m) / 종단 경사율(%) | | `sequence_num` | `int(11)` | YES | | 점 순서 | ## route_statistics (노선 통계) *사용처: [[B05_Profile/B05_db]]* | 컬럼 | 타입 | Null | Key | Default / Extra | |---|---|---|---|---| | `id` | `int(11)` | NO | PRI | `auto_increment` | | `route_id` | `int(11)` | NO | MUL | FK→routes.id | | `min_slope` / `max_slope` / `mean_slope` | `float` | YES | | 최저 / 최고 / 평균 경사(%) | | `cut_volume_m3` / `fill_volume_m3` | `float` | YES | | 절토량(㎥) / 성토량(㎥) | | `tree_cutting_volume` / `cost_score` | `float` | YES | | 벌채량 / 평점 비용 스코어 | ## longitudinal_sections (종단면 설계) *사용처: [[B05_Profile/B05_db]] (생성/저장), [[B06_Section/B06_db]] (조회/확정)* | 컬럼 | 타입 | Null | Key | Default / Extra | |---|---|---|---|---| | `id` | `int(11)` | NO | PRI | `auto_increment` | | `project_id` / `route_id` | `char(36)` / `int` | NO | MUL | FK→projects / routes | | `computed_at` | `timestamp` | YES | | 종단 계산 일시 | | `data` | `longtext` | YES | | 지반고/계획고/구배 등 설계 데이터 JSON | | `longitudinal_file_path` | `varchar(500)` | YES | | 종단도면 캐드 파일 경로 | | `status` | `varchar(50)` | YES | | `DRAFT` / `CONFIRMED` | ### `data` 컬럼 내 `options` 스냅샷 구조 (2026-07-19 도입) 종횡단 계산(`solve_route`) 완료 시, `longitudinal_sections.data` 필드의 최상위 키 `"options"` 하위에 당시 적용한 측점/횡단 생성 파라미터가 JSON 구조로 영구 보존됩니다. ### `data` 컬럼 내 `profile_alignment` 구조 (2026-07-23 도입) 사용자가 직접 편집 및 확정한 종단 계획고 선형 기하 데이터(PVI 목록, 곡선 제원, 절성토 균형 지표, 규정 위반 목록 등)가 `"profile_alignment"` 키 하위에 저장됩니다. 상세한 스펙 및 JSON 예시는 [[db_schema/route_profile/longitudinal_alignment]] 문서를 참조하십시오. ## cross_sections (횡단면 설계) *사용처: [[B05_Profile/B05_db]] (생성/저장), [[B06_Section/B06_db]] (조회/확정)* | 컬럼 | 타입 | Null | Key | Default / Extra | |---|---|---|---|---| | `id` | `int(11)` | NO | PRI | `auto_increment` | | `project_id` / `route_id` | `char(36)` / `int` | NO | MUL | FK→projects / routes | | `chainage_m` / `sequence_num` | - | YES | | 측정 체인 거리(m) / 단면 순서 | | `data` | `longtext` | YES | | 좌우 사면 경사, 폭, 절성토 단면적 JSON | | `cross_section_file_path` | `varchar(500)` | YES | | 횡단도면 캐드 파일 경로 | | `status` | `varchar(50)` | YES | | `DRAFT` / `CONFIRMED` | ## routes.status 흐름 `DRAFT → CONFIRMED → ARCHIVED` ## cross_sections.data.structures 횡단면 하나에 배치된 구조물 ID 배열 → [[db_schema/structure_output]]#structures 참조