Skip to content

Block diagram: where a lake or the sea meets the box's edge, the wall shows the water in section #2317

Closed

Description

@elpidioassinaturas

Today: a block diagram (map.terrain with "block", #1914) draws its walls from the ground's profile down to the base. With a water layer (#1915), the ground inside a lake is drawn flat at the lake's level, so where a lake or the sea crosses the box's edge the wall simply rises to that level: it reads as solid ground up to the water's surface. A cut through a lake, a reservoir or a coast is one of the things block diagrams are drawn to show (a reservoir behind a dam, an estuary, a coastal plain), and the figure can't show it.

Proposal

A new optional part of "block", "water", used when the terrain names a water layer:

map.terrain={"layer": "MDE", "water": {"layer": "Lagos"},
             "block": {"walls": {"layer": "Geologia"}, "water": {"depth": 12}}}
  • Where: along each wall facing the eye, wherever the box's edge runs inside a water polygon, the wall shows a band of water from the lake's level down to its floor. Below the floor, the wall is drawn as today (its colour or the polygon layer's classes).
  • Depth: "depth" is metres (exaggerated with the relief), or "field" names a numeric field of the water layer (depth per lake). A DEM measures the water's surface, not the bed, so the floor is never read from the DEM. A lake with no depth (no field value, and no depth) gets none, with one notice that counts them.
  • Floor shape: the floor follows the lake's outline: zero depth at the shore and the full depth from about one shore band in (feat(render): a darker band along the terrain's water's shore (#1915 part 4) #2284's band width), so the section shows a basin, not a box. The same shape is used on every wall that crosses the lake.
  • Look: the water layer's fill colour, darker with depth (the same ramp as feat(render): Shaded Relief lights the terrain's water as flat ground (#1915 part 2) #2218's flat light, at most twice as dark at the floor), a 1 px line at the level, and the shore band's colour where the section meets the ground. Partly transparent so the ground's outline behind it stays readable is not proposed: a wall is a section, and a section is opaque.
  • The level: taken as the ground is drawn: the lake's level from [Feature]: Water on the relief: lakes drawn flat at their level, without the relief's light, with a soft sun glint #1915.
  • Caption: like the geology walls, the depths are schematic unless they come from a field. The docs say so, and the notice names the lakes without one.

Tests

  • A box whose east edge crosses a lake with "depth": 10: the east wall shows a water band from the level down to the basin's floor, and ground colour below and beside it.
  • A lake with a depth field: each lake's band uses its own value; a lake with no value gets none and the notice counts it.
  • A lake entirely inside the box: no wall change.
  • No "water" in "block": walls unchanged, pixel for pixel.
  • Over elevation tiles: same result once the box's tiles are read (the base already follows the water level, fix(terrain): a block's base over elevation tiles follows the water level (#1914) #2150).

Choices in this proposal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions