Root WFS handle. Holds the capabilities cache and exposes feature-type / stored-query factories.

Constructors

Properties

capabilitiesFetches: number = 0

Counter exposed for tests / diagnostics: how many times capabilities was fetched.

client: HonuaClient
endpointUrl: string
version: string

Methods

  • Fetch and cache the GetCapabilities document. Subsequent calls reuse the parsed snapshot. Throws HonuaWfsExceptionError on <ows:ExceptionReport>.

    Parameters

    • Optionaloptions: {
          signal?: AbortSignal;
      }
      • Optionalsignal?: AbortSignal

    Returns Promise<WfsCapabilitiesSnapshot>

  • Resolve the concrete request URL for a WFS operation, honouring the DCP xlink:href a raw server advertises in GetCapabilities (e.g. GeoServer mounted at /geoserver/ows that advertises its operation URL at /geoserver/wfs). Falls back to the configured endpoint URL when capabilities have not been resolved yet or the server omits the DCP href. This peeks at the already-resolved snapshot synchronously, so it never forces an extra GetCapabilities round-trip: the canonical WFS query path resolves capabilities for output-format negotiation before issuing GetFeature.

    Parameters

    • operation: string
    • method: "GET" | "POST"

    Returns string

  • Internal helper used by feature-type / stored-query handles.

    Parameters

    • method: "GET" | "POST"
    • path: string
    • options: {
          accept: string;
          body?: string;
          contentType?: string;
          signal?: AbortSignal;
      }
      • accept: string
      • Optionalbody?: string
      • OptionalcontentType?: string
      • Optionalsignal?: AbortSignal

    Returns Promise<{
        contentType: string;
        status: number;
        text: string;
    }>

  • Discover stored queries through the ListStoredQueries operation. Returns the bare list of identifier strings; per-query metadata is exposed via storedQuery(id).describe().

    Parameters

    • Optionaloptions: {
          signal?: AbortSignal;
      }
      • Optionalsignal?: AbortSignal

    Returns Promise<readonly string[]>