Function wfsSource

  • Adapter factory for a WFS 2.0 endpoint.

    Query.spatialFilter and the deprecated source-native Query.where migration member compile to FES 2.0; GeoJSON is preferred over GML via OperationsMetadata negotiation. applyEdits() builds <wfs:Transaction> bodies. Reach Source.protocol("wfs") for raw GML, custom FES filters, GetPropertyValue, raw <wfs:Transaction> bodies, and stored queries.

    Locking (LockFeature / GetFeatureWithLock) has no typed helper anywhere in the SDK. Callers that need locks must send their own request XML through Source.protocol("wfs")!.root.requestText(...) and parse the response themselves; no lock id is extracted and no lock state is tracked.

    FES spatial predicates and transaction geometry name the feature type's geometry property, which is server-specific (the_geom on PostGIS-via-GeoServer, msGeometry on MapServer, arbitrary per-schema names elsewhere). The adapter resolves it from DescribeFeatureType on first use and caches it; locator.geometryName pins it explicitly. Resolution failure fails closed rather than guessing a default that would silently match nothing.

    Type Parameters

    • T

    Parameters

    Returns CapabilityAwareSource<T>

    const dataset = createDataset({
    id: "wfs-parcels",
    client,
    sources: [{
    id: "parcels",
    protocol: "wfs",
    locator: { url: "https://your-honua-server.example/wfs", typeName: "ns:Parcels" },
    capabilities: PROTOCOL_DEFAULT_CAPABILITIES.wfs,
    }],
    });
    const result = await dataset.source("parcels")!.queryAll({
    pagination: { limit: 500 },
    });