Skip to content

TrailView ground plan GP2: the way graph: curves, junctions, hosts, snapped ends, levels and crossings #3098

Closed

Description

@timohueser

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_M is 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_m can jump by up to 10 cm where the owner tile changes.
  • along_code holds 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).
  • word holds widen, walk and side per 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, side marks 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_M 8 m, LOOK_COS −0.3, FOLD_COS 0.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 side bits (specs/trailview-features.md:289-298, data/trailview/roads.json order). A joint must ignore side.
  • A culvert is a chain of waterway parts tagged tunnel=culvert or tunnel=yes, at most culvert_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 its bridge tag, 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 at terrain/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 different layer that 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); bridge values no, boardwalk and low_water_crossing lie on the ground (builder/web/src/lib/trailview/terrain/bins.ts:65). A via_ferrata has no heights (specs/trailview-features.md:128).
  • kinds.json keeps junction, oneway, layer, ford and bridge on main-road and road; path keeps bridge, layer and ford but no junction; tunnel keeps tunnel and layer but no bridge or ford; river and stream keep width and tunnel (data/trailview/kinds.json:11-50).
  • The step options take only the fields of CLASS_FIELDS and WATERWAY_FIELDS from 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.json is the junction rank (GP1's preserve_order keeps it).
  • terrain/bins.test.ts:505 compares a waterways.json row, 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-road and road, highway=track included), path (path classes), rail (railway tracks), water (river, canal, stream). The kind tunnel and gallery take the family of their highway or railway.
  • 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_ferrata last); for water, the order of waterways.json (river, canal, stream). A lower rank is a better class.
  • Station: a place on a part's curve: (part, span, u), u in [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 length L.
  • 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 with own per segment, heights and its Alignment (along_m, backward, and per vertex tangent, grade, bank, widen, side, walk).
  • Sections::way and Sections::water: the class or kind, rank, half_m, shoulder_m, sidewalk_m. GP2 reads outer_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's Widths::outer_m, and WaterSection::half_m serves 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

  1. 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).
  2. 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 its railway, or rack when rack is not no; another way's class is its highway; a class that the table lacks takes road (kinds main-road, road, tunnel, gallery) or path (kind path). Water takes its waterway kind.
  3. Level of the part: Tunnel for kind tunnel with tunnel other than building_passage, and for water with a tunnel tag other than no; Deck where the deck tag exists; else Ground (galleries, building passages, boardwalks and low_water_crossing included). A bridge shorter than 8 m that the bake keeps as a ground road has no deck: it is Ground (stage 4).
  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. Its side bits 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 than SPIKE_DEG stays, 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) ≤ 0 or dot(t1, chord) ≤ 0) is evaluated as its chord with linear heights. It is a kink, not a loop. The vertex data stays.
  5. Unknown heights: a span with an unknown z at 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.
  6. A part with no alignment (no plan) uses its chords with linear heights and tangent from its chords; its along_m runs from 0 at its first vertex in each tile.

Stage 2: curves and samples

  • Span: between vertices p0, p1 (frame units, f64 relative to p0), unit tangents t0, t1, chord length c in 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's libm scale). bank and widen are linear in u. walk is the start vertex's.
  • Arc: L is the bake's arc of the span (one 5-point Simpson, with the scale at the chord's middle), so the Ls sum to the format's stroke metres. Each span holds knots: [f64; 17]: the 5-point Simpson of each sixteenth of u, summed and then scaled so that knot 16 equals L. Between knots, s is linear in u. So s(u) is strictly increasing, its inverse is exact, and both read only the span.
  • along_m: along0_m + sign × s, with along0_m the span's stroke metres at its start vertex in the tile that owns it (that tile part's along_m plus the Ls of its spans before, times sign), and sign −1 when backward. 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 of x(u) − X at the 17 knots, then ROOT_STEPS bisection steps in each interval with a sign change. The sample takes x = X exactly and y by 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 l is s = k × BASE_STEP_M / 2^l, l from 0 to 7 (MIN_STEP_M). The first samples are the breaks and the level-0 grid points. A grid point within MIN_STEP_M / 2 of a break goes. For each interval between neighbouring samples, compute dev_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) and dev_height = |z(mid) − (z0 + z1)/2|. If dev_plan > sag_plan_m or dev_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 than curve_turn_max_deg (60°) is a corner: its two spans are chords. A span whose curve would leave its chord by more than curve_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 with sag_plan_m and sag_height_m of waterways.json (0.05 m, 0.03 m) and outer_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) − p0 in f64 frame units and round half away from zero (libm). Its cell position is the global position less the cell's origin, exact in i32. So two cells give one sample the same global position. Neighbouring samples lie at least MIN_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 (f64 unless 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 a Station sample 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

  1. Index every vertex (and every water vertex) in the work area by its exact global position.
  2. 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).
  3. 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, or Culvert when 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 (counter end_on_other).
  4. Heading of an arm: the unit vector from the point to the curve at HEADING_M along 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 by dir.
  5. Hosts of a junction:
    • (a) Way or rail group: if exactly two non-path arms have no side bit for their direction (SIDE_BACK for dir −1, SIDE_ON for +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.
  6. Joint: two arms; turn_rad = π − angle between their headings; stroke when the curve tangents at the point differ by less than STROKE_DEG. A joint has no hosts and ignores side.
  7. Level transitions need no type: each arm carries its way's level. A point whose arms have Ground and Deck is an abutment for GP12; Ground and Tunnel a portal.

Stage 4: crossings without a shared vertex

  1. 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 i128 orientation 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, counter end_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, within PLACE_M (16 m), else at each curve's foot of the chords' crossing; the point is that crossing, rounded. The angle is the chords'.
  2. Skip: a pair with a Tunnel piece, except water in a tunnel under a ground way; water with water (counter water_water); a pair of the way and rail groups (road, path or rail with road, path or rail) that crosses at an angle under GRAZE_DEG (counter grazing: 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.
  3. Type, first rule that matches (Δz is the upper minus the lower height at the point, w the water's width from width, else width_m of 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.

  1. Candidates: the ends of road and path pieces in the work area. Rail, water and tunnel ends never snap.
  2. End to end: two candidate ends that lie within snap_m (the smaller of the two classes) of each other, within snap_height_m in height, and on the same level, pair when each is the other's nearest candidate (ties by the lower global position). A link piece 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 (counter links_end).
  3. 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 Deck end), that E does not reach along the graph within SNAP_REACH_M, whose curve lies within SNAP_REACH_M of E and whose carriageway edge lies within snap_m of E: dist(E, curve) − (half_m + widen(u_f)) ≤ snap_m, where u_f is 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 (counter snap_far; only a width tag past HALF_MAX_M gives it). The height test: |z_E − (z(u_f) + bank(u_f) × s)| ≤ snap_height_m, s the 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.
  4. The junction point: the foot F = p(u_f), rounded. If a point of stage 3 or 4 lies on the target within snap_m along 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. A link piece runs straight from E to F, heights linear, along running on from E. E becomes a joint of the way and its link, and its kink is real: GP3's band union covers it (counter links_carriageway).
  5. 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 most SNAP_REACH_M long, so the test stays within the snap's R_d.
  6. An end with no target stays an End; GP3 gives it its end shape (counter ends).

Stage 6: arms and stats

  • room_m of 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 most ROOM_MAX_M. next names that point.
  • owned on each point and crossing: its position lies in the cell square (half-open). The census and placement count only owned elements.
  • GraphStats holds every counter above, plus junctions, joints, implicit_junctions, crossings per (type, source), and samples.

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's Way, with no OSM id (the tiles hold none): its curve is its part's spans from from to to, 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 with turn_rad, ends, links, crossings (LevelCrossing and Ford faces), 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 walk and the links; it defines driveways from the tags.
  • GP6 takes z_m, grade, bank and widen_m on the samples, and the link heights.
  • GP12 takes decks, abutment and portal points, Deck crossings with what lies under them, and synthetic stretches (no piers).
  • GP13 takes LevelCrossing; GP15 takes Culvert, Ford, PipeInStones, SteppingStones and Footbridge. A tagged Culvert or Ford can have θ under GRAZE_DEG; a Fallback culvert is a buried stream (its chain is longer than culvert_max_m).
  • GP16 and GP17 take s_m and along_m (Reach budget).
  • GP18 reads culvert_width_m for 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: side gives 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_m of 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 LevelCrossing at 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 Deck end 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 bridge tag): an untagged ground road. Over water up to culvert_width_m it is a Culvert, as the bake's cover says; over wider water a synthetic deck at the road's heights, or Stacked when 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, so Stacked with Fallback.
  • 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

  1. host/obc-ground-plan/src/sections.rs (GP1): read the new fields of both tables, with their validation. Widths::outer_m, GRAZE_DEG and culvert_width_m are GP18's (same wave): if GP18 has not merged, GP2 adds them in GP18's names; the second pull request keeps one.
  2. 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 only tol, reach, least, cut, fill with PROFILES (GP2's change).
  3. graph/parts.rs: fn parts(input: &CellInput, rules, area) -> (Vec<Part>, Stats): runs and their joins, family, class, level, cleaning, unknown heights.
  4. graph/curve.rs: Span with len_m and knots; 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>.
  5. 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(...).
  6. graph/crossings.rs: the bucket grid, fn crossings(...), the type table as one match, the culvert chain, synthetic stretches, the way split, decks.
  7. graph/snap.rs: fn snap(graph: &mut WayGraph, rules): end pairs, carriageway snaps, the link crossing test, links.
  8. graph/mod.rs: the types, pub fn build(cell: CellKey, input: &CellInput, rules: &Rules) -> WayGraph in the order of stages 1 to 6, and fn check(&WayGraph) -> Vec<Fault> for the invariants G1 to G4.
  9. The debug tool of GP1 (examples/debug/): a layer graph; a flag --census (the junction census over every fixture cell); a flag --bench (time and size per fixture cell).
  10. 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: the graph layer, --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's arc; s(u) and u_at round-trip; a grid point within MIN_STEP_M / 2 of 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 from along_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 with side, a junction with no side (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 within SNAP_REACH_M along the graph (no snap), a foot within snap_m of a junction (attaches), a link across another way (ends stay), a target curve past SNAP_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 than culvert_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's along0_m from 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, walk and kind; 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, compare dir, host, level and room_m; synthetic stretches compare the global positions of their ends. Left out: every id and reference, owned, and along_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 of roads.json and 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 -- --bench on the GTX box: it writes .artifacts/ground-plan/debug/graph-bench.json with, 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 of road-views-top.json (GP0); stream-culvert and conn select every place that starts with them. Layer graph: 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 the conn-path-off-* places joined by a link; a level crossing at v16; deck levels and abutments at b45 and d-bridge; a culvert at v13 and the stream-culvert-* places; no false junction along conn-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 -- --census writes .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 of GraphStats.

Done when

  • The pull request into ground-plan has merged, with CI green and the review's findings resolved.
  • obc test -p obc-ground-plan passes 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.json and waterways.json hold the new fields, and the step options of the feature layer do not change (obc test -p obc-trailview-features passes).

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_crossing kind 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.

  1. Untagged road, track or railway over water: culvert_width_m 3.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 no bridge tag 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 carry network: Network (Way, Rail, Water), not family; Part holds family, class, level; Span holds chord (no alignment, or folded) and linear_z (water). GP3 reads Way::level, not Part::level: a synthetic deck is a Deck way of a Ground part.
  • A crossing at a shared vertex takes each network's arm by (rank, heading point, direction), and is a Culvert when 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.json also holds sag_plan_m, sag_height_m, curve_turn_max_deg and curve_off_max_m for water.
  • Until GP18 merges, GRAZE_DEG and culvert_width_m exist with GP18's names and values, and the outer half-width is WaySection::outer_m(); after GP18, the graph reads Widths::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/Rule up to culvert_width_m, else Stacked/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 Station sample goes in at every crossing point on both ways, implicit junction, deck end and snap foot; a non-grid sample within MIN_STEP_M / 2 serves instead.
  • Water in a tunnel with no level has z_m 0: a mark, not a height. The snap row "target curve past SNAP_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

  1. timohueser commented on Nov 3, 2026

    @timohueser
    OwnerAuthor

    Deviation from GP1 (PR #3117), for this sub-issue: the owner rule in obc_ground_plan::tile is 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::new sets the own flags this way. Read the flags; do not add a second owner test.

  2. timohueser commented on Nov 3, 2026

    @timohueser
    OwnerAuthor

    Note from GP1's review (PR #3117): the "way slope" chain in sections.rs is now HALF_MAX_M + widen_m + max(shoulder_m, sidewalk_m) + reach (29 m for primary). When GP2 adds widening beyond widen_m, extend the chain in the same table.

  3. timohueser commented on Nov 3, 2026

    @timohueser
    OwnerAuthor

    Implementation plan

    Order of graph::build(cell, input, &Sections):

    1. 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.
    2. curve: per span len_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.
    3. 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.
    4. crossings: 16 m bucket grid of sample segments, exact i128 orientation tests on half-open segments, the type table as one match, the culvert chain, synthetic stretches with their fallback. Deck stretches split the pieces.
    5. snap: end pairs, then carriageway feet, then the link crossing test. Links are parts of one chord span.
    6. Final assembly: every point comes from one list of anchors (vertex occurrences, implicit junctions, snap feet, piece ends) on the final pieces. Station samples go in with the drop rule. Hosts, headings, 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): build takes &Sections; a point's group is Group { Way, Rail, Water } (a junction of a road and a path has no single Family); Span has chord: bool (no plan, or folded); the fixture checks live in tests/graph.rs, because the fixture loader is an integration-test module.

  4. timohueser commented on Nov 3, 2026

    @timohueser
    OwnerAuthor

    Landed in ground-plan with #3123.

  5. timohueser commented on Nov 4, 2026

    @timohueser
    OwnerAuthor

    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

  6. timohueser commented on Nov 5, 2026

    @timohueser
    OwnerAuthor

    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 (kind tunnel, 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

  7. timohueser commented on Nov 5, 2026

    @timohueser
    OwnerAuthor

    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

  8. timohueser commented on Nov 5, 2026

    @timohueser
    OwnerAuthor

    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

  9. timohueser commented on Nov 5, 2026

    @timohueser
    OwnerAuthor

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions