OptionalfillDepth used to fill internal holes (invalid samples fully enclosed by
valid data) so the box stays watertight. Invalid samples connected to the
grid border are treated as outside the surface footprint (the outer rim)
and are left as holes, so the sea bed follows the true surface outline.
Defaults to the deepest (maximum) valid sample in values.
OptionalmaxSea-bed TIN simplification error (meters) passed to the triangulator. Default 5.
OptionalnullValue marking missing/hole samples in values. Default -1.
OptionalreferenceReference depth (datum) of the input values, in meters. Surface grids are
often stored depth-normalized — e.g. as referenceDepth - trueDepth (the
convention used by this repo's IRAP parser, where referenceDepth is the
surface's maximum/deepest sample) — so the shallowest sample sits at 0
instead of its true depth below sea level. When set, the true positive-down
depth of each sample is recovered as referenceDepth - value before the bed
and walls are built, so the sea bed sits at its real depth (matching the
Surface component). Leave undefined when values already hold true,
positive-down depths (the bed is then built directly from them).
OptionalrimOptional rim smoothing strength. 0 (default) keeps the grid-aligned rim,
which can look pixelated since the surface follows a regular grid; 1–3
progressively smooth it. The outline (rim) vertices of the water surface
and sea bed are filtered with a windowed moving average whose window grows
with this value, so long staircase runs collapse onto their straight centre
line and the rim reads as one continuous curve (rather than a chain of small
arcs). Only the X/Z position of the existing boundary vertices is moved —
their depth (Y), the sea-bed TIN and every interior vertex are left
untouched, so bathymetry detail (and the triangulator's efficiency) is
preserved.
OptionalsurfaceTarget water-surface tessellation (a single number for both axes, or
[X, Z]). The default 0 builds the surface from the same simplified
triangulation as the sea bed, flattened to y = 0 — the fewest triangles
that still trace the surface outline (the waves are shaded per-pixel, so no
interior grid is needed). A positive value instead lays down a regular grid
at that density, clipped to and stitched to the exact data outline (which is
kept intact), so the interior is uniform — useful only when the surface is
vertex-displaced. The rim is shared with the walls and bed either way.
Default 0.
Options for createOceanBoxFromSurface.