garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/mockups/field-check/v2.html

raw

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cartopolis — field check v2: a harness for correcting the world</title>
<link rel="stylesheet" href="style.css">
<style>
:root { --ok:#9fd3b4; --okbg:rgba(159,211,180,.16); --warn:#ffcf7a; }
body { width:1840px; }
.essence { font-size:25px; line-height:1.32; color:var(--cream); max-width:1500px; margin:16px 0 30px; letter-spacing:-.2px; }
.essence b { color:var(--brand); font-weight:inherit; }
.rules { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:44px; }
.rules div { background:var(--surface); border:1px solid var(--gline); border-radius:16px; padding:18px 20px; }
.rules h3 { color:var(--cream); font-size:17px; margin-bottom:6px; }
.rules h3 span { color:var(--brand); margin-right:6px; }
.rules p { color:var(--dim); font-size:14px; }
.rules i { color:var(--text); font-style:normal; }
.new { font-size:10.5px; padding:1px 6px; border-radius:6px; background:rgba(253,96,18,.2); color:#ffb48a; vertical-align:1px; margin-left:4px; }

/* the agent */
.agent { background:#2c3f47; }
.thead .who b .bot { display:inline; vertical-align:2px; font-size:10.5px; color:var(--accent); background:var(--hover); border-radius:6px; padding:0 6px; margin-left:6px; }

/* attach sheet */
.attach { position:absolute; left:10px; right:10px; bottom:86px; z-index:6; background:var(--glass); backdrop-filter:blur(16px); border:1px solid var(--gline); border-radius:20px; padding:10px; display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.attach div { display:flex; flex-direction:column; align-items:center; gap:6px; font-size:12px; color:var(--dim); padding:8px 2px; border-radius:14px; text-align:center; }
.attach .ic { width:46px; height:46px; border-radius:14px; background:var(--raised); border:1px solid var(--gline); display:grid; place-items:center; color:var(--text); }
.attach .hot { background:rgba(253,96,18,.12); color:var(--cream); }
.attach .hot .ic { background:var(--brand); color:#fff; border-color:transparent; }
.scrim { position:absolute; inset:0; background:rgba(5,8,9,.45); z-index:5; }

/* capture */
.cam { position:absolute; inset:0; background-size:cover; background-position:center; }
.cam::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.45) 0, transparent 20%, transparent 70%, rgba(0,0,0,.6) 100%); }
.ghost-layer { position:absolute; inset:0; background-size:cover; background-position:center; opacity:.42; mix-blend-mode:normal; z-index:1; }
.chips { position:absolute; top:52px; left:12px; right:12px; z-index:4; display:flex; flex-wrap:wrap; gap:6px; }
.chips .chip { position:static; }
.chip.ok { color:var(--ok); border-color:rgba(159,211,180,.4); }
.chip.warn { color:var(--warn); border-color:rgba(255,207,122,.4); }
.dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.pip { position:absolute; right:12px; top:128px; width:112px; height:199px; border-radius:14px; background-size:cover; background-position:center; z-index:4; border:2px solid #fff; box-shadow:0 8px 20px rgba(0,0,0,.5); }
.pip span { position:absolute; left:6px; bottom:6px; font-size:10.5px; color:#fff; background:rgba(10,14,16,.75); padding:1px 6px; border-radius:6px; }
.camctl { position:absolute; left:0; right:0; bottom:34px; z-index:4; display:flex; justify-content:space-between; align-items:center; padding:0 34px; }
.shutter { width:74px; height:74px; border-radius:50%; border:4px solid #fff; display:grid; place-items:center; }
.shutter div { width:58px; height:58px; border-radius:50%; background:#fff; position:relative; overflow:hidden; }
.shutter div::after { content:""; position:absolute; right:0; top:0; bottom:0; width:50%; background:var(--brand); }
.round { width:48px; height:48px; border-radius:50%; background:rgba(10,14,16,.6); border:1px solid var(--gline); display:grid; place-items:center; color:#fff; position:relative; }
.round.on { background:var(--accent); color:var(--ink); }
.round small { position:absolute; bottom:-18px; font-size:10.5px; color:#fff; white-space:nowrap; }
.ghostbar { position:absolute; left:34px; right:34px; bottom:132px; z-index:4; display:flex; align-items:center; gap:10px; font-size:11.5px; color:#fff; }
.ghostbar .track { flex:1; height:4px; border-radius:2px; background:rgba(255,255,255,.3); position:relative; }
.ghostbar .track::before { content:""; position:absolute; left:0; top:0; bottom:0; width:42%; background:#fff; border-radius:2px; }
.ghostbar .track::after { content:""; position:absolute; left:42%; top:50%; width:16px; height:16px; border-radius:50%; background:#fff; transform:translate(-50%,-50%); }
.tip { position:absolute; left:12px; right:12px; bottom:196px; z-index:4; text-align:center; font-size:12px; color:#fff; text-shadow:0 1px 3px #000; }
.close { position:absolute; left:14px; top:50px; z-index:5; }

/* selfie stand-in */
.selfie { position:absolute; inset:0; background:radial-gradient(ellipse 60% 40% at 50% 45%, #5a4a44 0, #3a312e 45%, transparent 46%), linear-gradient(180deg, #8fb3cf 0, #b9c6cc 40%, #7f6a5c 41%, #5d4c42 100%); }
.selfie .head { position:absolute; left:50%; top:30%; width:150px; height:190px; border-radius:50% 50% 46% 46%; background:#c79c84; transform:translateX(-50%); }
.selfie .body { position:absolute; left:50%; top:52%; width:290px; height:330px; border-radius:140px 140px 0 0; background:#33505f; transform:translateX(-50%); }
.selfie .lbl { position:absolute; left:50%; top:44%; transform:translateX(-50%); color:rgba(0,0,0,.45); font-size:12px; z-index:2; }

/* the pair, in the thread */
.pair { align-self:flex-end; width:300px; background:var(--accent); color:var(--ink); border-radius:18px; border-bottom-right-radius:6px; overflow:hidden; }
.pair .imgs { display:grid; grid-template-columns:1fr 1fr; gap:2px; height:200px; background:var(--ink); }
.pair .imgs div { background-size:cover; background-position:center; position:relative; }
.pair .imgs span { position:absolute; left:6px; top:6px; font-size:10.5px; color:#fff; background:rgba(10,14,16,.72); padding:1px 6px; border-radius:6px; }
.pair .meta { padding:8px 11px 4px; font-size:12.5px; }
.pair .meta b { font-weight:inherit; display:block; font-size:14px; }
.pair .meta .q { display:flex; gap:6px; flex-wrap:wrap; margin-top:5px; }
.pair .meta .q span { background:rgba(10,14,16,.1); border-radius:6px; padding:1px 6px; font-size:11px; }
.pair .btns { display:flex; gap:6px; padding:6px 10px 10px; }
.pair .btns div { flex:1; text-align:center; background:var(--ink); color:var(--cream); border-radius:10px; padding:6px; font-size:12.5px; }
.pair small { text-align:right; display:block; font-size:10.5px; opacity:.6; padding:0 11px 6px; }
.m.them ol { margin:4px 0 0 18px; }
#reply { font-size:13.5px; max-width:86%; }
.m.them li { margin-bottom:3px; }

/* compare */
.wipe { position:absolute; inset:0; }
.wipe .a, .wipe .b { position:absolute; inset:0; background-size:cover; background-position:center; }
.wipe .b { clip-path:inset(0 0 0 52%); }
.wipe .line { position:absolute; top:0; bottom:0; left:52%; width:3px; background:#fff; z-index:2; box-shadow:0 0 8px rgba(0,0,0,.5); }
.wipe .knob { position:absolute; left:52%; top:50%; width:40px; height:40px; border-radius:50%; background:#fff; transform:translate(-50%,-50%); z-index:3; display:grid; place-items:center; color:var(--ink); font-size:14px; }
.wipe .tl { position:absolute; top:112px; z-index:3; font-size:12px; color:#fff; background:rgba(10,14,16,.75); padding:3px 9px; border-radius:8px; }
.posebar { position:absolute; left:0; right:0; bottom:0; z-index:4; background:var(--glass); backdrop-filter:blur(16px); border-top:1px solid var(--gline); border-top-left-radius:22px; border-top-right-radius:22px; padding:12px 16px 30px; }
.posebar h4 { color:var(--cream); font-size:15px; font-weight:inherit; }
.posebar p { color:var(--dim); font-size:12px; margin-top:2px; }
.posebar .actions { padding:10px 0 0; }

.bottom { display:grid; grid-template-columns:1.15fr 1fr 1fr; gap:18px; margin-top:52px; }
.bottom > div { background:var(--surface); border:1px solid var(--gline); border-radius:16px; padding:18px 20px; }
.bottom h3 { color:var(--cream); font-size:16px; margin-bottom:8px; }
.bottom li { color:var(--dim); font-size:13.5px; margin:0 0 7px 18px; }
.bottom li b { color:var(--text); font-weight:inherit; }
pre { background:var(--ink); border:1px solid var(--gline); border-radius:12px; padding:12px 14px; font:12.5px/1.5 ui-monospace, monospace; color:var(--text); margin-top:8px; }
pre i { color:var(--line); font-style:normal; }
.credit { color:var(--line); font-size:12px; margin-top:28px; }
.big { display:grid; grid-template-columns:900px 1fr; gap:36px; margin-top:52px; align-items:start; }
.big img { width:900px; border-radius:14px; box-shadow:0 0 0 1px #2b3438, 0 30px 60px rgba(0,0,0,.5); display:block; }
.big h2 { font-size:20px; color:var(--cream); margin-bottom:8px; }
.big h2 span { color:var(--brand); margin-right:6px; }
.big .cap { color:var(--dim); font-size:14px; margin-bottom:14px; }
.steps { display:flex; flex-direction:column; gap:12px; }
.steps div { background:var(--surface); border:1px solid var(--gline); border-radius:14px; padding:14px 16px; }
.steps h3 { color:var(--cream); font-size:15px; margin-bottom:4px; }
.steps h3 span { color:var(--brand); margin-right:6px; }
.steps p { color:var(--dim); font-size:13.5px; }
.steps code, .bottom code { color:var(--text); font-size:12.5px; }
.harness { font-size:10.5px; padding:1px 7px; border-radius:6px; background:var(--hover); color:var(--accent); margin-left:6px; vertical-align:2px; }
.pairmsg { align-self:flex-end; width:210px; background:var(--accent); color:var(--ink); border-radius:18px; border-bottom-right-radius:6px; overflow:hidden; }
.pairmsg img { width:100%; display:block; }
.pairmsg p { padding:7px 11px 2px; font-size:14px; }
.pairmsg small { text-align:right; display:block; font-size:10.5px; opacity:.6; padding:0 11px 6px; }
.dest { position:absolute; left:62px; right:62px; top:50px; z-index:5; text-align:center; font-size:12.5px; color:#fff; }
.dest b { display:block; font-weight:inherit; font-size:14px; }
.fixmsg { align-self:flex-start; width:300px; background:var(--raised); border-radius:18px; border-bottom-left-radius:6px; overflow:hidden; }
.fixmsg .ba { display:grid; grid-template-columns:1fr 1fr; gap:2px; height:90px; background:var(--ink); }
.fixmsg .ba div { background-size:cover; background-position:50% 20%; position:relative; }
.fixmsg .ba span { position:absolute; left:6px; top:6px; font-size:10.5px; color:#fff; background:rgba(10,14,16,.72); padding:1px 6px; border-radius:6px; }
.fixmsg p { padding:8px 12px 2px; font-size:13.5px; color:var(--text); }
.fixmsg .actions { padding:8px 10px 10px; }
.fixmsg small { text-align:right; display:block; font-size:10.5px; color:var(--dim); padding:0 11px 6px; }
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute">
  <symbol id="back" viewBox="0 0 24 24"><path d="M15 5l-7 7 7 7"/></symbol>
  <symbol id="plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
  <symbol id="mic" viewBox="0 0 24 24"><rect x="9" y="3.5" width="6" height="11" rx="3"/><path d="M5.5 11a6.5 6.5 0 0013 0M12 17.5V21"/></symbol>
  <symbol id="x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
  <symbol id="photo" viewBox="0 0 24 24"><rect x="3.5" y="5" width="17" height="14" rx="2"/><circle cx="9" cy="10" r="1.8"/><path d="M4 17l5-5 4 4 3-3 4 4"/></symbol>
  <symbol id="pin" viewBox="0 0 24 24"><path d="M12 21s-6.5-6.2-6.5-11A6.5 6.5 0 0118.5 10c0 4.8-6.5 11-6.5 11z"/><circle cx="12" cy="10" r="2.3"/></symbol>
  <symbol id="loc" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3"/><circle cx="12" cy="12" r="7"/></symbol>
  <symbol id="twin" viewBox="0 0 24 24"><rect x="2.5" y="6" width="9" height="13" rx="1.6"/><path d="M14.5 6l7 3v10l-7-3z"/><path d="M14.5 6v10"/></symbol>
  <symbol id="flip" viewBox="0 0 24 24"><path d="M4 9a8 8 0 0114-3l2 2M20 15a8 8 0 01-14 3l-2-2"/><path d="M20 4v4h-4M4 20v-4h4"/></symbol>
  <symbol id="ghost" viewBox="0 0 24 24"><rect x="3.5" y="4.5" width="12" height="12" rx="1.5"/><rect x="8.5" y="7.5" width="12" height="12" rx="1.5" stroke-dasharray="2 2"/></symbol>
  <symbol id="world" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><path d="M3.5 12h17M12 3.5c2.6 2.6 2.6 14.4 0 17M12 3.5c-2.6 2.6-2.6 14.4 0 17"/></symbol>
  <symbol id="wipe" viewBox="0 0 24 24"><rect x="3.5" y="4.5" width="17" height="15" rx="2"/><path d="M12 4.5v15"/></symbol>
</svg>

<h1>Cartopolis — <b>field check v2: a harness for correcting the world</b></h1>
<p class="essence">A tool for the agent first, a feature maybe later. Standing somewhere with the RTK receiver, one shutter makes <b>one picture: the real view and Cartopolis's view, side by side</b>, with the pose written underneath. You send it to the agent with a line about what's wrong, and the agent's job is to <b>correct the data the world is drawn from</b>, and come back with a before and after.</p>

<div class="rules">
  <div><h3><span>1</span>One picture, readable on its own</h3><p>Real on the left, Cartopolis on the right, same pose, same lens. The pose is <i>burned into the image</i>, so it means something wherever it goes: this chat, a ticket, a claude.ai session.</p></div>
  <div><h3><span>2</span>Front or rear</h3><p>Rear camera: Cartopolis looks where the phone points. Front camera: it turns round with the lens, for the side of a street you have your back to. <i>Flip</i> switches both.</p></div>
  <div><h3><span>3</span>The answer is a data fix</h3><p>Not "looks different", but which register, which object, which rule draws it wrong, and a fix with a re-render from the <i>same pose</i>, so the next picture shows it.</p></div>
</div>

<div class="row">

<!-- A. CAPTURE, REAR -->
<div class="shot">
<div class="phone">
  <div class="cam" style="background-image:url(photo.jpg)"></div>
  <div class="ghost-layer" style="background-image:url(render-north.jpg); opacity:.32"></div>
  <div class="status"><span>14:03</span><div class="notch"></div><span>●●● 71%</span></div>
  <div class="round close" style="width:38px;height:38px"><svg class="i"><use href="#x"/></svg></div>
  <div class="dest"><b>Field check</b>to viberfox</div>
  <div class="chips" style="top:100px">
    <div class="chip ok"><span class="dot"></span>RTK fixed · 1.2 cm</div>
    <div class="chip warn">heading 9° ± 3°</div>
    <div class="chip">tilt 14°</div>
  </div>
  <div class="pip" style="background-image:url(render-north.jpg); top:146px"><span>Cartopolis</span></div>
  <div class="ghostbar"><svg class="i s"><use href="#ghost"/></svg><div class="track"></div><span>ghost</span></div>
  <div class="camctl">
    <div class="round on"><svg class="i"><use href="#ghost"/></svg><small>ghost</small></div>
    <div class="shutter"><div></div></div>
    <div class="round"><svg class="i"><use href="#flip"/></svg><small>rear</small></div>
  </div>
</div>
<h2><span>A</span>Capture, rear camera <span class="harness">harness</span></h2>
<ul>
  <li>Opened from the agent's chat (<b style="color:var(--text);font-weight:inherit">+ ▸ Field check</b>) or the dev menu; not on the ordinary attach menu.</li>
  <li>The corner shows the live render. Ghost lays it over the camera, so a heading that's off shows before you shoot.</li>
</ul>
</div>

<!-- B. CAPTURE, FRONT -->
<div class="shot">
<div class="phone">
  <div class="selfie"><div class="body"></div><div class="head"></div><div class="lbl" style="top:20%">front camera (stand-in)</div></div>
  <div class="status" style="color:#111"><span>14:05</span><div class="notch"></div><span>●●● 70%</span></div>
  <div class="round close" style="width:38px;height:38px"><svg class="i"><use href="#x"/></svg></div>
  <div class="dest" style="color:#111"><b>Field check</b>to viberfox</div>
  <div class="chips" style="top:100px">
    <div class="chip ok"><span class="dot"></span>RTK fixed · 1.4 cm</div>
    <div class="chip warn">heading 189° ± 3°</div>
  </div>
  <div class="pip" style="background-image:url(render-south.jpg); top:146px"><span>behind you</span></div>
  <div class="camctl">
    <div class="round"><svg class="i"><use href="#ghost"/></svg><small>ghost</small></div>
    <div class="shutter"><div></div></div>
    <div class="round on"><svg class="i"><use href="#flip"/></svg><small>front</small></div>
  </div>
</div>
<h2><span>B</span>Flip: front camera <span class="harness">harness</span></h2>
<ul>
  <li>The render turns with the lens: same spot, heading + 180°.</li>
  <li>Drawn without your avatar: Cartopolis looks out from where you stand.</li>
</ul>
</div>

<!-- C. THE THREAD -->
<div class="shot" style="width:390px">
<div class="phone">
  <div class="status"><span>14:21</span><div class="notch"></div><span>●●● 69%</span></div>
  <div class="thead"><svg class="i"><use href="#back"/></svg><div class="av sm agent">vf</div><div class="who"><b>viberfox<span class="bot">agent</span></b><span><span class="live"></span>field walk · Grote Markt</span></div></div>
  <div class="msgs" style="gap:5px">
    <div class="pairmsg"><img src="pair.jpg"><p>the tower is all wrong, and the trees?</p><small>14:03</small></div>
    <div class="m them" style="font-size:12.5px;max-width:92%;line-height:1.3"><ol style="margin:0 0 0 16px"><li><b style="font-weight:inherit;color:var(--cream)">Tower:</b> drawn with the house window rule (tall pre-1920 sashes). It is a listed church; it needs its own facade. Fixing the rule.</li><li><b style="font-weight:inherit;color:var(--cream)">Trees:</b> checking if they are surveyed (BGT) or scattered from a canopy area.</li><li><b style="font-weight:inherit;color:var(--cream)">Fountain, terrace:</b> not drawn; looking in the BGT.</li></ol><small>14:06</small></div>
    <div class="fixmsg"><div class="ba"><div style="background-image:url(render-north.jpg)"><span>before</span></div><div style="background-image:url(render-north.jpg); filter:grayscale(.85) brightness(1.08)"><span>after</span></div></div><p>Church facade, same pose. Branch <b style="font-weight:inherit;color:var(--cream)">field/grote-markt</b>.</p><div class="actions"><div class="p">Merge</div><div>Open in world</div></div><small>14:20</small></div>
  </div>
  <div class="composer"><div class="circ"><svg class="i"><use href="#plus"/></svg></div><div class="field">Message</div><div class="circ hot"><svg class="i"><use href="#mic"/></svg></div></div>
</div>
<h2><span>C</span>To the agent, and back <span class="harness">harness</span></h2>
<ul>
  <li>The picture goes out as one image plus a line from you. The pose also travels as data, for the agent's re-render.</li>
  <li>The agent answers in terms of data (which register, which rule) and returns a before/after <b style="color:var(--text);font-weight:inherit">from the same pose</b>.</li>
  <li>The "after" here is a stand-in, not a real fix.</li>
</ul>
</div>

<div class="shot" style="width:420px; padding-top:6px">
  <div class="steps">
    <div><h3><span>1</span>Shoot</h3><p>The shutter reads the RTK position, the heading and tilt, and the lens, at the instant of the photo, and renders Cartopolis from exactly that.</p></div>
    <div><h3><span>2</span>Look</h3><p>The agent reads the one image, and the pose as data. It can re-shoot the view itself with layers switched off to find which layer is wrong (<code>--shot --at … --look …</code>), and fetch the aerial beside it (<code>--aerial-reference</code>).</p></div>
    <div><h3><span>3</span>Trace</h3><p>Every wrong thing is traced to its source: a register (BAG, BGT, 3DBAG), an OSM tile, or our own rule that draws it.</p></div>
    <div><h3><span>4</span>Fix and prove</h3><p>Fix the data or the rule, re-render from the same pose, send the before/after. A pose that was wrong once becomes a fixed viewpoint the fix can be checked against later.</p></div>
  </div>
</div>

</div>

<div class="big">
  <img src="pair.jpg">
  <div>
    <h2>The picture the shutter makes</h2>
    <p class="cap">One image, about 1920 × 1860: the photo and the render side by side at the same size, the pose underneath. This one is a real render from Cartopolis, made on deck-2. The photo is a stand-in taken from somewhere near, not from this pose.</p>
    <div class="steps">
      <div><h3>The strip underneath</h3><p>Position and how good it is (RTK fixed, 1.2 cm), height above ground, heading with its error, tilt, which camera and lens, the time, and the <i style="font-style:normal;color:var(--text)">client build</i> that drew the right half, because a render is only evidence about the code that made it.</p></div>
      <div><h3>Beside it, as data</h3><p>The same pose as JSON, for the agent to re-render from without reading numbers out of a picture.</p></div>
    </div>
  </div>
</div>

<div class="bottom">
  <div>
    <h3>Already in the app</h3>
    <ul>
      <li><b>The RTK receiver</b> as a position source, with its accuracy.</li>
      <li><b>Both cameras</b> through Camera2: front for calls, back (greyscale) for precise tracking, with the lens read from the phone.</li>
      <li><b>The phone's attitude</b> (heading, tilt) from the orientation sensors.</li>
      <li><b>Pictures in chats</b>, and an agent account that can read and answer one.</li>
      <li><b>Rendering a given pose</b> off-screen, in the shot harness (desktop and headless).</li>
    </ul>
  </div>
  <div>
    <h3>New</h3>
    <ul>
      <li><b>A colour still</b> from either camera, taken in the app so the pose is read at the shutter.</li>
      <li><b>A second render on the phone</b> from the camera's pose and lens.</li>
      <li><b>Composing the one picture</b>, strip included, and sending it with the pose.</li>
      <li><b>The capture screen</b>: corner render, ghost, flip.</li>
    </ul>
  </div>
  <div>
    <h3>Limits</h3>
    <ul>
      <li><b>The compass:</b> 3° of heading is 6 m sideways at 120 m. The ghost shows it; open question whether dragging the ghost into line may correct it (stored beside the measured heading, not instead of it).</li>
      <li><b>Colour on the phone's render</b> is evidence about the phone's GPU; the agent's own re-render on a node is the one to compare lighting on.</li>
    </ul>
  </div>
</div>

<p class="credit">Real photo: "Martinitoren, Grote Markt Groningen", JAHensens, CC BY 4.0, Wikimedia Commons; it stands in for a phone picture and was not taken from the rendered pose. Renders: Cartopolis, deck-2, 2026-10-15, client 410d46f4. The front-camera picture and the "after" are stand-ins.</p>
</body>
</html>