GeoLeaf Core API - v3.0.0
    Preparing search index...
    • The geometry a layer configuration declares, whichever of the two aliases carries it.

      ⚠️ geometryType wins when both are present. They are aliases, so this only matters if a profile declares them with DIFFERENT values — measured on 07/08/2026: 0 of the 6 configs that declare both disagree. Should that ever change, the disagreement is a profile error and belongs to validate:profiles, not to a silent tie-break here.

      Type Parameters

      • T extends string | null = null

      Parameters

      • config: LayerGeometryShape | null | undefined

        A layer configuration, raw from disk or normalised by the profile loader.

      • fallback: T = ...

        Returned when the config declares neither key. Defaults to null.

      Returns string | T

      The declared geometry (e.g. "point", "polygon"), or fallback.

      layerGeometry({ geometryType: "point" });              // "point"
      layerGeometry({ geometry: "polygon" }); // "polygon"
      layerGeometry({ geometry: "line" }, "point"); // "line"
      layerGeometry({ label: "sans géométrie" }); // null
      layerGeometry({ label: "sans géométrie" }, "polygon"); // "polygon"