SDK JS
    Preparing search index...

    Interface SurfaceSampleOptions

    interface SurfaceSampleOptions {
        gridPx?: number;
        marginM?: number;
        maxHeightM?: number;
    }
    Index

    Properties

    gridPx?: number

    Pixel resolution of the overhead pick pass along the LONG axis of the stations' bbox (the short axis follows the aspect ratio). Default 1024 — right for a dense elevation-profile line across a wide bbox. Small values (e.g. 64) make point probes (a couple of nearby stations, metre-scale accuracy) dramatically cheaper: the pass renders and reads back the whole grid, so cost scales with the pixel count. buildTopDownFrame clamps to a minimum of 64 px (and a maximum of 4096).

    marginM?: number

    Padding added around the stations' bbox, metres. Default 30 — generous, so far-apart profile stations always land inside the grid. Ground resolution is bboxSpan / gridPx, so the default swamps a two-station point probe (two stations 6 m apart become a 66 m box: ~1 m/px at gridPx: 64, coarser than a doorway). Pass a couple of metres for a tight, fine probe.

    maxHeightM?: number

    CUT HEIGHT, metres above the map's zero: ignore everything at or above it, so the sample returns the highest surface BELOW the cut instead of the topmost surface overall. Default: no cut.

    This is what makes an interior sampleable. A top-down probe inside a building sees the roof — under a door lintel, under a ceiling, under a canopy, on any floor but the top one. Cutting just above the walker's feet returns the floor they are standing on, and a doorway stops being indistinguishable from a wall. On open ground and on a roof nothing is above the cut, so the reading is unchanged.

    Only the MESH layers (3D Tiles / I3S / BSL) honour it; splat and point-cloud layers ignore it and keep returning their topmost surface, so a caller mixing layer kinds must still discard readings above its own cut.