The dataset id, the HonuaClient to talk to, the list of
SourceDescriptors, and (optionally) capabilityPolicy and a custom
resolveSource factory.
import { createDataset, PROTOCOL_DEFAULT_CAPABILITIES } from "@honua/sdk-js/contract";
import { HonuaClient } from "@honua/sdk-js/honua";
const client = new HonuaClient({ baseUrl: "https://your-honua-server.example" });
const dataset = createDataset({
id: "parcels",
client,
sources: [
{
id: "parcels-fs",
protocol: "geoservices-feature-service",
locator: { url: "https://your-honua-server.example", serviceId: "parcels", layerId: 0 },
capabilities: PROTOCOL_DEFAULT_CAPABILITIES["geoservices-feature-service"],
},
],
});
const parcels = dataset.source("parcels-fs")!;
const result = await parcels.queryAll({
where: "STATUS = 'ACTIVE'",
outFields: ["OBJECTID", "NAME"],
returnGeometry: true,
pagination: { limit: 500 },
});
console.log(`Loaded ${result.features.length} features`);
Construct a protocol-neutral
Datasetover aHonuaClient.A
Datasetgroups one or moreSources. EachSourceaccepts a protocol-neutralQueryand returns a protocol-neutralResult. The dataset is the cross-protocol unit of work: a singleDatasetcan mix GeoServices FeatureServer, OGC API Features, WFS, STAC, and OData sources under one capability policy.Sourcehandles are constructed lazily, server compatibility is checked once per dataset (and cached on the underlying client), and capability gaps surface as HonuaCapabilityNotSupportedError under the default"strict"policy rather than silently returning empty results.Operations the canonical surface does not cover stay reachable through the typed
source.protocol(...)escape hatch (e.g. ImageServerexportImage, GeometryServerproject, GPServersubmitJob, WFSLockFeature).