Repository navigation
Description
Status: approved
Part of #3096. One pull request into ground-plan.
Depends on: #3111 (GP1)
TL;DR
Goal: For each cell, obc-ground-plan builds one way graph: every way as its curve with samples at global parameters, split at the cell lines; every junction with its host and guest arms; every joint and end; snapped ends as guests; a level per way piece; every crossing with its type. Two cells give the same graph where they overlap.
Problem: The crate of GP1 decodes features, but nothing turns them into ways that GP3 can offset. Today the viewer finds junctions per tile by exact point keys (roads/arms.ts:124), gives up when a junction has no clean through pair (roads/junctions.ts:87), has no rule for a way end that OSM leaves unconnected, and the bake does nothing for a way that crosses a stream with no tag.
Decision: A pure, local graph stage in host/obc-ground-plan/src/graph/, on GP1's CellInput (the one to four zoom-13 tiles that the cell plus MARGIN_M = 192 m meets, one owned copy of each segment, no OSM id). Stage 1 joins the owned runs of a way from two tiles into one part. Curves are the Hermite spans of format 4. The global parameter of a point is (span, metres from the span's start vertex): a span has the same data in every tile that holds it. Samples lie on a dyadic grid of those metres, refined by a sag test, plus every vertex and every cell-line crossing. Hosts come from side, else from one fallback rule. Snaps, implicit junctions and crossing types follow decision tables with rule values in data/trailview. Each chain of reaches stays at or below 191 m (GP1's reach table), so all cells agree.
Rejected: Sample at span fractions (stream/curve.ts:60): placement and dashes need metres. Sample at stroke metres (along): two tiles give one vertex values about 5 cm apart (GP1), so the grid would differ at zoom-13 lines. Split host spans into two Hermite spans at a junction foot: a split Hermite span is not the same curve. Merge close junctions: the epic keeps them apart. Keep the copies of a way from two tiles as two parts: the seam would be a false joint that cuts room_m and headings.
Systems: trailview
Contracts: none (the new fields of roads.json and waterways.json are not options of the feature step; see Facts)
Size: M (one new module of the crate with six files, about 1,550 lines: the graph about 1,000, its tests about 400, the debug tool's layer, census and bench about 150; two rule tables gain fields; no viewer, bake or format change)
Facts
- A feature with an alignment counts in quarters of a tile unit; a vertex that it shares with a river or stream lies on a whole tile unit, so the two hold one point (
specs/trailview-features.md:108). So shared points are equal integers in the global frame of GP1. - A tile keeps each segment that meets its buffered square whole, plus one vertex more at each end, so the tiles that hold a segment hold the same vertices and alignment there (
specs/trailview-features.md:42-47). A tile owns the points from 0 to less than 16384 (specs/trailview-features.md:49). - GP1: a cell reads every zoom-13 tile that its square grown by
CellKey::margin()meets, one to four (feature_tiles()).MARGIN_Mis 192 m;margin()adds 2 m, because a curve leaves its chord by up to 2 m. Each segment has one owned copy (own): the first read tile, in the order (row, column), whose square it meets. The tiles hold no OSM id.along_mcan jump by up to 10 cm where the owner tile changes. along_codeholds the decimetres along the stroke at the first vertex of each part of each tile, and the metres are the length of the curve (specs/trailview-features.md:84,:277). So two tiles that hold one vertex can give it stroke metres that differ by the rounding of their own part's start: up to 5 cm each.- The bake measures the stroke metres as the sum of
arc, one 5-point Simpson rule per Hermite span with the scale at the chord's middle (host/obc-trailview-features/src/roads/curve.rs:18-25,roads/align.rs:645-649). wordholdswiden,walkandsideper vertex (specs/trailview-features.md:281-284). A way out is a road or a railway track that leaves a point, toward its point 8 m along; where three or more leave a point,sidemarks all but the through pair; a path is never a way out; where a railway crosses three or more road ways out, rails and roads each take the rule alone (specs/trailview-features.md:289-298). The bake's constants:LOOK_M8 m,LOOK_COS−0.3,FOLD_COS0.25 (host/obc-trailview-features/src/roads/network.rs:7-12).- At a plain level crossing (two road ways out, two rail ways out) the four ways out take the rule together, and the rails come first in the class table, so the two road arms carry
sidebits (specs/trailview-features.md:289-298,data/trailview/roads.jsonorder). A joint must ignoreside. - A culvert is a chain of waterway parts tagged
tunnel=culvertortunnel=yes, at mostculvert_max_m(60 m) long; a longer chain is a buried stream; a bridge shorter than 8 m near the terrain is kept as a road on the ground, without itsbridgetag, and holds the cover over the water (specs/trailview-features.md:204-209). Waterway vertices in a tunnel have no level (specs/trailview-features.md:393; the viewer tests this atterrain/culverts.ts:161). - The bake lifts a bridge at least 1.5 m (water), 4.5 m (road), 2.5 m (path) or 6 m (railway) over what it crosses, plus its deck (
specs/trailview-features.md:160). It separates two ground ways of a differentlayerthat cross without a shared vertex by the same clearance (specs/trailview-features.md:171-172). It puts a vertex that a road shares with a river or stream 0.2 m under the water (specs/trailview-features.md:179). - Each way of a bridge has the tag
deck(Structures table,specs/trailview-features.md);bridgevaluesno,boardwalkandlow_water_crossinglie on the ground (builder/web/src/lib/trailview/terrain/bins.ts:65). Avia_ferratahas no heights (specs/trailview-features.md:128). kinds.jsonkeepsjunction,oneway,layer,fordandbridgeonmain-roadandroad;pathkeepsbridge,layerandfordbut nojunction;tunnelkeepstunnelandlayerbut nobridgeorford;riverandstreamkeepwidthandtunnel(data/trailview/kinds.json:11-50).- The step options take only the fields of
CLASS_FIELDSandWATERWAY_FIELDSfrom the two tables (host/obc-trailview-features/src/kinds.rs:17,:33,:171-177,:205-210). A new field outside those lists does not bake the layer again. - The class order of
roads.jsonis the junction rank (GP1'spreserve_orderkeeps it). terrain/bins.test.ts:505compares awaterways.jsonrow, minus the bake fields, with its stamp profile: a new field fails it.- The viewer's chord sag is 5 cm in plan and 3 cm in height for roads, 15 cm and 10 cm for unpaved paths (
builder/web/src/lib/trailview/stream/curve.ts:11). - The fixture holds 9 zoom-13 feature tiles (
builder/web/tests/browser/trailview/fixture/features/13/), about 6.9 km × 7.2 km.
Design
Words of this sub-issue
- Family: road (classes of
main-roadandroad,highway=trackincluded), path (path classes), rail (railway tracks), water (river, canal, stream). The kindtunnelandgallerytake the family of theirhighwayorrailway. - Group: the families that join at a shared vertex: way (road and path together), rail, water.
- Rank: the index of a class in
roads.json(rail first,via_ferratalast); for water, the order ofwaterways.json(river, canal, stream). A lower rank is a better class. - Station: a place on a part's curve:
(part, span, u),uin [0, 1]. A vertex is(v, 0), the last vertex is(n − 2, 1). - Span metres
s: the metres along a span from its start vertex (the earlier vertex in the part's direction), from 0 to the span's lengthL. - Point: a junction, a joint or an end.
- Owned run: consecutive owned segments of one part of one read tile.
- Work area: the cell square grown by
MARGIN_M(192 m at the cell's edge nearer the pole). GP1 keeps every segment within 2 m more, so every span whose curve meets the work area is in the input whole, with one owned copy.
Reach budget (the invariant that makes all cells agree)
Each decision is about an element (a point, a crossing, a sample). It reads data only within its decision reach R_d of the element. Its result changes what GP2 and later stages make only within its effect reach R_e. A cell has complete data within its work area, so where R_d + R_e ≤ 191 m (epic, section 2), every cell that a result reaches decides it from complete, equal data. A span counts as one datum: a span that meets a work area is held whole. GP1's reach table holds every rule's reach and every chain, and its reader asserts each chain at or below 191 m. GP2's rows, with the room that each leaves to later stages:
| Decision | R_d | GP2's own R_e | Room to 191 m (later owners) |
|---|---|---|---|
| samples of a span | the span alone | 0 | 191 m |
| hosts and heading of a junction | HEADING_M (8 m) along each arm |
0 | 119 m (GP3) |
room_m of an arm |
ROOM_MAX_M (30 m) along the arm, plus the R_d of a point there (≤ 40 m: a snap foot, 20 m from its end, plus its 20 m) |
0 | 57 m (GP3) |
| snap of an end | SNAP_REACH_M (20 m), in plan and along the graph |
the link, ≤ 20 m | 87 m (GP3) |
implicit junction, level crossing, water type, Stacked |
the two spans, the water's width at the point, 8 m for headings | 0 | 119 m (GP3, GP13, GP15) |
| synthetic deck | DECK_HALF_MAX_M (40 m) along the upper way |
the stretch, ≤ 40 m | 47 m (GP12) |
| culvert chain | culvert_max_m (60 m) along the water |
0 | 67 m (GP15) |
Each value has its natural size (Code constants); GP2's largest sum, the synthetic deck's, is 80 m. A decision about an element farther from the cell than its R_e can come out differently in two cells. That is harmless: it changes nothing in either cell. along_m is data, not a decision: two cells can take a span from different tiles, and it can jump by up to 10 cm where the owner tile changes (GP1). No GP2 decision reads it. The checks compare the band where the budget holds (Verification).
Inputs (from GP1, in GP1's names)
CellInput: the decoded features of the read tiles (CellKey::feature_tiles()), in their order, positions in the global frame (i64, 1/16 world unit), each part withownper segment,heightsand itsAlignment(along_m,backward, and per vertextangent,grade,bank,widen,side,walk).Sections::wayandSections::water: the class or kind,rank,half_m,shoulder_m,sidewalk_m. GP2 readsouter_m = half_m + max(shoulder_m, sidewalk_m), the outer half-width of a way's bands up to the verge (the verge is GP3's), from GP18'sWidths::outer_m, andWaterSection::half_mserves for water.
Rule-table fields that GP2 adds
None of them is in CLASS_FIELDS or WATERWAY_FIELDS, so the step options do not change. GP1's reader reads them; a missing field is an error. It also rejects a culvert_max_m over 60 m: that value is the culvert chain's R_d (Reach budget).
data/trailview/roads.json, per class:
| Field | Unit | Default | Why |
|---|---|---|---|
snap_m |
m | 1.0 | An end of this class within this distance of a carriageway edge becomes a guest (epic, section 4). |
snap_height_m |
m | 0.5 | The end must lie within this height of the carriageway there (epic). Also the at-grade limit of an implicit junction or level crossing. |
sag_plan_m |
m | 0.05; 0.15 for track, path, bridleway, via_ferrata |
The most that a sample chord, at the way's outer edge, may leave the curve (today's ROAD_SAG, PATH_SAG). |
sag_height_m |
m | 0.03; 0.10 for the same four | The most that a chord may leave the curve in height. |
clearance_m |
m | 6.0 rail classes, 4.5 road classes, 2.5 path classes | The height that a way below needs under a deck (the bake's rule, specs/trailview-features.md:160). |
data/trailview/waterways.json, per kind:
| Field | Unit | Default | Why |
|---|---|---|---|
culvert_width_m |
m | 3.0 | The widest water that an untagged road, track or railway crosses on a culvert; wider water gets a deck. GP18's lift reads it too. |
pipe_width_m |
m | 0.6 | An untagged path over water up to this width: pipe in stones (owner's default). |
stones_width_m |
m | 2.0 | Up to this width: stepping stones; wider: footbridge (owner's default). |
clearance_m |
m | 1.5 | The height over water that a deck needs (the bake's rule). |
Code constants (numeric method and reach budget, not rules), each with its reason in a comment: BASE_STEP_M 16 and MIN_STEP_M 0.125 (the dyadic grid, 7 levels); KNOTS 16 (arc knots per span); HEADING_M 8 (the bake's LOOK_M); ROOM_MAX_M 30 (GP3's longest read along an arm: a return ramp for 4.5 m at the road grade 0.15); SNAP_REACH_M 20 (HALF_MAX_M 15 m plus snap_m and 4 m of widening); DECK_HALF_MAX_M 40 (a deck over water up to 76 m wide at 90°); GRAZE_DEG 20 (GP18's, in sections.rs); SPIKE_DEG 175; STROKE_DEG 0.5; DECK_SIDE_M 1.0; WATER_BANK_M 1.0; ROOT_STEPS 40.
Stage 1: parts
- Owned runs: a run that ends where its tile's part goes on with an unowned segment joins the run, of another read tile, whose first segment is that segment (the same two global vertices) of a feature with the same tags; on a tie, the first in the order of the read tiles. The joined runs form one part, so a way across a tile line has no seam. A run end that joins nothing lies outside the work area (GP1's tiles own every segment there): a possible cut (stage 3).
- For each line feature of the families above, each joined part becomes a
Part. Family and class follow the spec's Heights rules: a railway track's class is itsrailway, orrackwhenrackis notno; another way's class is itshighway; a class that the table lacks takesroad(kindsmain-road,road,tunnel,gallery) orpath(kindpath). Water takes itswaterwaykind. - Level of the part:
Tunnelfor kindtunnelwithtunnelother thanbuilding_passage, and for water with atunneltag other thanno;Deckwhere thedecktag exists; elseGround(galleries, building passages, boardwalks andlow_water_crossingincluded). A bridge shorter than 8 m that the bake keeps as a ground road has nodeck: it isGround(stage 4). - Cleaning, in this order, until nothing changes (each removal adds 1 to its counter):
repeated: a vertex at the same position as the vertex before goes. Itssidebits join the vertex that stays. In the integer frame a zero-length segment is the same case.spikes: an interior vertex where the chords before and after it turn by more thanSPIKE_DEGstays, and its two spans are chords. The test reads only the part.folded: a span whose end tangent points against its chord (dot(t0, chord) ≤ 0ordot(t1, chord) ≤ 0) is evaluated as its chord with linear heights. It is a kink, not a loop. The vertex data stays.
- Unknown heights: a span with an unknown
zat either end goes (no_height), and the part splits there. A part with fewer than 2 vertices goes. Exception: water in a tunnel keeps its spans with no heights, for the culvert test only. - A part with no alignment (no
plan) uses its chords with linear heights andtangentfrom its chords; itsalong_mruns from 0 at its first vertex in each tile.
Stage 2: curves and samples
- Span: between vertices
p0,p1(frame units,f64relative top0), unit tangentst0,t1, chord lengthcin frame units:p(u) = h10·c·t0 + h01·(p1 − p0) + h11·c·t1(the spec's Hermite; the metric scale cancels). Heights use the chord in metres,c_m = c × metres per frame unit at the chord's middle y(GP1'slibmscale).bankandwidenare linear inu.walkis the start vertex's. - Arc:
Lis the bake'sarcof the span (one 5-point Simpson, with the scale at the chord's middle), so theLs sum to the format's stroke metres. Each span holdsknots: [f64; 17]: the 5-point Simpson of each sixteenth ofu, summed and then scaled so that knot 16 equalsL. Between knots,sis linear inu. Sos(u)is strictly increasing, its inverse is exact, and both read only the span. along_m:along0_m + sign × s, withalong0_mthe span's stroke metres at its start vertex in the tile that owns it (that tile part'salong_mplus theLs of its spans before, timessign), andsign−1 whenbackward. It is data for GP16 and GP17 (Reach budget).- Breaks: the span's two vertices, and every crossing of the span with a zoom-16 cell line (all lines, not only near the cell). A crossing of
x(u) = X: the sign ofx(u) − Xat the 17 knots, thenROOT_STEPSbisection steps in each interval with a sign change. The sample takesx = Xexactly andyby the rounding below. A touch without a sign change is no break. A vertex on a line is one break (Vertex). Two breaks that round to one position are one sample (CellLine): the curve runs through a cell corner. - Dyadic samples: the grid of level
liss = k × BASE_STEP_M / 2^l,lfrom 0 to 7 (MIN_STEP_M). The first samples are the breaks and the level-0 grid points. A grid point withinMIN_STEP_M / 2of a break goes. For each interval between neighbouring samples, computedev_plan = max over u in {¼, ½, ¾} of the distance from the curve to the chord + (outer_m + widen_m) × Δθ² / 8(Δθ: the turn of the tangent over the interval) anddev_height = |z(mid) − (z0 + z1)/2|. Ifdev_plan > sag_plan_mordev_height > sag_height_m, and the interval's level is below 7, add the next level's grid points inside the interval (with the same drop rule) and test again. The test reads only the span, so it is the same in every cell. Water is a Hermite curve too: the tiles hold no water tangents, so the crate gives each water vertex the bisector of its two unit chords (it leans to neither chord's length), and an end of the way its one chord; a chain end that is no end of the way reads the tile's vertex past it. A vertex that turns by more thancurve_turn_max_deg(60°) is a corner: its two spans are chords. A span whose curve would leave its chord by more thancurve_off_max_m(2 m) is its chord: the bake reads the terrain for the level within the half-width and 2 m of the mapped line. A folded span is its chord. Its levels run linear along the arc between the vertices (Span::linear_z), and it takes the same sag test withsag_plan_mandsag_height_mofwaterways.json(0.05 m, 0.03 m) andouter_m= its half-width. Crossings are decided on the mapped vertex chords (stage 4). - Rounding: a sample's global position is
p0 + round(δ), withδ = p(u) − p0inf64frame units androundhalf away from zero (libm). Its cell position is the global position less the cell's origin, exact ini32. So two cells give one sample the same global position. Neighbouring samples lie at leastMIN_STEP_M / 2(about 40 frame units) apart along the curve, so their positions differ and each chord has a direction. - Which spans: a span is sampled whole when the hull of its Bézier control points (
p0,p0 + c t0/3,p1 − c t1/3,p1) meets the work area. No break lies at the work area's edge. - Sample (
f64unless named):pos: [i32; 2],span: u32,u,s_m,along_m,z_m,tangent: [f64; 2],grade,bank,widen_m,walk: u8,kind: SampleKind(Vertex,CellLine,Grid,Station). A later stage inserts aStationsample at each junction foot, crossing point and deck end, without changing other samples; it takes the same rounding and the same drop rule against the samples beside it.
Stage 3: points from shared vertices
- Index every vertex (and every water vertex) in the work area by its exact global position.
- Shared segments: where parts of one network hold one segment (two consecutive vertices), every part but the first loses that span (it lies inside the other's carriageway). The order reads only the segment and the vertex past each of its ends: rank, kind, tags in byte order, the part's direction (the lower global position first first), a chord last, then the data of the segment's two vertices, the lower position first, as seen in that direction (tangent, z, grade, bank, widen, side, and the segment's walk), then the positions of the vertices past its lower and its higher end (none first). So every cell that holds the segment decides it alike. Where the order changes along a run, the two parts hand over at a vertex: a joint. Parts that tie exactly all keep the span: no order of parts picks one. The lost pieces end at the run's ends, which become points. Counter
shared_runs(lost stretches). - At each position, group the arms by group (way, rail, water). An arm is (way, station,
dir+1 or −1). A vertex inside a way piece gives two arms, an end gives one.- One group with 3 or more arms: a junction. With 2 arms: a joint. With 1 arm: an end, but only if the position lies in the work area (an end outside it can be a cut).
- Two groups at one position, both with 2 or more arms: a crossing at a shared vertex. Only these pairs make one: way with rail (
LevelCrossing); way with water (Ford, orCulvertwhen the water is in a tunnel); rail with water (the untagged rule of stage 4). Each group also keeps its own junction or joint. Where one group has 1 arm, that arm is an end that meets the other group: no crossing (counterend_on_other).
- Heading of an arm: the unit vector from the point to the curve at
HEADING_Malong the arm's way, or to the way piece's end when it is shorter. Angle:atan2(h_y, h_x), x east, y south. Arms sort by angle, then by the global position of their heading point, then bydir. - Hosts of a junction:
- (a) Way or rail group: if exactly two non-path arms have no
sidebit for their direction (SIDE_BACKfordir−1,SIDE_ONfor +1), those two are the hosts (host_rule: Side). A path is never a way out, so its arms carry no bit and do not count. - (b) Else (no bits, or not exactly two unmarked; water; all arms paths): the candidates are the non-path arms, or all arms when every arm is a path. With one candidate, it is the only host. With more, the host pair is the pair with the lowest (worse rank of the two), then the lowest
dot(h_a, h_b)(most nearly straight on), then the lowest better rank, then the first pair in the arms' sort order (host_rule: Fallback). So a short stub of a better class does not take the through pair of a flight of steps, and a road through pair still wins over a road and a path. - A path arm is never a host when a road arm is at the junction. Every other arm is a guest.
- (a) Way or rail group: if exactly two non-path arms have no
- Joint: two arms;
turn_rad = π − angle between their headings;strokewhen the curve tangents at the point differ by less thanSTROKE_DEG. A joint has no hosts and ignoresside. - Level transitions need no type: each arm carries its way's level. A point whose arms have
GroundandDeckis an abutment for GP12;GroundandTunnela portal.
Stage 4: crossings without a shared vertex
- Whether two pieces cross, and how, is decided on their mapped vertex chords, as the bake decides it: every vertex chord in a grid of 16 m buckets; two chords of two pieces (not neighbouring spans of one part) cross when the exact
i128orientation tests say so, half-open so that a crossing at a vertex counts once. An intersection at the position of a stage-3 point of which both pieces are arms is skipped: stage 3 has it. A way whose first vertex lies on the other's chord ends on it (graph::end_on_chord, counterend_on_other); half-open chords never meet at a last vertex. The stations lie on the curves: where the two curves' sample polylines cross nearest the chords' crossing, withinPLACE_M(16 m), else at each curve's foot of the chords' crossing; the point is that crossing, rounded. The angle is the chords'. - Skip: a pair with a
Tunnelpiece, except water in a tunnel under a ground way; water with water (counterwater_water); a pair of the way and rail groups (road, path or rail with road, path or rail) that crosses at an angle underGRAZE_DEG(countergrazing: the overlay of GP3 decides, for example a tram along a street or a footway drawn on a road's edge). A crossing with water has no grazing skip: it gets a row of the table. - Type, first rule that matches (Δz is the upper minus the lower height at the point,
wthe water's width fromwidth, elsewidth_mof its kind, θ the crossing angle):
| Upper or way | Under | Condition | Type | Source |
|---|---|---|---|---|
a Deck piece |
anything else | Deck |
Tag |
|
| ground road, path or rail | water in a tunnel | the chain is at most culvert_max_m long |
Culvert |
Tag |
| ground road, path or rail | water in a tunnel | longer | Culvert (a buried stream; counter buried) |
Fallback |
ground way with ford (not no) or bridge=low_water_crossing |
water | Ford |
Tag |
|
| ground way | water | θ < GRAZE_DEG |
Stacked (counter grazing_water) |
Fallback |
| ground road, track or rail | water | w ≤ culvert_width_m |
Culvert |
Rule |
| ground road, track or rail | water | wider | Deck (synthetic) |
Rule |
| ground path | water | w ≤ pipe_width_m / ≤ stones_width_m / wider |
PipeInStones / SteppingStones / Footbridge (synthetic) |
Rule |
| ground road or path | ground rail | abs(Δz) ≤ snap_height_m |
LevelCrossing, both get a station |
Rule |
| ground road or path | ground road or path | abs(Δz) ≤ snap_height_m |
an implicit junction at the point (no crossing record), hosts by rule (b) | |
| ground way | ground way or rail | Δz ≥ clearance_m of the lower |
Deck (synthetic, on the upper) |
Rule |
| ground way | ground way or rail | else | Stacked |
Fallback |
The chain of a culvert follows the spec: parts in a tunnel that meet end to end, two at a point, until open water with a level. GP2 reads it up to culvert_max_m each way from the point, which is enough to know whether the whole chain is longer. A Fallback culvert tells GP15 that the stream is buried. snap_height_m is the smaller of the two classes' values. The tag rows apply at every angle.
4. Synthetic deck: the stretch of the upper way from −D to +D metres along it from the point, where D = H / sin θ and H = the lower's outer_m + DECK_SIDE_M (for water: w/2 + WATER_BANK_M + DECK_SIDE_M). Stretches of one way that overlap become one. Fallback, when D > DECK_HALF_MAX_M or the stretch holds a point of stage 3 on the upper way: Stacked, source: Fallback (counter deck_fallback). GP3's overlay and GP6's unrelated-owners rule make the faces of Stacked. A stretch that runs past the way piece's end is cut there (counter deck_cut). The upper piece splits at the stretch ends (stations): the middle piece is Deck, and the two ends are joints with a level transition.
5. Decks: Deck pieces that share a point form one deck; each synthetic stretch is a deck of its own. DeckId is cell-local, in the order of the lowest global position of the deck's samples.
Stage 5: snapped ends
Snaps read the graph of stages 3 and 4, in a fixed order: 5.2 pairs ends, then 5.3 takes the ends that 5.2 left. The pairing of 5.2 reads only candidate ends within snap_m, so 5.3's R_d stays within SNAP_REACH_M, and no decision chains across cells.
- Candidates: the ends of road and path pieces in the work area. Rail, water and tunnel ends never snap.
- End to end: two candidate ends that lie within
snap_m(the smaller of the two classes) of each other, withinsnap_height_min height, and on the same level, pair when each is the other's nearest candidate (ties by the lower global position). Alinkpiece joins them: a straight span from the end with the lower (rank, global position) to the other end, heights linear. Both ends become a joint and a joint (counterlinks_end). - To a carriageway: for each other end E, find the target: a road or path piece with a rank not worse than E's class, on E's level (or on the ground when E is a
Deckend), that E does not reach along the graph withinSNAP_REACH_M, whose curve lies withinSNAP_REACH_Mof E and whose carriageway edge lies withinsnap_mof E:dist(E, curve) − (half_m + widen(u_f)) ≤ snap_m, whereu_fis the foot of E on the curve (projection on the samples, then a fixed number of Newton steps on the curve). A target whose edge is in reach but whose curve is not stays out (countersnap_far; only awidthtag pastHALF_MAX_Mgives it). The height test:|z_E − (z(u_f) + bank(u_f) × s)| ≤ snap_height_m,sthe signed offset of E clamped to±half_m. Of several targets: the nearest edge, then the better rank, then the lower global position of the foot. - The junction point: the foot F =
p(u_f), rounded. If a point of stage 3 or 4 lies on the target withinsnap_malong its curve of F, F moves to that point (a joint becomes a junction, an end of the target becomes a junction with one host arm). The target's arms at F are the hosts; the link is a guest. Alinkpiece runs straight from E to F, heights linear,alongrunning on from E. E becomes a joint of the way and its link, and its kink is real: GP3's band union covers it (counterlinks_carriageway). - Links and crossings: a link of 5.2 or 5.4 that crosses a sample segment of another way piece (stage 4's grid, not at its own two points) goes, and its ends stay ends (counter
link_crossed). A link is at mostSNAP_REACH_Mlong, so the test stays within the snap's R_d. - An end with no target stays an
End; GP3 gives it its end shape (counterends).
Stage 6: arms and stats
room_mof each arm: the metres along its way from the point to the next point in its direction (snap feet included), or to the piece's end, at mostROOM_MAX_M.nextnames that point.ownedon each point and crossing: its position lies in the cell square (half-open). The census and placement count only owned elements.GraphStatsholds every counter above, plusjunctions,joints,implicit_junctions,crossingsper (type, source), andsamples.
Output types (graph/mod.rs)
WayGraph { cell: CellKey, parts: Vec<Part>, ways: Vec<Way>, samples: Vec<Sample>, junctions: Vec<Junction>, joints: Vec<Joint>, ends: Vec<End>, crossings: Vec<Crossing>, decks: Vec<Deck>, stats: GraphStats }.
Part { feature: FeatureRef, family, class: u8, level, backward: bool, vertices: Vec<Vertex>, spans: Vec<Span> },Span { len_m: f64, knots: [f64; 17], along0_m: f64, chord: bool },Vertex { pos: [i64; 2], z_m: f64, tangent: f64, grade, bank, widen_m, walk: u8, side: u8, shared: bool }.Way { id: u32, part: u32, from: Station, to: Station, family: Family, class: u8, level: Level, deck: Option<u32>, link: Option<LinkKind>, samples: Range<u32> }. This is the epic'sWay, with no OSM id (the tiles hold none): its curve is its part's spans fromfromtoto, and its tags are its feature's.Level { Ground, Deck, Tunnel };Family { Road, Path, Rail, Water };LinkKind { EndToEnd, Carriageway }.Arm { way: u32, at: Station, dir: i8, heading: [f64; 2], angle: f64, host: bool, level: Level, room_m: f64, next: Option<PointRef> }.Junction { pos: [i32; 2], network: Network, arms: Vec<Arm>, host_rule: HostRule, implicit: bool, owned: bool };Joint { pos, network, arms: [Arm; 2], turn_rad: f64, stroke: bool, owned };End { pos, network, arm: Arm, owned };Network { Way, Rail, Water }.Crossing { pos: [i32; 2], over: Station, under: Station, kind: CrossingKind, source: Source, angle_rad: f64, deck: Option<u32>, owned },CrossingKind { Deck, Culvert, Ford, PipeInStones, SteppingStones, Footbridge, LevelCrossing, Stacked },Source { Tag, SharedVertex, Rule, Fallback }.- Ids are cell-local and in a fixed order: parts by their global vertex sequence, ways by (part, from), points by position, crossings by position. No output depends on a hash map's order, and no decision depends on an id.
What the other items take
- GP3 takes ways with samples (its offset curves), junctions with hosts, guests, headings and
room_m, joints withturn_rad, ends, links, crossings (LevelCrossingandFordfaces), levels and decks (a deck's plan is built on its own level). Its effects stay within the R_e of the Reach budget. - GP4 takes
walkand the links; it defines driveways from the tags. - GP6 takes
z_m,grade,bankandwiden_mon the samples, and the link heights. - GP12 takes decks, abutment and portal points,
Deckcrossings with what lies under them, and synthetic stretches (no piers). - GP13 takes
LevelCrossing; GP15 takesCulvert,Ford,PipeInStones,SteppingStonesandFootbridge. A taggedCulvertorFordcan have θ underGRAZE_DEG; aFallbackculvert is a buried stream (its chain is longer thanculvert_max_m). - GP16 and GP17 take
s_mandalong_m(Reach budget). - GP18 reads
culvert_width_mfor its lift, so the bake and the crate call the same crossings culverts.
Edge cases
- Empty input or no line feature: an empty, valid
WayGraph. - Closed way (first vertex = last): a joint of the way with itself. A way through one point twice: arms per occurrence.
- Roundabout:
sidegives the ring as hosts at most entries. Where an entry of a better class takes the through pair, the ring arm is a guest; GP3's union stays valid. No roundabout rule. - Hairpin: no graph rule. Its apex vertex is not a spike (turn under 175°).
- Micro way between two junctions a few centimetres apart: two junctions,
room_mof a few centimetres; no merge. - Two arms on one heading: sorted by their heading points, then
dir; GP3's corner fill shrinks to the room. - Inconsistent
side(not exactly two unmarked non-path arms): rule (b). - Level crossing at a road junction: a way junction, a rail joint and a
LevelCrossingat one point. - Footway ending on a street vertex, path across a road at a shared node: a way junction; the road arms are the hosts.
- Road ending on a railway or a stream (one arm): an end, no crossing.
- Path end on a cut slope over a road: the height test fails, it stays an end.
- Path end just inside a carriageway: distance 0, it snaps.
- End near a way of a worse class (road end at a footway): no snap; the overlay of GP3 and the unrelated-owners rule of GP6 decide.
- Two ends a few centimetres apart (OSM split with two nodes): end to end, a link.
- Bridge end on the road it crosses: a shared vertex, a junction with a level transition.
- Deck end not connected near a road: a
Deckend may snap to a ground carriageway: an abutment junction. - Junction on a bridge: a junction whose arms are all
Deck. - Short bridge that the bake keeps as a ground road (under 8 m, no
bridgetag): an untagged ground road. Over water up toculvert_width_mit is aCulvert, as the bake's cover says; over wider water a synthetic deck at the road's heights, orStackedwhen it does not fit. - Duplicate way or a way along another one: a shared run (one group) or grazing crossings.
- Ford tag on a way over a culvert:
Culvert(the water is in a pipe). - Untagged road over a 30 m river at 20°:
D= 17 m / sin 20° = 49.7 m > 40 m, soStackedwithFallback. - Cell and tile borders: samples include every cell-line crossing; a way across a tile line is one part (stage 1); a point belongs to the cell that holds it.
- A rule cannot fit: every case in the tables above ends in a valid record: an end, a grazing skip of two ways,
Stacked, or a fallback type. GP2 never drops a way that has heights.
Plan
host/obc-ground-plan/src/sections.rs(GP1): read the new fields of both tables, with their validation.Widths::outer_m,GRAZE_DEGandculvert_width_mare GP18's (same wave): if GP18 has not merged, GP2 adds them in GP18's names; the second pull request keeps one.data/trailview/roads.json,data/trailview/waterways.json: add the fields of the two tables above, for every row.terrain/bins.test.ts: the waterway test compares onlytol,reach,least,cut,fillwithPROFILES(GP2's change).graph/parts.rs:fn parts(input: &CellInput, rules, area) -> (Vec<Part>, Stats): runs and their joins, family, class, level, cleaning, unknown heights.graph/curve.rs:Spanwithlen_mandknots;fn point(&Span, u) -> SpanPoint;fn s_at(&Span, u) -> f64;fn u_at(&Span, s) -> f64;fn along(&Part, span, u) -> f64;fn line_roots(&Span, axis, value) -> Vec<f64>;fn samples(&Part, rules, area) -> Vec<Sample>.graph/points.rs: the vertex index, shared runs,fn points(...) -> (Vec<Junction>, Vec<Joint>, Vec<End>, Vec<Crossing>),fn hosts(&mut Junction, &[Way], rules),fn heading(...).graph/crossings.rs: the bucket grid,fn crossings(...), the type table as onematch, the culvert chain, synthetic stretches, the way split, decks.graph/snap.rs:fn snap(graph: &mut WayGraph, rules): end pairs, carriageway snaps, the link crossing test, links.graph/mod.rs: the types,pub fn build(cell: CellKey, input: &CellInput, rules: &Rules) -> WayGraphin the order of stages 1 to 6, andfn check(&WayGraph) -> Vec<Fault>for the invariants G1 to G4.- The debug tool of GP1 (
examples/debug/): a layergraph; a flag--census(the junction census over every fixture cell); a flag--bench(time and size per fixture cell). graph/tests.rs: the unit tests and the fixture tests of Verification.
Files
host/obc-ground-plan/src/graph/mod.rs: create: the types,build,check.host/obc-ground-plan/src/graph/parts.rs: create: stage 1.host/obc-ground-plan/src/graph/curve.rs: create: spans, arc, span metres,along, cell-line roots, samples.host/obc-ground-plan/src/graph/points.rs: create: shared vertices, shared runs, junctions, hosts, joints, ends.host/obc-ground-plan/src/graph/crossings.rs: create: crossings, types, culvert chains, synthetic decks, decks.host/obc-ground-plan/src/graph/snap.rs: create: snapped ends and links.host/obc-ground-plan/src/graph/tests.rs: create: focused tests and the fixture checks.host/obc-ground-plan/src/lib.rs: change:pub mod graph.host/obc-ground-plan/src/sections.rs: change: the new fields.builder/web/src/lib/trailview/terrain/bins.test.ts: change: the waterway test compares only the stamp fields.host/obc-ground-plan/examples/debug/main.rs,draw.rs: change: thegraphlayer,--census,--bench.data/trailview/roads.json,data/trailview/waterways.json: change: the new fields.host/obc-ground-plan/README.md(GP1's): change: the layer and the two flags, one line each.
Verification
- Checks:
obc test -p obc-ground-plan. The unit tests: (1) samples: knot 16 of a span equals the bake'sarc;s(u)andu_atround-trip; a grid point withinMIN_STEP_M / 2of a break goes; a curve through a cell corner gives one sample; a span sampled for two cells that read different tiles gives equal samples apart fromalong_m, with its cell-line crossings exactly on the line; (2) shared runs: a footway on a road's vertices loses the run; two equal-rank parts order by the key of stage 3, the same for both directions of input; (3) hosts: a T withside, a junction with noside(rule b), a road that ends where two paths run on (one host), a path-only junction, a footway that ends on a street vertex, a path across a road at a shared node; (4) snaps, one table-driven test: end at 0.9 m and 0.4 m height (snaps), 1.1 m (end), 0.9 m and 0.6 m height (end), inside the carriageway (snaps), two ends 5 cm apart (link), an end near its own way withinSNAP_REACH_Malong the graph (no snap), a foot withinsnap_mof a junction (attaches), a link across another way (ends stay), a target curve pastSNAP_REACH_M(end); (5) crossings, one table-driven test with one row per line of the type table, plus the deck fallback, a chain longer thanculvert_max_m(Fallback), a 19° road over a road (skip) and a 19° road over a stream (Stacked), and a crossing at a shared vertex that stage 4 does not find again; (6) cleaning: a spike, a repeated vertex, a folded span; (7) runs: a way across a zoom-13 line, read from two tiles, gives one part with no joint at the seam, and each span'salong0_mfrom its owner tile.- The fixture tests in the same run, over every cell of the fixture, all with target 0: G1 samples strictly ordered by (span, u), neighbouring positions differ, no NaN; G2 every junction has 3 or more arms of one group, 1 or 2 hosts, arms sorted; G3 every way end in the work area is an arm of a point; G4 no synthetic stretch holds a point; G5 for each pair of neighbouring cells, the graphs are equal in the band within 30 m of their shared border line (30 m plus the largest R_d, 70 m, is 100 m, inside 191 m); G6 building a cell twice gives equal bytes.
- G5's comparison: samples of each span that both cells sample, matched by the global position of the span's start vertex and
s_m, compare global position,u,z_m,tangent,grade,bank,widen_m,walkandkind; points and crossings, matched by global position, compare type, group,host_rule,implicit,turn_rad,stroke, kind, source and angle, and their arms, matched by the global position of the heading point, comparedir,host,levelandroom_m; synthetic stretches compare the global positions of their ends. Left out: every id and reference,owned, andalong_m(GP1). obc exec cargo clippy -p obc-ground-plan --all-targets -- -D warnings;cargo fmt --all.obc test -p obc-trailview-features: the table validation still passes with the new fields.cd builder/web && npx vitest run src/lib/trailview: the viewer's import ofroads.jsonand the waterway test pass with the new fields.obc test affected --base origin/ground-plan --dry-run, then run the suites it selects.
- Measurements:
nice -n 10 obc exec cargo run --release -p obc-ground-plan --example debug -- --benchon the GTX box: it writes.artifacts/ground-plan/debug/graph-bench.jsonwith, per fixture cell, the build time of stages 1 to 6 (median, p95, max), samples, junctions, crossings, and the heap of the graph. Gates, chosen from the epic's 2 s budget for a jump (about 16 cells, all stages, in WASM at about 3 times native): p95 ≤ 4 ms native per cell, and a graph of ≤ 4 MiB (under 10 % of the 55 MiB worker heap). The pull request gives the table and the census. - Pictures:
obc exec cargo run --release -p obc-ground-plan --example debug -- --places v07,v08,v11,v12,v13,v14,v16,b45-bridge-junction,i07-hairpin,stream-culvert,d-bridge,conn --layers terrain,inputs,cells(before, GP1's layers) and the same with--layers inputs,cells,graph(after). The places are the views ofroad-views-top.json(GP0);stream-culvertandconnselect every place that starts with them. Layergraph: sample polylines by family (dashed on a deck, dotted in a tunnel, a tick at each cell-line break), host arms thick and guest arms thin for 8 m, joints as dots, ends as rings, links in red, crossings as a letter per type, synthetic stretches in orange. The owner looks for: a junction at every real junction and nowhere else; the through road as host and side roads and paths as guests (v07, v11, v12); the paths of v14 and theconn-path-off-*places joined by a link; a level crossing at v16; deck levels and abutments at b45 andd-bridge; a culvert at v13 and thestream-culvert-*places; no false junction alongconn-parallel-way; an unbroken curve round the i07 hairpin. No eye-height pictures: GP2 changes nothing in the viewer.- The census:
obc exec cargo run --release -p obc-ground-plan --example debug -- --censuswrites.artifacts/ground-plan/debug/junctions.json: every owned junction of the fixture by (host classes, guest class) with counts, the host rule per junction, junction pairs closer than 2 m and 10 m, and every counter ofGraphStats.
- The census:
Done when
- The pull request into
ground-planhas merged, with CI green and the review's findings resolved. obc test -p obc-ground-planpasses with G1 to G6 at 0 over the fixture.- The graph-bench table meets both gates, and the census is in the pull request.
- The before and after pictures of every listed place are in the pull request, and the implementer has looked at each one.
roads.jsonandwaterways.jsonhold the new fields, and the step options of the feature layer do not change (obc test -p obc-trailview-featurespasses).
Out of scope
- Faces, offsets, corner fills, mouths, tight bends, the overlay and the minimum width: GP3.
- Sidewalks, kerbs, driveways and zebras: GP4.
- Heights of faces, blends, slopes and walls: GP6.
- Deck plans, parapets, piers, abutment and portal geometry: GP12.
- Rails, platforms and level crossing equipment: GP13; the
railway=level_crossingkind and its tags: GP18. - Water faces, beds and banks, and crossings with water areas (a causeway is the overlay of GP14): GP14.
- Culvert, ford, stone and footbridge geometry: GP15.
- The bake's lift over untagged culverts: GP18.
- The WASM build and its byte check: GP5.
Questions for the owner
Owner decision (2026-11-03): every recommendation in this section is accepted.
- Untagged road, track or railway over water:
culvert_width_m3.0 m, and wider water gets a synthetic bridge. Today only streams up to 1.1 m get a culvert mouth. Recommendation: 3.0 m. A road over wider water with nobridgetag is almost always a bridge that OSM leaves out, and a culvert under it would show a pipe the size of a river.
Implementation deviations (PR #3123)
build(cell, input, rules: &Sections). Points carrynetwork: Network(Way, Rail, Water), notfamily;Partholdsfamily,class,level;Spanholdschord(no alignment, or folded) andlinear_z(water). GP3 readsWay::level, notPart::level: a synthetic deck is aDeckway of aGroundpart.- A crossing at a shared vertex takes each network's arm by (rank, heading point, direction), and is a
Culvertwhen any water arm there is in a tunnel. - A way whose end vertex lies on another way's vertex chord (its ends included) ends on it: no crossing, counter
end_on_other. One exact predicate,obc_ground_plan::graph::end_on_chord, which the bake (GP18) calls too. - The grazing skip applies only to two pieces on one level: the tag rows (a deck) apply at every angle.
- A synthetic stretch that holds an implicit junction falls back too.
- A spike keeps its vertex and its spans become chords (reach row "graph spike"); reach row "graph shared run".
waterways.jsonalso holdssag_plan_m,sag_height_m,curve_turn_max_degandcurve_off_max_mfor water. - Until GP18 merges,
GRAZE_DEGandculvert_width_mexist with GP18's names and values, and the outer half-width isWaySection::outer_m(); after GP18, the graph readsWidths::outer_m. - A span is sampled when the box of its control points meets the work area. Stage 1 keeps of each part only the spans within 2 spans of one that can meet the work area.
- Rail with water at a shared vertex:
Culvert/Ruleup toculvert_width_m, elseStacked/Fallback(no synthetic deck at a shared vertex). - A foot that moves to an end of the target makes a joint (G2: a junction has 3 or more arms). A link's foot arm is a guest and takes no part in the host rules.
- A
Stationsample goes in at every crossing point on both ways, implicit junction, deck end and snap foot; a non-grid sample withinMIN_STEP_M / 2serves instead. - Water in a tunnel with no level has
z_m0: a mark, not a height. The snap row "target curve pastSNAP_REACH_M" cannot occur (half_m≤ 15 m,widen_m≤ 2 m) and has no test. - The fixture checks live in
tests/graph.rs; G5 compares arms in their sorted order over a band of 100 m.
Review notes
- Kept: no tie by feature index: two tiles order their features differently; stage 3 orders by rank, tags and global positions.
- Kept:
Stacked, not a deck that GP12 cuts, for wide water: a cut deck ends over the water.
Activity
timohueser commentedon Nov 3, 2026
Deviation from GP1 (PR #3117), for this sub-issue: the owner rule in
obc_ground_plan::tileis exact and integer. A point is owned by the tile whose half-open square holds it; a segment or a ring edge meets a tile when it meets the tile's closed square (tile::segment_meets,tile::owner,tile::own).CellInput::newsets theownflags this way. Read the flags; do not add a second owner test.timohueser commentedon Nov 3, 2026
Note from GP1's review (PR #3117): the "way slope" chain in
sections.rsis now HALF_MAX_M + widen_m + max(shoulder_m, sidewalk_m) + reach (29 m for primary). When GP2 adds widening beyondwiden_m, extend the chain in the same table.timohueser commentedon Nov 3, 2026
Implementation plan
Order of
graph::build(cell, input, &Sections):parts: owned runs of each read tile part; a run end with an unowned next segment joins the run of another tile that starts with that segment (same kind and tags, first in input order). Family, class (rank), level from the tags. Cleaning until nothing changes: repeated, spikes, folded (the span is evaluated as its chord). Unknown heights split the part; tunnel water keeps its spans.curve: per spanlen_m(the bake's 5-point Simpson), 17 knots,s(u),u(s), cell-line roots (17 knot signs, 40 bisections). Base samples of every span whose control-point box meets the work area: vertices, cell-line breaks, the dyadic grid refined by the sag test.points: shared runs (the later part by rank, tags, the positions past the run ends, loses the run's spans). Way pieces are the runs of kept, sampled spans.crossings: 16 m bucket grid of sample segments, exacti128orientation tests on half-open segments, the type table as onematch, the culvert chain, synthetic stretches with their fallback. Deck stretches split the pieces.snap: end pairs, then carriageway feet, then the link crossing test. Links are parts of one chord span.room_m,next,owned, decks, stats.Invariants: every decision reads only the spans (whole) and points within its R_d (Reach budget); no hash order; ids follow (part, from) and position. A fixture test builds every cell and checks G1 to G6.
Interface notes (reported in the PR):
buildtakes&Sections; a point's group isGroup { Way, Rail, Water }(a junction of a road and a path has no singleFamily);Spanhaschord: bool(no plan, or folded); the fixture checks live intests/graph.rs, because the fixture loader is an integration-test module.timohueser commentedon Nov 3, 2026
Landed in
ground-planwith #3123.timohueser commentedon Nov 4, 2026
Change after merge (owner approved, done in GP3's PR): grazing same-level ways get joints and fold into the host between them. See #3112 for the rule.
Generated by Claude Code
timohueser commentedon Nov 5, 2026
Input evidence from the heights of the one-model design round (#3096). The heights cannot repair these places; the way graph or the bake must give agreeing levels.
1. Junction arms that differ by 2.2 m (b45, bridge end). At the junction at the end of the bridge (46.822732, 8.416617), the graph joins way 34 (line 11, the bridge end, 1061.06 m) with ways 36 and 40 (1058.79 m and 1058.87 m). The fans relate these arms, so the junction face blends them: a steep channel crosses the junction face and the road below the track mouth gets a dark crease. A test switch that steps the arms where they differ by more than 1.0 m (the approved step limit) moves the fault to a seam across the junction face. Neither is correct. Pictures:
/media/timo/OSM1/tmp/ground-plan/one-model/heights/round3/ideas/sheets/b45-rust.png,b45-bridge-junction-crop.png.Request: check the levels at this junction. Arms of one junction must agree within the blend limit (0.5 m) where they meet, or the graph must not join them there.
2. Footways with
tunnel=building_passage. The graph keeps them on the ground (kindtunnel, ground heights), but the bake gives them tunnel heights (a straight line between the chain ends). In the fixture, 7 such footways (279 m) lie 3.4 m to 80.5 m off the plain terrain. The worst is at 46.812619, 8.393003 (80.5 m). The no-room rule of the heights then makes walls of up to 78.8 m along their edges. Data:/media/timo/OSM1/tmp/ground-plan/one-model/heights/input/offsets.json.Request: one rule for GP2 and GP18. A building passage is a ground way with terrain heights, or it is off the ground in both.
3. Two overlapping ways at different heights (conn-track-off-road). At 46.823738, 8.387114, graph ways 39 and 41 overlap along about 20 m. Their heights differ by 1.6 m (1006.5 m and 1008.1 m). They are not at the same level, so the fold rule does not join them, and the heights put a 1.6 m step on the face edge between them. In the far stamp it shows as a stair seam along the road:
/media/timo/OSM1/tmp/ground-plan/one-model/heights/round3/seams/sheets/conn-track-off-road-top-crop.png.Request: check whether the bake must make overlapping ways agree, so that the fold rule applies.
Generated by Claude Code
timohueser commentedon Nov 5, 2026
Known limit (owner decision, PR #3138): at b45 the bridge deck stands 1.3 m above a path junction 7 m away. The path ramp rule leaves a short side that meets another junction within 15 m without a ramp, so that a ramp never moves its through road. That short path drops 2.3 m in 4 m and ends 0.37 m under the terrain; the heights draw it with their cut slope. If more such places show up, the fix is ramp rows weaker than the through road's own rows (a new weight).
Generated by Claude Code
timohueser commentedon Nov 5, 2026
Update to the known limit above (comment 6659678204): it is resolved in PR #3138 (commit c16c774). The ramps are now solved last, with every other height fixed, so a ramp bends only its own side and never moves the road or the junction at its ends. Short sides keep their ramp. At b45 the path now runs down from J2 over 7 m to the path junction: 1058.70 m at 4 m and 1057.68 m at 7 m, against terrain of 1058.49 m and 1057.74 m. It no longer falls 2.3 m in 4 m to under the terrain. Picture:
/media/timo/OSM1/tmp/ground-plan/inputs/b45/j2-ramp-last.png.Generated by Claude Code
timohueser commentedon Nov 5, 2026
PR #3138 is merged into
ground-plan. It brings building passages as ground ways, the b45 approach grade, overlapping ways of one layer sharing a surface (with the terrain guard), and path ramps (at most 25 % within 15 m of a road junction, centred on the terrain, solved last so a ramp never moves a road). The fixture is updated and the census gates are raised, with the reason. Reviews: comments 6658706747 and 6659920294 (delta). The CI is green after #3145.Generated by Claude Code