Repository navigation
Description
Status: approved
Part of #3096. Pull requests into ground-plan by slice (section 10); slice 1 is #3177. GP15 (#3108) builds its crossings in these slices.
Depends on: #3114 (GP10), #3104 (GP11). Slice 1 starts after the leg split (#3165) and the stop mouths (#3171) merge, because all three change faces, records and heights.
Rewritten to the approved water design: proposal revision 2 and its adversarial review (/media/timo/OSM1/tmp/ground-plan/water/PROPOSAL.md, REVIEW.md, pictures listed in INDEX.md), and the owner's ten decisions in this issue's comments. The previous body (bed faces, a fifth index range, the handover of today's water) is in this issue's edit history. Section "Changed from the previous body" lists the differences.
TL;DR
Goal: Behind the switch and as far as the records reach, every stream, river, canal, lake, pond, river area and sea polygon is part of the one model: a water face at its water level W, banks from the cones of its records, and an opaque look that shows the depth. There is no sawtooth, stair bite, torn end, gap, lip or fight, and every cell gives the same result.
Problem: The plan has no water. in_level drops the family Water (host/obc-ground-plan/src/faces/mod.rs:168-172), so no face and no record holds water. With ground=plan, develop's water draws unchanged: ribbons drape on the page heights, lakes are meshes that hide where the ground stands over them, and the stamp keeps the river floor and the lake bed. The mesh corners of way and slope labels read the plain terrain, but the page and the ribbon read the stamped floor. The results are sawtooth and ragged river edges, stair bites and torn ends of streams, culvert mouth blocks on flat meadow, and a lake shore that moves by metres between the two paths.
Decision: A water body is records, as a way is. Its face is the water's surface at W, its banks are its cones, and its bed is only a formula.
- Line water is a stroke with a line record. A painter reads only the records of its host's kind, water or not, so water never blends with a way; water reaches a way only through the cones.
- Standing water is a polygon. Each shore ring is a line record at W with half-width 0, and the face takes the new height rule
Level. A river area is a blend over the presence of its lines. - The bank is a band layer. Its cones get two line fields:
riseF andcrestb. - The mesh draws the water face at W: one drawn surface, no bed triangles. Level water faces take an 8 m grid with the depth per corner.
- From slice 2, the far look B paints water from the same records, and water narrower than two texels cuts no channel.
- The look is opaque:
water_colourwith a depth tint. A step whose upper side is water draws as water with foam.
Rejected: - The previous body's surface: bed triangles in no drawn range and a fifth water range. Both draw one layer, but this one adds triangles and a range builder for a bed that never shows.
- Water in the pages near the eye: the waterline then lies on the 1.63 m grid and is jagged.
- Develop's water past the mesh with a dither handover: two waters meet at the range.
- The level-18 grid inside lakes: about three times the corners at lake-shore, and a lake face with only shore vertices has depth 0 at every corner, so the depth tint fails.
- Alpha over a drawn bed: a blend and bed triangles. Reflection passes: too much cost for the phone.
- Water that agrees with ways by the return grade: a road then tilts a stream, and a ford's wet face takes the road's height (depth 0). A guard in
agree()alone does not stop it: the painter's keep-off factors still mix water into a way's region and change a way's partners near water. - "Fans relate only lines of one family":
graph::Familyalso parts roads from paths. GP2's junctions are per network, so no fan relates water and a way anyway. - The previous river-area fade to the terrain over R/2 … R (5–10 m): it is longer than
MARGIN_M(3 m), and only belowregion_fade_mdo two cells give equal border bits. - A water level by inverse distance weights over all water lines: not exact on a line, and it mixes parallel channels of different levels.
- A lift of the water over the ground, and ribbons near the eye: water and bank share the waterline.
Systems: trailview
Contracts: none (specs/trailview-features.mdandfeatures_formatstay; the new rule fields are not options of the feature step)
Size: L, in five slices of size M.
Facts
Line numbers at the design head of ground-plan; the leg split and the stop mouths can shift them.
- Crate. GP2 has water: parts with a level per vertex, junctions and typed crossings (
graph/points.rs:605-613,graph/mod.rs:255). No face or record has water (faces/mod.rs:168-172). - Records.
LINEis 16 words; all 12 words of aLABELare in use (faces/records/mod.rs).HeightRulehas no constant level (faces/types.rs:36). Cones exist only per line record (slope(),faces/heights/mod.rs:1047).agree()(:927) relates two records when dz ≤ret · feather / blend_steep / 2or a fan relates them;paved_as(:940) then weighs the other way into the host's height.present()(:688) is O(n³) in the records at a point, withSLOTS10 records per point.MARGIN_Mis 3 m. The fixture checkslots_fullis 0 today on the water cells, without water records. - Viewer,
ground=plan.water.ts,water-mesh.ts,water.wgslandculverts.tsare develop's. Ribbons drape on the page heights (terrain/water.wgsl:84). Lakes are meshes at their level, hidden where the ground stands over them (water.wgsl:2). The stamp keeps the river floor and the lake bed, and the far look takes them as T (terrain/stamp.wgsl:5,:182). Streams are not stamped (terrain/bins.ts:966).model_heightclamps the records' height to the stamp'ss.loands.hioff the paved area (stamp.wgsl:182-188). The mesh corners of way and slope labels read the plain terrain; the corners of terrain labels read the stamped page (plan/corners.wgsl:69-80). water_colourshades from the view direction, the sun, small waves andfall, the slope of the bed along the flow, which gives foam from 0.4 (water.wgsl:53-56,:169-190).- Bake (GP18). Each river and stream vertex not in a tunnel has a level that never rises downstream. The level lies at least
freeboard_munder the lower bank terrain at ±(w/2 +bank_m), except where the 50 m bank window has too few known samples or a junction's skip zone holds the sample. A river never goes under a lake that it flows into. Lake and pond levels:specs/trailview-features.md:445-449. A vertex that a road shares with a stream lies 0.2 m under the water (the ford sink); a road over a culvert lies at leastcover_mover the water. - Water samples are Hermite curves through the vertices (GP2), with levels linear along the arc; a corner over
curve_turn_max_degor a curve off its chord by more thancurve_off_max_mgives a straight chord. data/trailview/waterways.jsonhas the rowsriver,canal,streamwithwidth_m, the stamp fields (tol,reach15,least,cut0.5,fill0.5), the culvert and crossing fields, the curve fields, andfreeboard_m0.8 / 0.8 / 0.4 andbank_m2 / 2 / 0.6 (GP18; read them, do not add them again).terrain/bins.test.ts:503-506compares every non-bake field of a row with its stamp profile.- Water kinds:
river(waterway river, canal),stream,river-area,lake(withwater,landuse,ele),coastline(inactive),dam,dam-point,waterfall(data/trailview/kinds.json:74-141). - The owner approved for TrailView: ways and water that sit in the terrain near the eye #3031: stream bed 0.3 m, bank lift 0.4 m, bank slope 1.2; river and canal 1.0 m, 0.8 m, 0.6 (TrailView C2: streams and rivers with a water surface, a bed and banks #3046); a shore band of beach, gravel and rock on natural lakes, none on basins (TrailView C4: a band of shore along lakes and ponds #3048).
- Fixture inputs. No waterway has a
widthtag, so every stream is 1 m wide and every river 10 m. There is no sea.
Design
1. Words
- Water body: one source of water: the parts of one river, canal or stream line, one lake or pond, one river area, or the sea of the cell.
- Water face: a face whose label has the surface
Water. It is drawn at W. - Water level W(p): the height of the water's surface at p.
- Waterline: an edge between a water face and a face that is not water.
- Bank: the band layer from the waterline to the bank top, surface
Bank. - Rise F, crest b: two line fields of a water record: F =
freeboard_m, b =bank_m. Both are 0 for ways. - Bed: W − min(D, s · δ), with D =
depth_m, s =bank_slopeand δ the distance to the waterline. Nothing draws it; the look and the objects read it. - Shore line: a line record on a shore ring of standing water, at W, with half-width 0.
2. Rule tables
data/trailview/waterways.json gains four fields in every row. None is a step option, so the bake does not change. bins.test.ts compares only the five stamp fields with PROFILES.
| Field | Unit | Stream / river / canal | Why |
|---|---|---|---|
depth_m |
m | 0.3 / 1.0 / 1.0 | The bed's greatest depth under W (#3046). |
bank_slope |
m/m | 1.2 / 0.6 / 0.6 | The cut slope of the bank from the waterline, and the fall of the bed's sides (#3046). |
bank_reach_m |
m | 4 / 15 / 15 | The reach of the bank's cones. River and canal: the row's reach, so near and far banks end at the same distance. |
bank_steepest |
m/m | 2.0 / 1.5 / 1.5 | The steepest cut and fill of the bank (the cones' cut_max, fill_max). Steeper is a wall. |
A water line record takes: cut = bank_slope, fill = the row's fill, both maxima = bank_steepest, reach = bank_reach_m, rise = freeboard_m, crest = bank_m, return grade 0, the WATER line flag, and a class word past every way class (classes.len() + the row's rank), so the painter and the candidate key put water after every way.
For the faces, sections.way() gives a water line a section: group water; half-width h; a bank width field; no shoulder and no verge; a bank band of F / bank_slope; slope reach bank_reach_m; leg_wall false (water never splits into legs); corner_radius_m and inner_radius_m 0 (a confluence keeps its sharp wedge, a bend gets no fillet). GP3's tapers run as for ways. plan.json gets a water/water pair: mouth join, blend true.
data/trailview/shores.json (create, slice 2) holds standing water with the same fields and fill. A lake takes the row of its water tag where the table has one, else lake; a river area takes river-area; the sea takes sea.
| Row | depth_m | bank_slope | freeboard_m | bank_m | bank_reach_m | bank_steepest | fill | Why |
|---|---|---|---|---|---|---|---|---|
lake |
4.0 | 0.5 | 0.3 | 1.0 | 15 | 1.5 | 0.5 | Today's BED_DEPTH and SHORE_SLOPE; a lake's level is a shore quantile, so a low freeboard. |
pond |
1.0 | 0.5 | 0.2 | 0.6 | 6 | 1.5 | 0.5 | A pond takes the lowest shore, so its shore is near its level. |
wastewater |
3.0 | 3.0 | 0.5 | 0.5 | 6 | 3.0 | 1.0 | A built basin has steep sides. |
drain |
1.5 | 3.0 | 0.5 | 0.5 | 6 | 3.0 | 1.0 | A built channel, as a basin. |
river-area |
1.0 | 0.6 | 0.8 | 2.0 | 15 | 1.5 | 0.5 | A river that OSM maps as a polygon. |
sea |
4.0 | 0.4 | 1.0 | 4.0 | 15 | 2.0 | 0.5 | A beach rises gently; land under 1 m beside the sea gets a dyke. |
The reader (sections.rs) rejects a missing field, a negative value, bank_m < freeboard_m / bank_slope, and depth_m / bank_slope > BED_REACH_M (10 m: the corners read δ no farther). Every water record's reach is at most 15 m, the reach of waterways.json today.
3. Faces and records (GP3, GP3R)
- Line water.
in_levelletsWaterin at level 0 only (an aqueduct on a deck stays out). Each part is a stroke of half-width h (thewidthtag, else the row'swidth_m, at mostHALF_MAX_M), with round joins and free ends, and a butt end where it meets a tunnel part. A tunnel part gives no face; GP15 builds the zone and the mouth there. Strokes, points and turns of water take the water label: surfaceWater, rankwater_line, rule Owner, material = the water line; a confluence's region takes surfaceWaterand rule Blend. Each water line has a line record with z = W at every sample and the fields of section 2.LINEgrows by two words (rise, crest) andMAGICchanges.HRecdoes not grow:h_conesreads rise and crest from the line words, and a high bit ofHRec.rankmarks a water record. - Standing water. Each polygon (outer ring and holes) is a candidate by the even-odd rule. The cut polygons of all read tiles with the same row and level join by a nonzero union, and each connected part is one body. Each shore ring is also a line record: z = W at every sample, half-width 0, reach =
bank_reach_mof its row. So the banks come from the line machinery. The face's label takes the height ruleLevel: the level of its material line (a shore line of the body), read once, with no presence test. No label word is added, and the middle of a large lake needs no line in its bin. A body with no level gives no face (counterno_level). - River area. A blend face over the presence of the water lines in it: W = Σ β z / Σ β, with β the presence by the feather (= the line's reach), faded to T by 1 − max β. The fade reads only line distances, which every cell computes alike from global samples, so it keeps the border bits. Its outline is a line record whose samples hold that W. The bands of line water win over it.
- Bank band layer. A fifth band layer (
bands: [f64; 5],band_labelswithBank; one constant holds the layer count), from the waterline to the bank top at F /bank_slope, like shoulder and verge; 0 wide on a way. For water, the slope layer ends at the waterline +bank_reach_m. Its outer edge is a face edge, so the mesh holds the bank top and the bank does not alias on the grid. - Ranks (
plan.json,faces/rules.rs):wet(GP15's ford wet face),carriageway,platform,rail_bed,shoulder_paved, thensea,lake,water_line,river_area, thenshoulder,verge,zone(GP15),bank,slope,terrain. Ties: inlakethe higher level first, then the row's order inshores.json; inwater_lineGP2's order of parts. Both read only local data. Until slice 2, no water enters the far level of the records. - Surfaces and rules (
faces/types.rs): the surfacesWater,BankandZone(GP15's zone marker), the height ruleLevel. - GP15's labels. A zone: surface
Zone, rule Slope, crossing wordu32::MAX, owner and material from its crossing's way W (a joined zone: the first crossing in GP2's order; a chain-end zone: its chain's crossing withinCHAIN_READ_M, else owner Terrain and no material). Where a zone covers a point, a candidate whose label's material line has theWATERflag does not count, in all three readers (the slice'sdecide, the records'decide,m_decide). A ford's wet face: surfaceWater, owner Way(W), rule Owner, material = S, crossing wordu32::MAX, rankwet, cut to W's own layers. A junction region's relabel leaves both as they are. Until slice 2, zones and wet faces stay out of the far records, as water does. Details: TrailView ground plan GP14 slice 1: line water (records, level, banks, culvert zones) #3177.
4. Heights (GP6; Rust and WGSL alike)
- W on a line: the surface of a water line has bank 0: flat across, falling along its samples.
- No blend across kinds. In
paved_as(andh_paved_as), a painter reads only the records whoseWATERflag equals its host's (for a region, its arms'). So W is exact in a water face, and a way's paved field is the same with or without water. Water reaches a way only through the cones. Water's return grade is 0;agree()gets a guard: a wall of 0 gives no agreement (no 0/0), so only a fan or the face's arms relate two water records. At a confluence the junction region relates its arms (the face's arm bits) and blends them, the same rule as for ways: a fall there is a ramp in the region. Water's radii are 0, so no water fan forms. Two water lines that meet with no shared vertex meet in a named step. Level: W of the label's material line, a constant.- Banks: today's cones, with rise F and crest b, at distance d from the waterline:
- cut U = W + c · d; fill L = W + F − f · max(0, d − b); the ground is
min(U, max(T, L)); - in
cones(),fitmeasures the fill from base + F, and the crest offsets d; - in
slope(), the toe gapcut − fillis clamped at 0, so the waterline (a face edge) takes a plain crease; - the arm cones of
region()and the NoRoom and CutWins rules ofstep()use base + F; - for ways F = b = 0, so their heights do not change.
On high ground the bank rises atbank_slopeto the terrain. On flat ground it rises to W + F, stays there to b, and falls at the fill slope: a low dyke, only where GP18 misses its freeboard.
- cut U = W + c · d; fill L = W + F − f · max(0, d − b); the ground is
- Bed: W − min(D, s · δ), capped by
BED_REACH_M. It is not drawn. - One T (slice 2): where records hold water, the stamp drops its river floor and lake bed, and
model_heightdoes not clamp tos.loands.hithere. In slice 1 no water enters the far records, and the stamp keeps its river floor. - Steps: a waterline against a way face is a step edge by the existing rules (the way higher: the water meets the wall's foot; the way lower: see the ford's wet rule, section 8). Water on a wall is valid and counted. Two water faces whose W differ meet in a step on their shared edge.
5. Mesh and draw (GP7-C, GP9)
WaterandBankare sharp surfaces (mesh/params.rs:sharpby surface), so R grows about them. The water face is drawn at W: one layer.- Level water faces (
Level) take an 8 m grid (every fifth level-18 point), a per-surface entry next tol_max_m. Each corner carries δ. Line water keeps the level-18 grid. - Step look under water: a step slot whose upper side has a water label draws in the water look, with foam: a fall between two water lines with no shared vertex, a lake mismatch, a ford edge, a headwall's water side.
- Develop's water skips a level-18 node where pieces draw. In the fade band it stays until slice 2.
6. Far look and readers (GP8, GP10)
- From slice 2, water enters the far records, and look B paints water labels at the mask levels; the page holds W there. Develop's water draws only past the records' radius. This replaces the epic's "far water stays as today", after slice 2 measures the far frame and the jump at the records' radius.
- Water narrower than two texels cuts no channel (the heights take its bank top) and paints by its covered share (distance field), so far streams show no dotted trenches.
- TAKEN in water labels keeps plants off water as far as the records reach.
7. Look (GP11)
- Opaque, with no blend and no depth read:
water_colourplus a depth tint, mix(bed colour, body, 1 − e^(−k · depth)). - The depth is analytic: from
acrossandhalfon a line, from δ per corner on a level face. - The bed colour comes from the label: gravel under streams, the way's material at a ford.
- Foam by the fall of W along the line, and on every step whose upper side is water.
- No reflection passes (phone).
8. Crossings (GP15, #3108)
GP2 gives the type. GP15's four constructions build the faces:
| Type | Construction | Heights and look | Objects (after GP13) |
|---|---|---|---|
| culvert, pipe in stones | zone scan: zone K over the water to the fill's mouth line | no water cones in K; the step K / water or bank is Step::Headwall, a wall at any height |
pipes, mouth stones |
| ford | wet contour: the part of the way under W, with a water label | W; depth W − way, the way's material as bed colour | none |
| stepping stones | region J: water over the path | W | stones |
| deck, footbridge | GP12's deck with the hump | the deck rule | railing |
- Without zones, the water's cut wins over a road's fill (
min(U_water, …)) and cuts a trench up to the carriageway. Zones and wet faces need no GP13, so they come in slice 1. A headwall stands without a pipe until the objects come. pipe_width_mis 1.0 m: an untagged path over a stream up to 1 m gets a pipe in stones.- A way below W at a shore floods by the ford's wet rule (slice 2 measures it first).
9. Edge cases
- No water in a cell: no water face; the heights of the ways are bit-equal to before. With water, a way's paved heights are bit-equal too (the painter by kind).
- A cell inside a lake or the sea: one level face on the 8 m grid, no bank.
- Stream narrower than GP3's minimum face width: its stroke takes the minimum width.
widthover 30 m on a line: h is capped at 15 m (countercapped_width); a wide river needs its river area.- Unknown level: a span or a body without a level stays terrain (
no_height,no_level). - Water in a tunnel: the stroke ends butt; GP15's zone and headwall close it.
- Untagged crossing of a road and a stream: the paved core wins; GP15's zone takes the fill.
- Bridge over water: the deck is at its own level; the water face runs on under it.
- Stream along a road: the paved core wins where they overlap; between them the cones decide; a wall stands where they conflict. The road does not tilt the stream.
- Two water lines that cross without a shared vertex: the overlay gives the overlap to the better rank; a step where the levels differ.
- Confluence: the junction region relates its arms and blends them; a fall is a ramp in the region.
- River into a lake: the lake wins; the bake pins the levels, so no step in practice.
- Lake with islands, concave or self-touching rings, duplicate lakes: even-odd per polygon; two lakes are two bodies, the higher level wins, with a step on its edge.
- A ragged shore can fill
QUADS(4); the slot scan of slice 2 shows it. - Causeway through a lake: the way's faces cut the water; the edge is a step (a quay wall).
- Water at or over the terrain (where GP18 misses its freeboard): the bank's fill builds a dyke of F; where that has no room, the water stands on a wall (counted).
- Steep water: a steep surface with foam; the cones work as on a road.
- Past the records' radius: develop's water; GP8's fade at that radius covers water.
dam-area, dams, weirs, waterfalls: not built now (epic, section 12).intermittentandseasonal: drawn as water, as today.
10. Slices
One pull request each into ground-plan, with a develop | before | after slider page of each view, at the eye and from above.
| # | Slice | It proves | Views |
|---|---|---|---|
| 1 | Two stacked pull requests that merge together (#3177; B targets A's branch, B merges into A, then A into ground-plan once). A, line water: records, the painter rule by kind, banks with rise and crest and the bank layer, water and bank faces in the mesh, the step look under water, develop's ribbons off where pieces draw; water stays out of the far records. B, GP15 without objects: the ford retype, culvert zones with Step::Headwall, ford wet faces, pipe_width_m 1.0 |
no sawtooth, stair bites or torn ends; a bank under every stream; no trench through a road fill; far pages and standing water unchanged | i08-river, stream-parallel-road(-top), v02-stream-path-shrubs(-top), mouth-stream, v13-culverts(-top), stream-culvert-main-road(-top), stream-culvert-track(-top), stream-main-road-eye, a ford and a confluence; unchanged: streams-under-far, stream-bridge-far, mouth-stream-far, river-area-track, lake-shore(-top) |
| 2 | Standing water: shore lines, Level, shores.json, the 8 m grid, river areas; water in the far records and the stamp (one T: the river floor off, no clamp) with the sub-texel rule; the far look B paints water; develop's water only past the records; the shore flood; the interim fix (commit 173c899) deleted |
the lake ends at its mapped shore; no ragged river area; no dotted far streams; no jump at the mesh range or the records' radius | lake-shore(-top), river-area-track, streams-under-far, stream-lake-far, stream-bridge-far, mouth-stream-far |
| 3 | Look: depth tint, bed colour, foam by the fall of W | shallow streams show their stones, lakes their shore | stream-mouth-eye, stream-main-road-eye, lake-shore, i08-river |
| 4 | Objects after GP13: pipes, mouth stones, stepping stones with region J | a pipe in every mouth, stones a stride apart | v13-culverts, v01-stairs, v02-stream-path-shrubs, new x-stones |
| 5 | Footbridges on GP12's deck, with the hump | a deck clear of the banks | footbridge-eye, new x-footbridge |
Plants in water cannot be shown: the fixture has no ground bake.
11. Places that change
- Rust,
faces/heights/mod.rs:paved_as(the painter by kind),agree()(the guard for a wall of 0), the painter's sort (the water class),cones()(fitfrom base + F, the crest in d),slope()(the toe gap clamped at 0),region()(arm cones with rise and crest),step()(NoRoom and CutWins from base + F;Step::Headwall),by_label()(the ruleLevel; the zone's water skip inslope()).present()does not change. - Rust, other files:
faces/types.rs(Water,Bank,Zone,Level);faces/rules.rs(the ranks);faces/records/mod.rs(WATER,LINE+ 2 words, a newMAGIC, the shore and outline lines, the far records);faces/mod.rs(in_level,lines(),way_label(),graph_points(),turn_points(),taper(), the bank band,decide, polygons);faces/points.rs(five bands);faces/legs.rs(water never splits);faces/heights/check.rs(Step::Headwall);mesh/mod.rs(face_labels);mesh/params.rs(sharpby surface, the grid step by surface);sections.rs,waterways.json,shores.json, the ranks inplan.json; GP15's constructions in a new module. - WGSL and viewer:
terrain/heights.wgsl(h_paved_as,h_agree,h_cones,h_slope,h_region,Level);terrain/model.wgsl(m_decide: the zone's water skip);terrain/records.wgsl(M_LINE);plan/corners.wgsl(δ, the water look fields,nearest_wayskips water);plan/piece.wgsl(the water look, the step look under water, the headwall's look);terrain/features.wgsl,terrain/stamp.wgsl(the far water paint, the clamp, the sub-texel rule);terrain/bins.ts,terrain/water.ts(water stamps, develop's water on the plan nodes). - No change to
host/obc-trailview-features,specs/, the fixture's tiles or public docs.
Invariants and checks
Each slice runs these over every fixture cell (obc test -p obc-ground-plan), target 0 unless stated:
- W level: in every water face of rule Owner or
Level, the height equals the water host's own surface frompresent()(or theLevelconstant) within 1 mm, Rust f64, on the step scan's grid. A ford's wet face counts. A Blend water face (a confluence's region, a river area) is out of this check;model-probe.mjsholds the GPU to Rust. - Border bits: two neighbour cells give the same height bits on their shared line, with water records (the heights scan,
tests/mesh.rs). - Slots:
slots_full0 over the fixture with water records. - Steps inside faces: water adds none;
INSIDE_MAXdoes not rise. A water step lies on a face edge. - No blend across kinds: unit tests in both directions: a road's paved heights are bit-equal with and without a stream beside it and near its junction region; a stream's W is exact beside a road. Each pull request also measures every paved height of a way against the base head over the fixture: bit-equal.
- Mesh validity:
tests/mesh.rswith water and bank faces. - Old path (a measurement in each pull request): without the switch, the views are pixel-equal to the merge base.
- Bytes and GPU:
check-bytes.sh256 of 256 cells;model-probe.mjsat the slice's views, kinds differ 0. - Plants: the census with the switch counts 0 plants in water where records reach (from slice 2, where TAKEN covers standing water).
- Unit tests, one per case: a stream across a slope (W flat across, the bank at
bank_slopeto W + F, level to b, then the fill); a stream beside a road (the road does not change W); a ford (the wet face at W, depth W − way); a confluence (one Blend region) and two water lines that cross with no shared vertex and differ in W (a named step with the water look); a culvert zone (headwall edges, no water cones in K); a lake across a cell border (equal border bits,Level); a river area with its line (W from the line, faded to T).
Costs: guidelines, not gates
The epic's frame rule holds: about as fast as develop. Each slice measures against ground-plan's head and develop, at three places: lake-shore, a rural view with many streams and few roads, and the worst view of the fixture by corners. It reports:
- corners and triangles per view, and the frame in the walk and drive flights (
flight.mjs --gpu, the clock held); - the GPU corner pass per view, the far stamp time with water records, the WASM jump of a lake cell, the memory of pieces and records.
The design pass expects (est., not measured): corners per view +40 % median, +8 % in the worst view, +74 % at lake-shore over roads only; a lake cell's CDT of about 3 ms on the 8 m grid; the far stamp +10 % in towns and up to +40 % in rural pages. A result several times its estimate, or several times develop's cost, stops the slice: report it, and redesign rather than tune.
Done when
- The five slices are in
ground-planbehind the switch, and nothing changes without it. - The invariants hold over every fixture cell in each slice.
- Each slice's pull request shows its views on a develop | before | after slider page, its cost lines, and states that public docs did not change; the adversarial review's findings are resolved and CI is green.
- The owner judged the stream widths after slice 3 (question 4).
Out of scope
- Crossing objects and decks: GP15 in slices 4 and 5, after GP13 and GP12.
- Decks, piers in water, abutments: GP12. Guardrails over water: GP16. Point objects kept out of water: GP17.
- The bank's shore band of beach, gravel and rock (TrailView C4: a band of shore along lakes and ponds #3048): a follow-up after slice 3.
- A change of the bake's water levels.
- Dams, weirs, locks and waterfalls; dry beds of intermittent water; reflections of the world (TrailView: reflections of the world on water #2793).
- Deleting develop's water code (
water-mesh.ts,culverts.ts,roads/shore.ts): GP19. Public docs: GP19.
Questions for the owner
Owner decision (2026-11-03) on the previous body: (b) for the dykes on flat ground; GP18 sinks the levels into channels.
Owner decisions (2026-11-06), all as recommended:
- One drawn surface: the water face at W, drawn by the existing mesh; the bed is only a formula.
- The far look paints water from the same records, after slice 2 measures the far frame and the jump at the records' radius.
pipe_width_m1.0 m: an untagged path over a stream up to 1 m gets a pipe in stones (v02 included). On the fixture, where no stream has a width tag, stepping stones then come only from tags.- Stream widths: tag or default for now. Open: after slice 3's pictures, the owner decides whether the bake sets widths by stream order.
- Lakes and ponds end at their mapped shore: a cut where the terrain is higher, a lip where it is lower. Slice 2 shows it first, with the shore-track case.
- The depth tint, opaque (gravel under streams, the way's material at a ford), on the 8 m lake grid.
- A step whose upper side is water draws as water with foam (falls, ford edges, headwall fronts).
- The interim water fix (branch
claude/gp9-water-interim) ships with the develop merge; slice 1 deletes it. The review of TrailView ground plan GP14 slice 1: line water (records, level, banks, culvert zones) #3177 moves the deletion to slice 2 (commit 173c899): lakes and river areas stay develop's until slice 2, and the fix still serves them. - Culvert zones and headwalls in slice 1, without pipes until GP13.
- A way below W at a shore floods by the ford's wet rule; slice 2 measures it first.
Note from GP2: the chord rules of the water curves can leave kinks at sharp corners and on long spans. Judge them in slice 1's pictures. If they show, replace the two chord rules with one rule that cannot overshoot (for example centripetal Catmull-Rom tangents).
Changed from the previous body
- Surface: the water face is drawn at W by the existing mesh. No bed faces, no bed triangles, no fifth
waterrange, noplan-waterpipeline, nowater_rangebuilder, no handover classes inwater.ts. - Bed: a formula for the look and the objects, not a face;
BED_REACH_Mbounds δ. - Water is records: line records for water lines, shore lines and river-area outlines.
LINEgains rise and crest. - Heights: no blend across kinds (the painter reads records by the
WATERflag; water's return grade 0 and theagree()guard for water against water). The banks are the cones with rise and crest, not newSlopeSpecfields. - Standing water: the height rule
Level, and shore rings as line records, in place of a constant per body read by every reader. - River areas: a blend over the presence of their lines, in place of the 5–10 m fade to the terrain.
- Mesh:
WaterandBankare sharp; level faces take an 8 m grid with δ per corner, in place of a 32 m bed edge. - Bank: a band layer whose top is a face edge.
- Far water: the far look B paints water from the records, in place of "far water stays as today".
- Look: a depth tint and foam on steps whose upper side is water.
- Crossings: GP15's zones and ford wet faces come in slice 1;
pipe_width_mis 1.0 m; a way below W at a shore floods. - Delivery: five slices in place of one pull request; slice 1 is two stacked pull requests that merge together.
- After the review of TrailView ground plan GP14 slice 1: line water (records, level, banks, culvert zones) #3177: the painter reads records by kind (the
WATERflag) in place of a family rule inpresent(); a confluence blends; the faces rules of water (section, labels, thewater/waterpair, the fifth band layer); explicit encodings (WATER,Zone, the wet label, the water class); water stays out of the far records and the stamp until slice 2, and the interim fix goes in slice 2; the W-level invariant reads the host's own surface. - Kept: the rule fields and values of the bed and bank,
shores.json, the even-odd and nonzero rules of standing water, the ranks, the edge cases, the census of plants in water. - Dropped: the reach-budget table of the old CPU heights (GP6's H and window): a water record's reach is at most 15 m, as
waterways.json's today.
Generated by Claude Code
Activity
timohueser commentedon Nov 3, 2026
Deviation from GP18 (PR #3122), for this sub-issue:
data/trailview/waterways.jsonalready gainsfreeboard_mandbank_m(this sub-issue's names and values) as step options of the bake, because GP18's level sink uses them. Read them; do not add them again. The bake now lowers stream and river levels into channels: each sample takes the lower of the fit and its smoothing, stays at leastfreeboard_munder the lower bank terrain at ±(w/2 +bank_m), never goes under a lake it flows into, and is held to never rise downstream.timohueser commentedon Nov 3, 2026
Deviations from GP18's final round (PR #3122), for this sub-issue's beds and banks:
timohueser commentedon Nov 3, 2026
Note for this sub-issue's look (owner wants smooth streams): GP2 (#3123) curves water with Hermite spans whose tangents are the bisector of the two unit chords, but makes a span a straight chord at a corner that turns more than
curve_turn_max_deg(60°) and where the curve would leave its chord by more thancurve_off_max_m(2 m) (both inwaterways.json). Those rules stop overshoot but leave visible kinks at sharp corners and on long spans. When this sub-issue shows beds and banks, judge the kinks in the pictures. If they show, replace the two chord rules with one rule that cannot overshoot, for example centripetal Catmull-Rom tangents (knot spacing by the square root of chord length), keeping the curve a pure function of the tile part's vertices.timohueser commentedon Nov 6, 2026
Owner decisions on the water design (2026-11-06; proposal revision 2 and its review:
/media/timo/OSM1/tmp/ground-plan/water/PROPOSAL.md,REVIEW.md; decision page with pictures: https://claude.ai/artifact/35CKSe24q5n7zaeG1EeZki). All as recommended:pipe_width_mbecomes 1.0 m: an untagged path over a stream up to 1 m gets a pipe in stones (v02 included); stepping stones only from tags.claude/gp9-water-interim) ships with the develop merge; slice 1 deletes it.Order: water slice 1 starts after the leg split (#3165) and the stop mouths (#3171) land, because all three change faces, records and heights.
Generated by Claude Code
timohueser commentedon Nov 10, 2026
Deferred (owner, 2026-11-10): the foam by the fall of the water (slice 3) comes after roads, water and structures are solid.
Generated by Claude Code