# Ureuk riverside context audit and UT01 winding candidate

## Decision

No new road or terrain elevations are adopted. The important defect is an internal preservation failure in the Tangeum approaches, not missing smoothing on the main terrain. The retained old approach profiles are also implausibly steep, so restoring them is not a defensible realism upgrade. The only ready patch is a small, reversible winding correction. Its optional smoothing variant is display-only and is not the default.

All work here is local. Frozen R2/R3 sources, the website, Drive and public deliveries were not changed. Reference photographs are not included or used as textures.

## Exact findings

1. **Main terrain is already smooth.** `Chungju terrain | revised DEM · 40 m sampling` has 615,580 vertices and 612,268 polygons; all 612,268 polygons are smooth-shaded, with no custom normals or modifiers. It remains a 40 m-reprojected Copernicus GLO-30 surface model, with illustrative shoreline blending. Trees and buildings can contaminate its heights. The texture is 2021 Sentinel-2 RGB at 10 m, not new aerial imagery.
2. **The conspicuous faceted patch is separate estimated Tangeum earthwork.** Full-city read-only raycasts from the final R3 cameras identify `탄금대교 estimated approach earthwork w1265795801_0` and `탄금대교 estimated approach earthwork w224706057_0`. Each has 180 vertices, 88 quads and zero smooth faces. Underdeck pixels (350, 750) and (450, 700) hit the first object near local(-3819.785,290.645,78.647) and(-3850.224,303.155,91.615). These are not the main terrain or new Ureuk support geometry.
3. **The earthwork top edges are stale relative to current roads.** Same-centerlineXY matches within 0.00023 m, but their top edges are up to 44.069 m and 45.605 m above the corresponding current road centers. Bridgeward shell tops are 79.75 m, whereas road centers are 61.860/61.889 m; the existing Tangeum deck is 80.0 m. These side strips must not be described as valid surveyed earthworks.
4. **The stale-width exclusion failure is proven.** `conform_transport_surface.py` constructs excluded cornerXY from `model_data.json` widths and protects vertices within 0.02 m. Source widths for w224706057_0/w1265795801_0 are 14.2/10 m, but actual corrected ribbons are 10.5 m. None of their 90 corners per road match their own stale-width exclusion. All 44 original source faces per road, now 249 descendant polygons total, carry `v04_contact_state=1`: conformed, not protected. Exact source-face identity and plan areas were matched, not inferred from a nearby road.
5. **Restoring the old profile would not fix geographic accuracy.** Existing shell tops plus 0.25 m exactly recover `max(source_JSON_z,80 - 0.04*distance_from_bridge)` with errors below 0.000004 m. This gives endpoints 80→84.334 m and 80→85.041 m, peaks 112.33/115.128 m, and maximum grades 55.83%/66.28%. No such restoration was adopted or prepared for integration. `intended_profile_diagnostics.json` and `approach_profiles.png` document the rejected profile.
6. **Current Ureuk south approaches have real mesh grade errors, independent of the stale source JSON.** `road | tile (-2, -1)` contains w1462756350_0/w1462756351_0. Actual centerline elevations peak at 119.372/122.432 m and touch the existing estimated bridge endpoint at 82.020 m. Worst segment grades are 39.788%/40.807%, with height changes of 6.366 m over 16.001 m and 7.616 m over 18.663 m. The earlier 149 m reading belongs to source JSON, not current mesh. North-side w402773917_0/w402773918_0 maxima are 6.870%/6.923%. No profiles were changed.
7. **Current primary OSM tags do not supply an elevation/tunnel explanation.** Successful API reads for both Ureuk south ways and both audited Tangeum ways have no bridge/tunnel/layer/ele tags. The Ureuk ways are trunk roads with maxspeed 80. This is not proof of an exact real grade or absence of all earthworks; it prevents claiming an unobserved tunnel as the explanation.
8. **The black wedge is not a missing water triangle to fill.** At waterline pixels (1350, 610), (1380, 610/620), and (1395, 610/620), the ray's intersection with water Z=63.3 lies outside the source water polygon's concave outer boundary. Rays continue to coarse terrain at Z=61.8. The map boundary and coarse shoreline surface do not form a credible dry bank there. Filling the water concavity would change source geography; that was not done.

Coordinates are local metres in EPSG:32652 with origin E=404336.63932183944/N=4094303.0380967474. The full-city raycast process exited; R3 SHA stayed a8df4e8cbeaabea7923fa0064fe83d9018d11460596fbc559d44f4cff4c8e400.

## UT01 candidate: exact scope

`patch_earthwork_display.py` exposes:
- `apply_patch()` for winding only, the default.
- `apply_patch(smooth=True)` for optional display-only smooth normals.
- `set_display_smoothing(True/False)` only on an already installed patch.
- `restore()` to restore original object links, visibility, fake-user flags and source mesh/UV/material/custom properties, removing the replacement objects.
- `is_exportable(object)` for explicit archive exclusion plus scene-membership checks. Exporters must honor it or an equivalent `_ut01_archived_source` check.

Only the two named Tangeum side strips are replaced. Original 360 vertices do not move. Original 176 quads are represented by their 352 already-evaluated triangles; 176 triangles have winding reversed. No evaluated triangle location, per-triangle material assignment or cornerUV changes. Sources are archived outside every scene and retained reversibly. No capping, deletion/hiding of the patch, terrain smoothing, river change, grade change or building/bridge edit is performed.

The strips remain open with 180 boundary edges each. Their outer vertices can be above their road edge by 18.172/13.425 m, so blindly capping them would invent crossed cut/fill solids. Correcting winding is not correcting this invalid elevation relationship.

`patch_final_qa.json` records PASS for save/reopen, repeat-apply idempotence, partial-state rejection, exact restore, exact triangle positions/materials/UVs, original metadata retention, zero degenerate faces and zero downward triangle normals. Actual sources have no UV layers; an additional regression inserted two nonuniform cornerUV layers and verified both survived triangulation/winding and restore exactly.

Matched local renders:
- `UT01_before.png`
- `UT01_winding_only.png`
- `UT01_display_smooth.png` (optional display-only alternative)

The winding-only render barely changes under Cycles' two-sided shading. Do not claim visible ground accuracy gained. Optional smoothing softens the facets but retains the same incorrect estimated mound and road context. These are local extracted scenes with a matched camera/light/render setup, not a newly rendered full city. `final_render_provenance.json` ties the default comparison to the final saved winding candidate.

Final local files and hashes are in `patch_final_qa.json`; the source patch should be integrated rather than substituting the local extracted city-context file for the complete scene.

## Future exclusion safeguard

`protect_approach_faces.py` is a separate future-generation helper, not an existing-scene elevation edit. Preferred authoring records each face's exact OSM/source key while creating its ribbon. Protection follows that identity through clipping/triangulation and checks required source counts and unchanged protected geometry; it never infers protection from a JSON width.

`test_protection_mask.py` / `protection_mask_qa.json`: 88 original faces and 249 current descendant polygons protected, zero unrelated polygons; reordering and triangulation preserve protection; missing identities or lost protected geometry fail closed. Current exact face indices are tied to the audited mesh and must not be reused on regenerated geometry.

## Remaining information needed for a defensible grade repair

Minimum useful input is the as-built longitudinal profile/chainage and vertical datum for the western Tangeum approaches and southern Ureuk approaches, plus the bridge-end and far-end road heights. A licensed 1–5 m bare-earth DTM or surveyed road-edge spot heights/cross-sections would constrain the cut/fill and riverbank. Fine imagery can locate road cuts and bank materials but cannot by itself supply reliable elevations. Preserve mappedXY until a surveyed plan or better licensed map justifies changing it.

Even the recovered 80 m profile only makes the **vertical** Tangeum deck join exact. Unchanged plan seams retain about ±1.20/±0.99 m longitudinal skew at lane endpoint edges, and the two inner road boundaries leave about 0.71 m across-deck separation. Thus no “fully joined” claim is warranted. No bridging wedges or lateral corrections were invented.

## Sources

- Frozen model data and source provenance: `Chungju_Refinement_R3/model_data.json`, `Chungju_v04/refinement_inputs_v03.json`, `Chungju_v04/landmark_refinements.json`.
- Exact conformance/exclusion code: `Chungju_v04/scripts/v04/conform_transport_surface.py`, especially `excluded_xy` and the 2 cm protection test.
- Current primary map records: https://api.openstreetmap.org/api/0.6/way/1462756350.json ; https://api.openstreetmap.org/api/0.6/way/1462756351.json ; https://api.openstreetmap.org/api/0.6/way/224706057.json ; https://api.openstreetmap.org/api/0.6/way/1265795801.json . Responses are saved here with OSM attribution/license metadata.
- Inspected photographs: https://photoseoul.tistory.com/558210 (2024-12-10; actual daytime/early-winter photos). They support the narrow asphalt cycleway, yellow dashed center line/white edges, reeds, grass and sparse trees. They are not calibrated surveying evidence. Copyrighted reference images were inspected only and are not distributed.
- Tangeum documented width/bridge context retained by source: https://www.kroad.or.kr/journal/171th_06road_essay.pdf . Model deck elevation 80 m remains explicitly estimated.
