Repository navigation
Description
Status: proposed. The owner approved the design; this plan of eight sub-issues waits for its review.
Part of #3096. This body is the contract of the crossing block: every sub-issue below builds on it, and none may
break an invariant of it. The build has ten steps (table "The sub-issues, in order"). The old body (a deck-plan design that no longer exists) is in this issue's edit history.
Design, pictures and tools on timosPC, /media/timo/OSM1/tmp/ground-plan/crossings/: CASES.md (the design),
HANDBACK.md, OWNER.md, gallery/ (the yardstick), proto/LEARNED.md and proto/sheets/ (what the throwaway
test build taught, and the pictures that the owner approved), drawings/, issues/PLAN.md (the order, the
dependency graph, and the step that is expected to turn each gallery place).
Goal
A rider sees bridges, tunnels and underpasses as they are: a bridge is one deck with an edge, an underside and a
railing, and you see under it where there is room; a tunnel mouth is a frame with a dark opening at the end of a cut;
an underpass is a plain box under the embankment, and the tracks on top stay whole. Where the data or the heights
give no room, nothing tears and nothing stands in a road: the way ends at a closed, framed door.
The three forms and the ladder
- A deck. Bridge ways that touch at one height are one sheet above the ground, with an edge, an underside, a
parapet or a railing on the free outline, and piers. Its ends are ordinary way ends: the bank where there is room,
an end face where there is none. A footbridge, a small bridge, several ways side by side and a viaduct are this
form with another class, another thing under it, another number of ways, another length. - A bore. A tunnel way is, station by station, a bore where it has cover, an open cut near its tag end where it
has none, and not drawn elsewhere. The way on top is never touched. An underpass, a subway, a mouth in a slope and a
shallow tunnel under a town are this form with another class and another thing on top. - A roof. A gallery or a covered bridge is one more sheet over the way, on posts.
- The ladder is the fallback of every form. The room
rbetween the two ways selects one of four whole results:
| Step | Condition | Result |
|---|---|---|
| 1 Full | r >= full |
the deck with its full depth, or the bore with its full height and cover |
| 2 Thin | least <= r < full |
the same with less: first the cover goes, then the depth, then the clearance |
| 3 Closed | 0.5 m < r < least, or the tagged order inverted |
no opening: both ways are ground ways; one is whole, the other ends at the body of the first, with a door where the step is 1 m or more. A tunnel way ends; else the smaller way ends (the later row of roads.json): a railway never ends, and of two railways the later row ends |
| 4 At grade | ` | r |
full and least come from the class rows (GP12.1): for a deck, the lower way's clearance plus the upper way's
deck; for a bore, the bore plus its roof plate. The defaults give an opening from 3.4 m over a road, 5.2 m over a
railway, 2.2 m over a path, 0.7 m over water under a road deck (0.5 m under a path deck), and for a bore 3.3 m
(road), 5.1 m (rail), 2.2 m (path).
The owner's decisions (fixed; do not reopen)
- The three forms with the ladder full → thin → closed → at grade: approved as proposed.
- A tunnel mouth, for a road and a path: the slope cut back as a bank; walls only where there is no room.
- The way down into a path subway: concrete walls with a railing. One rule gives 2 and 3: on the open stretch of a
tunnel way, a path's too, a bank where there is room and a wall only where there is none (the subway's way down
has none); a path's wall carries a railing. - A road under a railway on a bank that the terrain model flattens: option C, the road down by at most 3 m and the
railway bank raised for the rest. - The ground over a shallow tunnel may be lifted by at most 1 m, only as the fallback: the heights first make the
tunnel sit lower. - No room at all: the closed, framed door. With no room a railway never ends; the smaller way ends (not the
carriageway-before-rail-bed order ofplan.jsonranks); of two railways, the later row ofroads.jsonends. - End faces under a bridge end and tunnel frames may be taller than 4.5 m.
- Bridges side by side as one deck, small bridges and footbridges, viaducts and the far forms: as proposed.
- Galleries: yes. No structure part may read as a paper-thin sheet: every part has a real thickness and closed
faces (his note on the gallery picture ofG01). - The underpass at Attinghausen with today's heights and the new drawing reads right; what fills its opening in the
view from the east is checked before the build claims it. - The rails stay whole above an underpass; overlapping bridges are frequent and get one deck plan.
- A bridge or tunnel pull request merges only after the owner saw many labelled shots of bridges and tunnels and
gave his OK. A shoot of the 50-place gallery (about 25 minutes of GPU) once or twice per step is accepted. - The block may add about 15 to 25 kB of WASM gzip, the smooth wall top included; each step reports its bytes.
- ground plan: outline edges cut at the global bin grid and split where their cones' need varies #3340 merges without a smooth wall top (the one wall-top step at
m3is accepted until then); GP12.2a owns the
smooth wall top. - The standing rules of the epic hold: no special cases and no repair passes; a torn face is the worst fault; walls
only on road and rail classes, at most 4.5 m, with a smooth top and no pattern repeat; one road model near and
far; cheap algorithms for the phone; lean tests (no new browser test without a reason only a browser can prove);
thin parts of correct geometry are fine, only garbage is a fault.
Invariants of the block
Every step keeps all of them. Each line says how it is checked; the step that adds a check owns it.
- No terrain or ground face inside an opening: nothing of storey 0 between a bore's floor and roof behind a
portal line, and no ground over a deck's underside less 0.5 m where the ladder gives an opening. Check: crate tests
of GP12.2b and GP12.4 over the fixture; the gallery. - The way on top is never cut: over a bore, the outline and the heights of every way of storey 0 are those
without the bore. Check: GP12.4's crate test; the tracks atA1. - Every ending is whole: a way ends on one straight end line with an ordinary end (its bank round the end, an
end face, or a door). No torn, folded or free-standing face; no triangle crosses an end line. Check: GP12.2b's test
(triangles within 3 m of an end line steeper than the rock face that are not step slots: 0) and the heights gates of
host/obc-ground-plan/tests/heights_fixture.rs. - One end line per change: a frame and its bore share one end line; two sheets, or a sheet and storey 0, touch
only on an end line and share its row of points. Check: GP12.3a and GP12.4 tests. - Nothing is drawn for a HIDDEN station; storey 0 over it is whole. Check: GP12.5's test.
- Real thickness: every structure part that a camera can see from its edge has the stated thickness below and
closed faces on every visible side, near and far. No single-sided sheet shows an edge. Check: the shell closure
test of GP12.3a (every shell edge has two triangles), the far closure test of GP12.6, the gallery. - Walls only on road and rail classes; a path gets banks, except a wall where the open stretch of a tunnel way has
no room for a bank. End faces, frames and doors are structure faces, not walls: they exist for every class. Check:
GP12.5's count of wall-look steps beside path classes. - A wall top is a smooth profile along the wall, and the slope beside it has no bands: no stepped top, no facet,
no cut end, no visible pattern repeat; the same for an end face. Check: GP12.2a's checks (wall_steps, the border
check per wall top, the half-bin shift test, them3views); the gallery. - No pier stands in a way of any storey under it. Check: GP12.3a's count.
- One model near and far: a structure has one source at every distance; at the mesh range no structure is
doubled or missing; the pages paint storey 0 only. Check: GP12.6's hand-over views and far-block test. - Two cells agree on every state, end line, storey and vertex on their shared border. Check: the border check
(the epic's check 2) per storey. - The drawing never moves a way: it absorbs a lack of room only by the ladder. Check: the way's heights in the
records equal the tiles'. - No special case: no code recognises a place, a class pair or a kind of crossing. The case distinctions that
remain, with their reason: deck or bore (the shell goes down or up: one builder with a sign); the class (values of
its row: width, clearance, bore, edge feature, rank); a structure face is not a retaining wall (it may be taller
than 4.5 m); water under a deck (the water rule owns its banks and level). A step lists every other one it needs,
with its reason, or it stops. - The default path does not change until GP19 (TrailView ground plan GP19: the ground plan becomes the only path, the old code goes, docs, budgets, merge into develop #3110).
Thickness of each part (invariant 6). The values are the design's, today's code's where the design gives none,
or the approved prototype's; a step that changes one says so in its pull request.
| Part | Thickness | Step |
|---|---|---|
| Deck edge band | 0.5 m wide; as deep as the deck | GP12.3a |
| Deck slab | the tile's deck depth; on ladder step 2 down to 0.4 m (a path 0.2 m) |
GP12.3a |
| Parapet | 0.35 m wide, 1.0 m over the deck, closed | GP12.3a |
| Railing | posts and top rail 0.08 m square, 1.05 m high, closed; a cable 0.04 m | GP12.3a, GP12.5 |
| Pier | 1.6 m along a road deck, 0.5 m along a path deck, 0.6 of the deck's width, closed | GP12.3a |
| Bore walls | 0.6 m | GP12.4 |
| Bore roof | at least 0.3 m of slab between the bore and the ground | GP12.4 |
| Frame (portal and door) | jambs 0.7 m, lintel 1.3 m, 0.6 m deep, with a coping | GP12.4, GP12.5 |
| End face, cut wall | a step of the ground body: the ground is behind it; no free edge; its top is GP12.2a's | GP12.2b, GP12.4 |
| Pit wall (subway way down) | 0.3 m where its top stands free, with a coping | GP12.5 |
| Gallery roof slab | 1.2 m at the hill, 0.6 m at the valley edge, closed at its ends | GP12.7 |
| Gallery posts | 0.6 m square | GP12.7 |
| Covered bridge walls and roof | stated in GP12.7 before its build | GP12.7 |
| Far deck form | the edge faces keep the deck's depth, box and ribbon | GP12.6 |
| Far portal plate | the frame's depth | GP12.6 |
The yardstick: the gallery
- 50 real crossings of box B with fixed cameras (
crossings/gallery/views.json: an eye camera and an oblique camera
each, the owner's own camera atA1andA2). One command shoots them on a build and a data set:
crossings/gallery/shoot.sh DATA_LABEL FEATURES_ARCHIVE OUT_DIR(DIST=andBUILD=for another build). It makes
the pictures with a label box (build, data, place, camera), one sheet per place, andshots.jsonl. - Baseline: build
ground-plana72e294 on the demo release 66462e9e (the old solver's round 2 heights):
6 GOOD, 12 IMPERFECT, 32 BROKEN. Decks 5 / 8 / 9 of 22; bores 1 / 2 / 23 of 26 (every underpass and subway, 13 of
13, is BROKEN, also where the heights give full room); roofs 0 / 2 / 0 of 2. The verdicts are in
gallery/INDEX.md. - Rules for every step:
- Shoot all 50 places before (the base head) and after (the pull request head) on the same data. One before | after
sheet per place, each tile with its label box. The implementer opens every sheet and writes a verdict per place
in a table beside the baseline. A "before" shoot of the same base head may be reused. - No place may get worse unless the owner saw its sheet before the merge.
- The step names the places that it must turn from BROKEN and the places that must stay GOOD (
B06,B07,B12,
B14,N3,B1). - The orchestrator sends the owner the sheets and more labelled shots of bridges and tunnels; the merge waits for
his OK.
- Shoot all 50 places before (the base head) and after (the pull request head) on the same data. One before | after
- Cost of the yardstick: one shoot of the 50 places takes about 25 minutes of the GPU (
BATCH=7); a step needs
one or two. The owner accepts this. - What each step is expected to turn (the full table, one row per place:
issues/PLAN.md):
| Step | Places |
|---|---|
| GP12.2a | the wall tops at W1, T01, R02, W5, R11 (and m3, m4 of the fixture) |
| GP12.2b | S5, B01, p08, W1, W2, p02 |
| GP12.3b | A2, W1, p01, B10, N1, B09, B04; the crossed walls at T15, the slit at R09 |
| GP12.4 | A1, N5, N6, T02, p04, T07, T14, T09, v2, T01, T05, T06, R01, S3 |
| GP12.5 | S1, S2, S7, W3, R03, R08; with GP12.8 part A and the box B rebake: R02, W5, R11 |
| GP12.6 | the far views (new far cameras at the viaducts and mouths) |
| GP12.7 | G01, K1 |
| GP12.8 | S4, N4, R09 (its step); the room of the places on step 2 or 3 today |
| Whole, not true (data limits, CASES 8.1) | S8, W4, T11; T15 (open point 1) |
Costs (the phone)
- The owner's rule: compare every cost with develop first; several times develop means a redesign, not tuning.
The target is an iPhone 13; no phone number exists yet (TrailView: pool sizes from one device share, and a mesh field that fades at a cell without a mesh #3280 and TrailView ground plan: measurements before the far-cell work (coarse records, stamp GPU time, iPhone, city caps) #3201 own the phone run). - Bases of each step:
ground-planat the branch point; develop's head for the frame; and today's structure code
for the same structures: on the sample of the GP12 design measurement (12 zoom-13 tiles of Lucerne and Engelberg,
192 level-15 nodes,gp12-design/measure/gp12-share.ts), today's bridges, tunnels and galleries were 155 k of 185 k
structure triangles and 82 % of the packed structure bytes. GP12.3a and GP12.4 measure that side again. - Measured per step: cell build time native, p50 and p95 (over the fixture and over its cells with a structure);
WASM time in Chrome (plan-timing.html); triangles and vertices per crossing against today's mesh of the same
structure; record, mesh and far-block bytes per cell (sum, p50, p95, max); the frame in GP0's flightswalkand
valley-drive(flight.mjs --gpu, the clock held, under the GPU lock) and at the Lucerne viewluz(47.05135,
8.30525, heading 60, eye 1.7); WASM bytes, gzip and raw, against the guard
(builder/wasm/wasm_size_guard.py --module ground-plan). - WASM: the owner accepts about 15 to 25 kB of gzip for the block, the wall top included. Each step reports its
bytes; a step stops and reports past 25 kB in total. No large Rust goes: the old structure code is TypeScript and
stays until GP19. To spend less: one shell builder for deck, bore and roof; no i128 and no generic sorts; debug layers
inexamples/. - Stop rule: a step stops and reports when a cost reaches twice its base.
Old code
On the plan path each step stops building and drawing its part of the old structure code. The files stay until GP19
(#3110) deletes them, because the default path reads them until then.
| Old code | Stops on the plan path in |
|---|---|
The deck terms of the stamp (DECK, TROUGH, ABUTMENT_CELLS, … in terrain/stamp-core.wgsl) at levels 16 to 18, the abutment box of bridges.ts |
GP12.2b |
The near decks of structures/bridges.ts, the corridor plan of roads/decks.ts. Until GP12.6 the old bridge mesh is the far look: the structure pipeline binds the plan cells and discards its fragments where plan_meshed holds (a new, temporary mechanism) |
GP12.3b |
The tunnel terms of the stamp (COVER of a tunnel, PORTAL_CORE, PORTAL_CELLS), the terrain's portal holes and boxes, the near parts of structures/tunnels.ts |
GP12.4 |
The far meshes of bridges.ts and tunnels.ts, their meshes in the stamps layer, the deck terms at the far levels, the temporary discard |
GP12.6 |
structures/galleries.ts, the covered style of bridges.ts, the gallery terms of the stamp |
GP12.7 |
GP19's table of deletions changes with this: bridges.ts, tunnels.ts, galleries.ts and roads/decks.ts go whole
(no simple far deck of bridges.ts stays).
Not in this block
- Level crossings, rails and sleepers on decks and in bores, platforms, stairs (TrailView ground plan GP13: railways and steps: rails, sleepers, rack and cable, platforms, level crossings with gates and lights, step treads #3106). Step 4 of the ladder is the
level crossing that exists. - Culverts and pipes (TrailView ground plan GP15: water crossings: culverts, fords, pipes in stones, stepping stones, footbridges #3108): a deck shorter than 2 m between its end lines, or a bridge way over water on ladder
step 3, is a ground way over a culvert. Footbridges over streams are decks of GP12.3a and GP12.3b. - Ornament: guardrails, delineators, lamps, signs, catenary masts (TrailView ground plan GP16: edge features: guardrails, delineator posts, wall caps, railings, mapped barriers #3115, TrailView ground plan GP17: point objects: street lamps, OSM point kinds, catenary masts, aerialway pylons and stations #3116). Only the parts that a structure
needs to be whole are in this block: parapets and railings on decks, the railing on a path's wall in a tunnel's open stretch and on an end face
under a way, copings, frames, doors. - Building passages (not in the tiles), dams and weirs, car-park levels with only a
layertag (ground ways).
The sub-issues, in order
| # | Issue | One line | Depends on |
|---|---|---|---|
| GP12.1 | #3342 | States, end lines, storeys and the ladder in the way graph; counts only, no picture changes | nothing |
| GP12.2a | #3343 | The smooth wall top: a slope and a wall that vary continuously along the rim (#3340 merges without it) | #3340 merged |
| GP12.2b | #3352 | The cause of today's torn walls (can start now); ordinary ends, end faces and the ceiling at bridge ends | GP12.2a (its proof part nothing) |
| GP12.3a | #3344 | Deck sheets in the crate: storey records, one deck plan per storey, storey mesh, the shell with a real thickness; no pixel change | GP12.1, GP12.2b |
| GP12.3b | #3353 | Decks in the viewer: the shell drawn, shadows, the ladder for decks, the old near deck stops | GP12.3a |
| GP12.4 | #3345 | Bores and portals: the open cut, the cover and its rank, the end face with the opening, the frame, the bore sheet | GP12.1, GP12.2b, GP12.3b; GP12.8 part A for the places under towns |
| GP12.5 | #3346 | The closed framed door, hidden stretches, the no-room wall on a tunnel's open stretch | GP12.4; GP12.8 part A and the box B rebake for the places under towns |
| GP12.6 | #3347 | The far forms (deck box and ribbon, portal plate); pages paint storey 0 only; the old meshes stop | GP12.3b, GP12.4, #3273 B2 |
| GP12.7 | #3348 | Roofs: galleries and covered bridges as solid slabs on posts | GP12.3b, GP12.6 |
| GP12.8 | #3349 | Part A: the bake carries every shallow tunnel's tag (no pixel change). Part B: the heights contract for the solver | part A nothing; part B the resumed solver work |
Implementers: Opus at xhigh for GP12.2a, GP12.2b, GP12.3a, GP12.3b and GP12.4 (the risk and the sheets), at high for the
others; reviews
at high. One agent per sub-issue, at most three at a time; after two failed rounds on one sub-issue, stop and report.
Open points (not settled)
T15: a viaduct into a tunnel that is not drawn ends in the air (the terrain model does not hold the cliff, so
the tunnel stations lie over the terrain and are HIDDEN). A general way out is written down and not proven: read
OPEN as "the way goes on as it was" for at most 30 m from a tag end, so that a deck goes on as a deck until it
meets the ground. GP12.1 and GP12.8 count the kind and the distances; then the owner decides.- A railway tunnel with no room under a road (open with the owner). (a) It is not drawn there: a closed door on
each side, like any tunnel (the orchestrator's recommendation). (b) It stays whole in an open cut, and the road
ends at it. Size: 43 closed and 4 inverted rail bores on today's data, 0 on the solver's bakec3(CASES section
4). GP12.1 counts both outcomes; until the answer the rule is (a). - Catenary masts over a box (a mast foot on the cover sinks into the box roof): TrailView ground plan GP17: point objects: street lamps, OSM point kinds, catenary masts, aerialway pylons and stations #3116's; GP12.4 counts them.
- Costs are estimates (CASES 7.6), and the storey corners and shell offsets on the GPU are not measured (CASES
9.4). GP12.3a and GP12.3b measure them first and stop at twice the base. - The least rooms (an opening of 3.0 m for a road, 2.0 m for a path) are a look chosen by the design; the owner
can change them in the class rows.
Words
- Storey: 0 is the ground; a deck is on storey +1 (+2 …), a bore on −1 (−2 …). Sheet: the faces of one storey
that one overlay builds. Shell: the parts built from a sheet's outline (edge, underside, walls, roof, frame,
railing, pier). - State of a station of a tagged way: DECK, BORE, OPEN (a ground way), HIDDEN (not drawn).
- End line: A at a deck end, the portal line at a change BORE ↔ OPEN, the closed line at a change to HIDDEN. One
straight line across the way. - Room
r: surface of the upper way less surface of the lower way, the least over the area where the two paved
strokes overlap. Full, least: the rooms of the ladder. - End face: the step on an end line: a structure face, not a retaining wall. Door: a closed, framed, dark end
face. Cover: the ground over a bore behind its portal line.
Activity
timohueser commentedon Nov 9, 2026
Status of this item (2026-11-09):
/media/timo/OSM1/tmp/ground-plan/gp12-design/DESIGN.md(timosPC;Status: proposed, review inREVIEW.md, pictures inFAULTS.mdandMOCKS.md). It has five general operations: a transition line A in the graph, structure bounds in the records, ordinary way ends in the faces, solids from the bounds, and one baked structure mesh at every distance. The body changes only after the owner approves the design.Generated by Claude Code
timohueser commentedon Nov 10, 2026
Owner flight of checkpoint 2: two structure cases for this issue
The owner reported one place near Attinghausen. Checkpoint 1, checkpoint 2 and the old path of develop draw the same faults there. The census finds no mesh error in the 3×3 cells. The road heights of the feature layer are within 6.4 m of the terrain. Thus the cause is structure drawing, which is the scope of this issue.
Add these two cases to the design and to the acceptance views:
View:
?ground=plan&lat=46.863392&lon=8.633428&heading=352.2&pitch=-38.6&alt=656.6View:
?ground=plan&lat=46.862943&lon=8.633666&heading=347.8&pitch=-32.6&alt=541.0A third fault at the same place is a water fault, not a structure fault: at the confluence of the Schächen and the Reuss the water has straight cut edges and a terrain wedge with a vertical edge is above the water. It goes to the water work.
timohueser commentedon Nov 10, 2026
Owner notes on the Attinghausen cases (2026-11-10)
timohueser commentedon Nov 10, 2026
Diagnosis of the Attinghausen underpass (2026-11-10)
The viewer builds the 20 m road underpass below the railway as a mountain tunnel: a portal facade and a box at each end.
portalBox(structures/tunnels.ts) makes each box 12.1 m deep, thus the two boxes cover the full tunnel. Each roof is the road height at its facade plus 5.6 m. The west roof is 0.35 m below the west track. The east roof is 0.15 m above the east track and covers it for approximately 10 m in the plan path.The design needs a rule for a short tunnel below a way on the ground (the solver flags this case as
underpass): for example, the upper way is drawn on a bridge, or the box and the portal zone stay at least the cover below the upper way. A patch for this one place would be a special case.[-]TrailView ground plan GP12: bridges, tunnels and galleries: deck plans, parapets, slab, seats, the far handover, portals[/-][+]TrailView ground plan GP12: bridges, tunnels, underpasses and galleries: decks, bores and roofs with the ladder (the contract of the crossing block)[/+]timohueser commentedon Nov 12, 2026
Correction after the merge of GP12.8 part A (#3382), from its proofs and its review (
crossings/REVIEW-3382.md).The body of this issue says or implies that part A (the bake keeps the
tunneltag on a tunnel that the shallow rule turns into a ground way) unblocks the gallery places R02 (Kriens), W5 and R11. That is wrong. The motorway tunnels at those three places are of the kindtunnelin every bake (the demo data, round 1 and the new bake); the shallow rule never touched them. Their faults come from the road heights of the demo data and from the old tunnel drawing. On round-1 heights R02 is whole (crossings/gallery/r1-vs-today/).What part A does give: on the test box 194 shallow tunnels (mostly short tunnels under buildings) keep their tag, as
tunnel=yeson a ground kind, so that the step that draws tunnels can see them. No reader reads that tag today.For the step that first reads the tag (#3345): tiles of feature revision 15 that were baked before #3382 do not carry it. That step must depend on a rebake (the revision 16 of #3337 or a later one) or raise the revision itself; otherwise regions on older tiles silently keep their shallow tunnels as ground ways.
Also wrong in the body of #3349: "or the mapped value" (the tag's value is always
yes) and that the ground kinds' keep lists includetunnel(they do not; the tag is written by the shallow rule itself).Generated by Claude Code
timohueser commentedon Nov 13, 2026
Owner decision, 2026-11-13: "Cut, allow ~60 kB".
The WASM allowance of the whole crossing block (GP12: decks, bores and portals, far forms, roofs) is about 60 kB gzipped on the device, in place of the earlier 15 to 25 kB. That estimate was wrong by about 3 times: the review of #3464 measured +62.1 kB gzipped for the deck code alone when the device links it (the shell about 42 %,
graph::levels25 %, the deck faces and the records merge 29 %).The cuts come first. They are part of GP12.3b (#3353), before the device links the storeys:
graph::levelsmoves into the bake (planned for GP12.8): about −16 to −26 kB.Each step of the block reports its measured device size against the base, from the CI build, and the sum against the 60 kB.
Generated by Claude Code