Skip to content

Havel canoe map (/havel) + north-up fix for all grid terrain scenes#100

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/geo-havel
Jul 10, 2026
Merged

Havel canoe map (/havel) + north-up fix for all grid terrain scenes#100
AdaWorldAPI merged 3 commits into
mainfrom
claude/geo-havel

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

The operator's next-10-days canoe region as a ver-9 photoreal scene — plus a display-orientation fix that corrects every grid terrain scene (iceland, grand-canyon, havel), caught during the Havel-vs-Google alignment check.

Havel canoe map — /havel

  • bbox 12.246494,53.011917 → 13.657894,53.539721 (Mecklenburg lake district: Müritz, Müritz-Nationalpark, Uckermark), fetched keyless at z14/ds3 — Terrarium DEM + ESRI World Imagery, 5,330 tiles, 0 missing.
  • No Garmin tile exists for the region → baked by iceland_dem --grid --skin (new flag): sinks the raw ESRI pixels into the ver-9 grid as per-vertex colour; vertex i IS demgrid cell i (1:1, no resampling).
  • 5546×3498 = 19.4M verts, elev 12–174 m (flat lowland — the value is the skin). gz 72.7 MB in public/ (under GitHub's 100 MB hard limit; Release-hosted on-demand fetch is a tracked follow-up). Budget-LOD: 19.4M full → stride-2 = 4.85M — the ratified "20M is OK if LOD is ~5M" operating point.
  • First-class route /havel (like /ice): top-level Route + pathScene alias + scene-menu alias. (First attempt missed the top-level router and fell through to the AIWAR cockpit — caught by the headless verification shot.)

North-up fix (all ver-8/9 grid scenes, no rebake)

The bake stores z = (lat − lat0)·M (north = +z) while the default aerial camera sits on the +z side (screen-up = −z) — so every grid scene rendered N–S mirrored against a real map. Found by the operator comparing the Havel render to Google (the Kölpinsee chain appeared south of the Müritz); the demgrid ground truth verified correct, so the bug was display-side only.

Fix in decodeGrid: negate zrow at read (positions + normals derive from that one table), emit the triangle winding flipped ((a,d2,b)/(b,d2,e)) so faces keep pointing +y, negate the concept-centroid z. Wire bytes + HHTL keys untouched — the merged canyon and iceland assets render correctly with no rebake.

White balance (Havel)

The ESRI imagery over Mecklenburg is hazy — measured white point p98 = 171/166/145. Bake-time per-channel p2→p98 stretch (→10..250) + saturation ×1.18 on the demgrid rgb, then rebake: corrected colour sunk once (the Diaprojektor model), not shader-guessed per frame.

Verification

  • cargo build --release -p geo-hhtl --bin iceland_dem --features helix
  • npx tsc --noEmit ✓ · npm run build
  • Headless (1.2M proxy): /havel renders the lake district north-up (Müritz + Kölpinsee at NW, matching ground truth + Google), haze gone, HUD verts 1.21M · full grid.

Note on the reported React quarto-dev#185

The minified Maximum update depth exceeded from the branch deploy did not reproduce in a headless sweep of the terrain routes (desktop + mobile emulation, LOD/topo/features toggles, pick, orbit) — only environmental 404/connection noise. Static audit found no setState reachable from the render loop. Still open; tracked separately rather than blocking this PR.

Follow-ups (carried)

  • Host the big scene assets (69–72 MB) in a q2 Release, fetched on-demand.
  • /osm dual basemap (OSM ↔ satellite tiles).
  • z15 canyon re-fetch (~20M real detail → LOD ~5M); optional Sentinel-2 skin source.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits July 10, 2026 11:21
iceland_dem is the DEM→grid baker with no Garmin-tile dependency, so it's the
right tool for skin scenes outside a Garmin IMG (e.g. the Havel canoe map).
--skin (grid mode + a v2 demgrid) sinks the raw ESRI pixels into the grid as
per-vertex colour (ver-9 photoreal skin) instead of the classified KIND palette;
vertex i IS demgrid cell i, so the drape maps 1:1 with no resampling. Without
--skin the bake is unchanged (ver-8 palette grid). Version log now reads the
actual wire version from the header.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jEwwaT5JZ5x8qWvcnaMYC
…akes)

The Havel canoe region (operator's next-10-days trip): bbox
12.246494,53.011917 .. 13.657894,53.539721 (upper-left / lower-right from
satellites.pro), fetched keyless at z14/ds3 (Terrarium DEM + ESRI World
Imagery, 5330 tiles, 0 missing).

No Garmin tile exists for the region, so the bake is `iceland_dem --grid
--skin` (the new flag from the previous commit): 5546×3498 = 19.4M verts,
elev 12..174 m — flat lowland, so the scene's whole value is the ver-9
photoreal skin (lakes, channels, forest, reed banks). gz 69.3 MB in
public/ (under GitHub's 100 MB blob limit; moving it to a q2 Release
fetched on-demand is a tracked follow-up — the canyon precedent applies).

Budget-LOD lands exactly on the ratified operating point: 19.4M full
birdview → stride-2 = 4.85M ≈ the "20M is OK if LOD is 5 Mio" ask.

Scene wiring is one manifest entry — /garmin/havel resolves through
garmin_scenes and the dropdown auto-populates; zero cockpit code.
Headless-verified on a 1.2M proxy bake: the lake district renders as real
satellite (forest/field patchwork, lake chain, towns); HUD `verts 1.21M ·
full grid`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jEwwaT5JZ5x8qWvcnaMYC
…vel route

Three fixes from the operator's alignment check (Havel vs Google Maps):

1. NORTH-UP FIX (all ver-8/9 grid scenes — iceland, grand-canyon, havel — no
   rebake). The bake stores z = (lat−lat0)·M (north = +z) while the default
   aerial camera sits on the +z side (screen-up = −z), so every grid scene
   rendered N–S MIRRORED against a real map. Caught on the Havel: the
   Kölpinsee chain appeared SOUTH of the Müritz. The demgrid ground truth
   verified correct — display-side only. Fix in decodeGrid: negate zrow at
   read (positions + normals derive from the one table), emit the triangle
   winding flipped ((a,d2,b)/(b,d2,e)) so faces keep pointing +y, negate the
   concept-centroid z. Wire bytes + HHTL keys untouched.

2. WHITE BALANCE (operator: "the lighting is rather dull"). The ESRI imagery
   over Mecklenburg is hazy — measured white point p98 = 171/166/145.
   Bake-time per-channel p2→p98 stretch (→ 10..250) + saturation ×1.18 on the
   demgrid rgb, then rebake: the corrected colour is sunk into the grid once
   (the Diaprojektor model), not shader-guessed per frame. Havel asset
   replaced (72.7 MB gz).

3. /havel FIRST-CLASS ROUTE (like /ice): main.tsx Route + pathScene alias →
   garmin:havel + scene-menu alias so the dropdown shows it selected. First
   attempt missed the top-level router (the path fell through to the AIWAR
   cockpit) — caught by the headless shot.

Headless-verified on a 1.2M proxy: Müritz + Kölpinsee at NW (north-up ✓),
haze gone, /havel renders the terrain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jEwwaT5JZ5x8qWvcnaMYC
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a5972227-8ba0-4898-8d44-9012caee88bd

📥 Commits

Reviewing files that changed from the base of the PR and between 4c4daa1 and 987e3d5.

⛔ Files ignored due to path filters (1)
  • cockpit/public/havel.v8grid.soa.gz is excluded by !**/*.gz
📒 Files selected for processing (5)
  • claude-notes/plans/2026-07-10-garmin-dem-satellite-skin.md
  • cockpit/public/body.manifest.json
  • cockpit/src/GeoHelix.tsx
  • cockpit/src/main.tsx
  • geo/src/bin/iceland_dem.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e18a1cdb-3ce7-45bc-922f-affe5ca04b8e)

@AdaWorldAPI AdaWorldAPI merged commit 2112136 into main Jul 10, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 987e3d578b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cockpit/src/GeoHelix.tsx
// appeared SOUTH of the Müritz). Negate z at decode — positions, normals and the
// row table all derive from this one table, and the winding below is emitted in
// the flipped order so faces keep pointing +y. Wire + HHTL keys are untouched.
for (let i = 0; i < Hf; i++) zrow[i] = -zrow[i];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mirror registered overlays with the terrain

For any Garmin scene that has a garmin_drapes or garmin_contours entry, this z flip moves only the terrain: the DRP1 sidecars are still decoded in their original display frame and buildDrape/buildContours copy src[i + 2] unchanged, while garmin::drape bakes those points by sampling the pre-flip pos grid. As soon as a scene uses those existing sidecars, roads/rivers/contours will be north-south mirrored relative to the terrain; negate the overlay z in the same path or rebake/update the sidecar convention together with this decode change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants