import { envelope } from "@honua/sdk-js";
const dataset = createDataset({
id: "imagery",
client,
sources: [{
id: "stac-search",
protocol: "stac",
locator: { url: "https://your-honua-server.example/stac" },
capabilities: PROTOCOL_DEFAULT_CAPABILITIES.stac,
}],
});
const result = await dataset.source("stac-search")!.query({
where: "collections IN ('landsat-c2-l2')",
spatialFilter: envelope(-158.5, 21.2, -157.6, 21.7),
});
Adapter factory for a STAC API search endpoint.
The canonical
Source.query()runs aPOST /searchagainst the STAC root, withQuery.spatialFilter(e.g. anenvelope(...)bounding box) andQuery.wheretranslated into STAC'sbbox/datetime/filterparameters.