@honua/react 0.1.0-beta.0 → 0.1.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contract/discovery.d.ts +231 -0
- package/contract/discovery.d.ts.map +1 -0
- package/contract/discovery.js +554 -0
- package/contract/edit-sketch.d.ts +8 -0
- package/contract/edit-sketch.d.ts.map +1 -1
- package/contract/edit-sketch.js +15 -0
- package/contract/edit-snapping.d.ts +160 -0
- package/contract/edit-snapping.d.ts.map +1 -0
- package/contract/edit-snapping.js +675 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
- package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
- package/contract/index.d.ts +11 -2
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +4 -1
- package/contract/pmtiles.d.ts +31 -0
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +60 -20
- package/contract/protocol-module.d.ts +70 -0
- package/contract/protocol-module.d.ts.map +1 -0
- package/contract/protocol-module.js +1 -0
- package/contract/schema-envelope.d.ts +26 -0
- package/contract/schema-envelope.d.ts.map +1 -0
- package/contract/schema-envelope.js +25 -0
- package/contract/schema.d.ts +582 -0
- package/contract/schema.d.ts.map +1 -0
- package/contract/schema.js +2483 -0
- package/contract/source-capability-support.d.ts +6 -0
- package/contract/source-capability-support.d.ts.map +1 -0
- package/contract/source-capability-support.js +154 -0
- package/contract/source.d.ts +35 -17
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +267 -71
- package/contract/types.d.ts +140 -4
- package/contract/types.d.ts.map +1 -1
- package/contract/types.js +6 -14
- package/core/bounded-json.d.ts +4 -0
- package/core/bounded-json.d.ts.map +1 -0
- package/core/bounded-json.js +38 -0
- package/core/cache-state.d.ts +9 -0
- package/core/cache-state.d.ts.map +1 -1
- package/core/cache-state.js +10 -0
- package/core/capabilities-xml.d.ts +33 -0
- package/core/capabilities-xml.d.ts.map +1 -0
- package/core/capabilities-xml.js +331 -0
- package/core/client.d.ts +4 -1
- package/core/client.d.ts.map +1 -1
- package/core/client.js +115 -29
- package/core/error-classifications.d.ts +153 -0
- package/core/error-classifications.d.ts.map +1 -0
- package/core/error-classifications.js +140 -0
- package/core/error-code-registry.d.ts +158 -0
- package/core/error-code-registry.d.ts.map +1 -0
- package/core/error-code-registry.js +143 -0
- package/core/error-envelope.d.ts +68 -0
- package/core/error-envelope.d.ts.map +1 -0
- package/core/error-envelope.js +357 -0
- package/core/errors.d.ts +45 -29
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +97 -50
- package/core/geoparquet-sql.d.ts +30 -2
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +38 -3
- package/core/odata-key-path.d.ts +12 -0
- package/core/odata-key-path.d.ts.map +1 -0
- package/core/odata-key-path.js +28 -0
- package/core/odata-write-codec.d.ts +66 -0
- package/core/odata-write-codec.d.ts.map +1 -0
- package/core/odata-write-codec.js +1083 -0
- package/core/odata.d.ts +59 -7
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +431 -99
- package/core/ogc-features.d.ts.map +1 -1
- package/core/ogc-features.js +3 -0
- package/core/ogc-maps.d.ts +7 -0
- package/core/ogc-maps.d.ts.map +1 -1
- package/core/ogc-maps.js +46 -7
- package/core/ogc-processes.d.ts +2 -1
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +33 -5
- package/core/ogc-records.d.ts +9 -0
- package/core/ogc-records.d.ts.map +1 -1
- package/core/ogc-records.js +78 -29
- package/core/ogc-tiles.d.ts +10 -1
- package/core/ogc-tiles.d.ts.map +1 -1
- package/core/ogc-tiles.js +56 -17
- package/core/path-utils.d.ts +9 -0
- package/core/path-utils.d.ts.map +1 -1
- package/core/path-utils.js +19 -0
- package/core/protocol-transport.d.ts +1 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/request-pipeline.d.ts.map +1 -1
- package/core/request-pipeline.js +1 -1
- package/core/spatial-filter.d.ts +8 -4
- package/core/spatial-filter.d.ts.map +1 -1
- package/core/spatial-filter.js +206 -16
- package/core/stac-static.d.ts +6 -2
- package/core/stac-static.d.ts.map +1 -1
- package/core/stac-static.js +260 -69
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +69 -5
- package/core/types.d.ts +125 -7
- package/core/types.d.ts.map +1 -1
- package/core/wfs-capabilities.d.ts +2 -0
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +8 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +10 -0
- package/core/wms-capabilities.d.ts +56 -84
- package/core/wms-capabilities.d.ts.map +1 -1
- package/core/wms-capabilities.js +212 -509
- package/core/wmts-capabilities.d.ts +62 -62
- package/core/wmts-capabilities.d.ts.map +1 -1
- package/core/wmts-capabilities.js +224 -371
- package/esri-compat/editor.d.ts +8 -0
- package/esri-compat/editor.d.ts.map +1 -1
- package/esri-compat/editor.js +13 -0
- package/esri-compat/feature-layer.d.ts +2 -0
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +1 -0
- package/esri-compat/layer-list.d.ts +11 -0
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +49 -0
- package/esri-compat/legend.d.ts +10 -0
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +27 -0
- package/esri-compat/portal.d.ts +197 -0
- package/esri-compat/portal.d.ts.map +1 -0
- package/esri-compat/portal.js +251 -0
- package/esri-compat/renderer-objects.d.ts +40 -0
- package/esri-compat/renderer-objects.d.ts.map +1 -0
- package/esri-compat/renderer-objects.js +62 -0
- package/esri-compat/sketch.d.ts +43 -0
- package/esri-compat/sketch.d.ts.map +1 -1
- package/esri-compat/sketch.js +46 -0
- package/esri-compat/snapping.d.ts +43 -0
- package/esri-compat/snapping.d.ts.map +1 -0
- package/esri-compat/snapping.js +45 -0
- package/esri-compat/url.d.ts.map +1 -1
- package/esri-compat/url.js +1 -1
- package/esri-compat/widget-host.d.ts +84 -0
- package/esri-compat/widget-host.d.ts.map +1 -0
- package/esri-compat/widget-host.js +159 -0
- package/filter-registry/index.d.ts +145 -0
- package/filter-registry/index.d.ts.map +1 -0
- package/filter-registry/index.js +531 -0
- package/generated-app/errors.d.ts +18 -2
- package/generated-app/errors.d.ts.map +1 -1
- package/generated-app/errors.js +44 -11
- package/map/automatic-mount-integration.d.ts +134 -0
- package/map/automatic-mount-integration.d.ts.map +1 -0
- package/map/automatic-mount-integration.js +305 -0
- package/map/automatic-source-strategy.d.ts +125 -0
- package/map/automatic-source-strategy.d.ts.map +1 -0
- package/map/automatic-source-strategy.js +494 -0
- package/map/data-to-map-bridge.d.ts +293 -0
- package/map/data-to-map-bridge.d.ts.map +1 -0
- package/map/data-to-map-bridge.js +817 -0
- package/map/geojson-projection.d.ts +33 -0
- package/map/geojson-projection.d.ts.map +1 -0
- package/map/geojson-projection.js +118 -0
- package/map/index.d.ts +14 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +8 -0
- package/map/raster-source-spec.d.ts +30 -0
- package/map/raster-source-spec.d.ts.map +1 -0
- package/map/raster-source-spec.js +190 -0
- package/map/raster-source-strategy.d.ts +65 -0
- package/map/raster-source-strategy.d.ts.map +1 -0
- package/map/raster-source-strategy.js +232 -0
- package/map/source-to-maplibre.d.ts +91 -0
- package/map/source-to-maplibre.d.ts.map +1 -0
- package/map/source-to-maplibre.js +454 -0
- package/map/temporal-playback.d.ts +139 -0
- package/map/temporal-playback.d.ts.map +1 -0
- package/map/temporal-playback.js +247 -0
- package/package.json +14 -1
- package/query-planner/canonical.d.ts +7 -0
- package/query-planner/canonical.d.ts.map +1 -0
- package/query-planner/canonical.js +145 -0
- package/query-planner/cql2-json.d.ts +17 -0
- package/query-planner/cql2-json.d.ts.map +1 -0
- package/query-planner/cql2-json.js +646 -0
- package/query-planner/diagnostics.d.ts +35 -0
- package/query-planner/diagnostics.d.ts.map +1 -0
- package/query-planner/diagnostics.js +373 -0
- package/query-planner/duckdb.d.ts +79 -0
- package/query-planner/duckdb.d.ts.map +1 -0
- package/query-planner/duckdb.js +758 -0
- package/query-planner/execution-context.d.ts +5 -0
- package/query-planner/execution-context.d.ts.map +1 -0
- package/query-planner/execution-context.js +50 -0
- package/query-planner/executor.d.ts +5 -0
- package/query-planner/executor.d.ts.map +1 -0
- package/query-planner/executor.js +223 -0
- package/query-planner/geoservices.d.ts +91 -0
- package/query-planner/geoservices.d.ts.map +1 -0
- package/query-planner/geoservices.js +667 -0
- package/query-planner/grpc.d.ts +100 -0
- package/query-planner/grpc.d.ts.map +1 -0
- package/query-planner/grpc.js +736 -0
- package/query-planner/index.d.ts +44 -0
- package/query-planner/index.d.ts.map +1 -0
- package/query-planner/index.js +30 -0
- package/query-planner/ir.d.ts +20 -0
- package/query-planner/ir.d.ts.map +1 -0
- package/query-planner/ir.js +417 -0
- package/query-planner/local-aggregate.d.ts +5 -0
- package/query-planner/local-aggregate.d.ts.map +1 -0
- package/query-planner/local-aggregate.js +126 -0
- package/query-planner/odata.d.ts +48 -0
- package/query-planner/odata.d.ts.map +1 -0
- package/query-planner/odata.js +662 -0
- package/query-planner/ogc-compiler.d.ts +55 -0
- package/query-planner/ogc-compiler.d.ts.map +1 -0
- package/query-planner/ogc-compiler.js +480 -0
- package/query-planner/ogc-features.d.ts +53 -0
- package/query-planner/ogc-features.d.ts.map +1 -0
- package/query-planner/ogc-features.js +617 -0
- package/query-planner/planner.d.ts +17 -0
- package/query-planner/planner.d.ts.map +1 -0
- package/query-planner/planner.js +818 -0
- package/query-planner/resource.d.ts +94 -0
- package/query-planner/resource.d.ts.map +1 -0
- package/query-planner/resource.js +526 -0
- package/query-planner/semantic-canonical.d.ts +15 -0
- package/query-planner/semantic-canonical.d.ts.map +1 -0
- package/query-planner/semantic-canonical.js +62 -0
- package/query-planner/semantic-compat.d.ts +10 -0
- package/query-planner/semantic-compat.d.ts.map +1 -0
- package/query-planner/semantic-compat.js +35 -0
- package/query-planner/semantic-compiler.d.ts +64 -0
- package/query-planner/semantic-compiler.d.ts.map +1 -0
- package/query-planner/semantic-compiler.js +81 -0
- package/query-planner/semantic-literals.d.ts +30 -0
- package/query-planner/semantic-literals.d.ts.map +1 -0
- package/query-planner/semantic-literals.js +133 -0
- package/query-planner/semantic-types.d.ts +265 -0
- package/query-planner/semantic-types.d.ts.map +1 -0
- package/query-planner/semantic-types.js +1 -0
- package/query-planner/semantic.d.ts +54 -0
- package/query-planner/semantic.d.ts.map +1 -0
- package/query-planner/semantic.js +1421 -0
- package/query-planner/types.d.ts +560 -0
- package/query-planner/types.d.ts.map +1 -0
- package/query-planner/types.js +49 -0
- package/query-planner/wfs-semantic.d.ts +58 -0
- package/query-planner/wfs-semantic.d.ts.map +1 -0
- package/query-planner/wfs-semantic.js +547 -0
- package/query-planner/wfs.d.ts +6 -0
- package/query-planner/wfs.d.ts.map +1 -0
- package/query-planner/wfs.js +71 -0
- package/react/external-map.d.ts +67 -0
- package/react/external-map.d.ts.map +1 -0
- package/react/external-map.js +63 -0
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +3 -2
- package/react/honua-source-layer.d.ts +110 -0
- package/react/honua-source-layer.d.ts.map +1 -0
- package/react/honua-source-layer.js +101 -0
- package/react/hooks.d.ts +28 -0
- package/react/hooks.d.ts.map +1 -1
- package/react/hooks.js +26 -4
- package/react/index.d.ts +8 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +5 -0
- package/react/query-cache.d.ts +26 -4
- package/react/query-cache.d.ts.map +1 -1
- package/react/query-cache.js +51 -8
- package/react/selection.d.ts +177 -0
- package/react/selection.d.ts.map +1 -0
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +69 -0
- package/react/use-mounted-source.d.ts.map +1 -0
- package/react/use-mounted-source.js +346 -0
- package/runtime/edit-snapping.d.ts +107 -0
- package/runtime/edit-snapping.d.ts.map +1 -0
- package/runtime/edit-snapping.js +190 -0
- package/runtime/errors.d.ts +3 -2
- package/runtime/errors.d.ts.map +1 -1
- package/runtime/errors.js +19 -2
- package/runtime/index.d.ts +6 -0
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -0
- package/runtime/maplibre-renderer.d.ts +41 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -0
- package/runtime/maplibre-renderer.js +322 -0
- package/runtime/query-tiles.d.ts +2 -1
- package/runtime/query-tiles.d.ts.map +1 -1
- package/runtime/query-tiles.js +6 -2
- package/runtime/source-bridge.d.ts +4 -4
- package/runtime/source-bridge.d.ts.map +1 -1
- package/runtime/source-bridge.js +9 -56
- package/runtime/style-interactions.d.ts +3 -2
- package/runtime/style-interactions.d.ts.map +1 -1
- package/runtime/style-interactions.js +11 -3
- package/runtime/terra-draw-sketch.d.ts +275 -0
- package/runtime/terra-draw-sketch.d.ts.map +1 -0
- package/runtime/terra-draw-sketch.js +404 -0
- package/source-capability-registry.d.ts +1 -0
- package/source-capability-registry.js +1 -0
- package/source-capability-types.d.ts +186 -0
- package/source-capability-types.js +7 -0
- package/style/index.d.ts +2 -0
- package/style/index.d.ts.map +1 -1
- package/style/index.js +2 -0
- package/style/renderers.d.ts +326 -0
- package/style/renderers.d.ts.map +1 -0
- package/style/renderers.js +517 -0
- package/webmap/convert-renderer.d.ts +24 -3
- package/webmap/convert-renderer.d.ts.map +1 -1
- package/webmap/convert-renderer.js +93 -112
- package/webmap/index.d.ts +1 -1
- package/webmap/index.d.ts.map +1 -1
- package/webmap/index.js +1 -1
package/core/ogc-maps.d.ts
CHANGED
|
@@ -12,11 +12,15 @@ import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
|
12
12
|
import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcMapImageResponse, OgcMapImageRequest, OgcMetadataRequest } from "./types.js";
|
|
13
13
|
export interface HonuaOgcMapsOptions {
|
|
14
14
|
client: HonuaClient;
|
|
15
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/maps`). */
|
|
16
|
+
basePath?: string;
|
|
15
17
|
}
|
|
16
18
|
export interface HonuaOgcCollectionMapOptions {
|
|
17
19
|
client: HonuaClient;
|
|
18
20
|
collectionId: string | number;
|
|
19
21
|
styleId?: string;
|
|
22
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/maps`). */
|
|
23
|
+
basePath?: string;
|
|
20
24
|
}
|
|
21
25
|
export type HonuaOgcCollectionMapImageRequest = Omit<OgcMapImageRequest, "collectionId" | "styleId"> & {
|
|
22
26
|
styleId?: string;
|
|
@@ -24,7 +28,9 @@ export type HonuaOgcCollectionMapImageRequest = Omit<OgcMapImageRequest, "collec
|
|
|
24
28
|
/** Top-level OGC API Maps handle. */
|
|
25
29
|
export declare class HonuaOgcMaps {
|
|
26
30
|
readonly client: HonuaClient;
|
|
31
|
+
private readonly basePath;
|
|
27
32
|
constructor(options: HonuaOgcMapsOptions);
|
|
33
|
+
private withBase;
|
|
28
34
|
collection(collectionId: string | number, styleId?: string): HonuaOgcCollectionMap;
|
|
29
35
|
landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
30
36
|
conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
@@ -39,6 +45,7 @@ export declare class HonuaOgcCollectionMap {
|
|
|
39
45
|
readonly client: HonuaClient;
|
|
40
46
|
readonly collectionId: string | number;
|
|
41
47
|
readonly styleId: string | undefined;
|
|
48
|
+
private readonly basePath;
|
|
42
49
|
constructor(options: HonuaOgcCollectionMapOptions);
|
|
43
50
|
map(request?: HonuaOgcCollectionMapImageRequest): Promise<HonuaOgcMapImageResponse>;
|
|
44
51
|
}
|
package/core/ogc-maps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogc-maps.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-maps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,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AAE,MAAM,GAAG,qBAAqB;IAS5E,OAAO,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAI3E,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAIhG,mEAAmE;IACtD,GAAG,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAGtF;AAED;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,SAAgB,MAAM,EAAE,WAAW,CAAC;IACpC,SAAgB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9C,SAAgB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;gBAE3B,OAAO,EAAE,4BAA4B;IAO3C,GAAG,CAAC,OAAO,GAAE,iCAAsC,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAQrG;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAEpE;AAID,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,sBAAsB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CAQlC;AAED,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,sBAAsB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAQtC;AAED,wBAAsB,cAAc,CAClC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,wBAAwB,CAAC,CASnC"}
|
package/core/ogc-maps.js
CHANGED
|
@@ -8,24 +8,58 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { createOgcMetadataParams } from "./wire-shared.js";
|
|
11
|
+
/** Honua facade path prefix for OGC API Maps. */
|
|
12
|
+
const MAPS_FACADE_BASE = "/ogc/maps";
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the OGC API Maps path prefix: the caller-supplied raw `basePath` (a
|
|
15
|
+
* `connect()`-discovered third-party service root) or the Honua facade default.
|
|
16
|
+
* Trailing slashes are trimmed so a discovered root and the facade compose the
|
|
17
|
+
* same sub-paths. Mirrors the OGC API Records seam in `ogc-records.ts`.
|
|
18
|
+
*/
|
|
19
|
+
function mapsBase(request) {
|
|
20
|
+
// An omitted basePath uses the Honua facade; an explicit "" is a legitimate
|
|
21
|
+
// root-mounted raw service and must NOT fall back to the facade prefix.
|
|
22
|
+
if (request.basePath === undefined)
|
|
23
|
+
return MAPS_FACADE_BASE;
|
|
24
|
+
const base = request.basePath;
|
|
25
|
+
let end = base.length;
|
|
26
|
+
while (end > 0 && base.charCodeAt(end - 1) === 0x2f)
|
|
27
|
+
end--;
|
|
28
|
+
return base.slice(0, end);
|
|
29
|
+
}
|
|
30
|
+
/** Cache-key discriminator so a discovered root never collides with the facade. */
|
|
31
|
+
function mapsBaseKey(request) {
|
|
32
|
+
const base = mapsBase(request);
|
|
33
|
+
return base === MAPS_FACADE_BASE ? "" : `${base}:`;
|
|
34
|
+
}
|
|
11
35
|
/** Top-level OGC API Maps handle. */
|
|
12
36
|
export class HonuaOgcMaps {
|
|
13
37
|
client;
|
|
38
|
+
basePath;
|
|
14
39
|
constructor(options) {
|
|
15
40
|
this.client = options.client;
|
|
41
|
+
this.basePath = options.basePath;
|
|
42
|
+
}
|
|
43
|
+
withBase(request) {
|
|
44
|
+
return this.basePath !== undefined ? { ...request, basePath: this.basePath } : request;
|
|
16
45
|
}
|
|
17
46
|
collection(collectionId, styleId) {
|
|
18
|
-
return new HonuaOgcCollectionMap({
|
|
47
|
+
return new HonuaOgcCollectionMap({
|
|
48
|
+
client: this.client,
|
|
49
|
+
collectionId,
|
|
50
|
+
styleId,
|
|
51
|
+
...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
|
|
52
|
+
});
|
|
19
53
|
}
|
|
20
54
|
async landing(request = {}) {
|
|
21
|
-
return this.client.getOgcMapsLanding(request);
|
|
55
|
+
return this.client.getOgcMapsLanding(this.withBase(request));
|
|
22
56
|
}
|
|
23
57
|
async conformance(request = {}) {
|
|
24
|
-
return this.client.getOgcMapsConformance(request);
|
|
58
|
+
return this.client.getOgcMapsConformance(this.withBase(request));
|
|
25
59
|
}
|
|
26
60
|
/** Render a dataset-level map (across one or more collections). */
|
|
27
61
|
async map(request = {}) {
|
|
28
|
-
return this.client.getOgcMapImage(request);
|
|
62
|
+
return this.client.getOgcMapImage(this.withBase(request));
|
|
29
63
|
}
|
|
30
64
|
}
|
|
31
65
|
/**
|
|
@@ -36,16 +70,19 @@ export class HonuaOgcCollectionMap {
|
|
|
36
70
|
client;
|
|
37
71
|
collectionId;
|
|
38
72
|
styleId;
|
|
73
|
+
basePath;
|
|
39
74
|
constructor(options) {
|
|
40
75
|
this.client = options.client;
|
|
41
76
|
this.collectionId = options.collectionId;
|
|
42
77
|
this.styleId = options.styleId;
|
|
78
|
+
this.basePath = options.basePath;
|
|
43
79
|
}
|
|
44
80
|
async map(request = {}) {
|
|
45
81
|
return this.client.getOgcMapImage({
|
|
46
82
|
...request,
|
|
47
83
|
collectionId: this.collectionId,
|
|
48
84
|
styleId: request.styleId ?? this.styleId,
|
|
85
|
+
...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
|
|
49
86
|
});
|
|
50
87
|
}
|
|
51
88
|
}
|
|
@@ -55,17 +92,19 @@ export function createHonuaOgcMaps(client) {
|
|
|
55
92
|
// ── OGC API Maps wire methods ───────────────────────────────────
|
|
56
93
|
export async function getOgcMapsLanding(transport, request = {}) {
|
|
57
94
|
const params = createOgcMetadataParams(request);
|
|
58
|
-
|
|
95
|
+
const base = mapsBase(request);
|
|
96
|
+
return transport.requestCachedMetadataJson(`ogc-maps:landing:${mapsBaseKey(request)}${params.toString()}`, `${base}?${params.toString()}`, request);
|
|
59
97
|
}
|
|
60
98
|
export async function getOgcMapsConformance(transport, request = {}) {
|
|
61
99
|
const params = createOgcMetadataParams(request);
|
|
62
|
-
|
|
100
|
+
const base = mapsBase(request);
|
|
101
|
+
return transport.requestCachedMetadataJson(`ogc-maps:conformance:${mapsBaseKey(request)}${params.toString()}`, `${base}/conformance?${params.toString()}`, request);
|
|
63
102
|
}
|
|
64
103
|
export async function getOgcMapImage(transport, request) {
|
|
65
104
|
const params = serializeOgcMapImageParams(request);
|
|
66
105
|
const collectionPart = request.collectionId !== undefined ? `/collections/${encodeURIComponent(String(request.collectionId))}` : "";
|
|
67
106
|
const stylePart = request.styleId ? `/styles/${encodeURIComponent(request.styleId)}` : "";
|
|
68
|
-
const path =
|
|
107
|
+
const path = `${mapsBase(request)}${collectionPart}${stylePart}/map${params.size > 0 ? `?${params.toString()}` : ""}`;
|
|
69
108
|
const accept = ogcMapAcceptHeader(request.format) ?? "image/png";
|
|
70
109
|
const response = await transport.requestBytes("GET", path, accept, undefined, request.signal);
|
|
71
110
|
return { bytes: response.bytes, contentType: response.contentType };
|
package/core/ogc-processes.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { IJobRun, JobProgress, JobResult, JobResultsOptions, JobSnapshot, JobSnapshotListener, JobStatus } from "../contract/jobs.js";
|
|
10
10
|
import type { HonuaClient } from "./client.js";
|
|
11
|
+
import { HonuaSdkError } from "./error-envelope.js";
|
|
11
12
|
import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
12
13
|
import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcProcessDescription, HonuaOgcProcessJobAccepted, HonuaOgcProcessJobResults, HonuaOgcProcessJobStatus, HonuaOgcProcessesResponse, OgcMetadataRequest, OgcProcessExecuteRequest, OgcProcessStatus } from "./types.js";
|
|
13
14
|
export interface HonuaOgcProcessesOptions {
|
|
@@ -81,7 +82,7 @@ export declare class HonuaOgcProcessJobRun<T = unknown> implements IJobRun<T> {
|
|
|
81
82
|
private notify;
|
|
82
83
|
}
|
|
83
84
|
/** Error thrown when `IJobRun.results()` resolves a non-success terminal. */
|
|
84
|
-
export declare class HonuaJobFailedError extends
|
|
85
|
+
export declare class HonuaJobFailedError extends HonuaSdkError {
|
|
85
86
|
readonly status: JobStatus;
|
|
86
87
|
readonly errorCode: string | undefined;
|
|
87
88
|
readonly details: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogc-processes.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-processes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,OAAO,EAEP,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACrF;
|
|
1
|
+
{"version":3,"file":"ogc-processes.d.ts","sourceRoot":"","sources":["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AerC;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzD,GACA,OAAO,CAAC,wBAAwB,CAAC,CAQnC;AAED,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzD,GACA,OAAO,CAAC,yBAAyB,CAAC,CAQpC;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzD,GACA,OAAO,CAAC,wBAAwB,CAAC,CAQnC"}
|
package/core/ogc-processes.js
CHANGED
|
@@ -7,8 +7,33 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import { HonuaJobPollTimeoutError, isJobTerminal } from "../contract/jobs.js";
|
|
10
|
+
import { HonuaSdkError } from "./error-envelope.js";
|
|
10
11
|
import { createOgcMetadataParams, mergeHeaders } from "./wire-shared.js";
|
|
11
12
|
const DEFAULT_POLL_INTERVAL_MS = 1_000;
|
|
13
|
+
/** Honua facade path prefix for OGC API Processes. */
|
|
14
|
+
const PROCESSES_FACADE_BASE = "/ogc/processes";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the OGC API Processes path prefix: the caller-supplied raw `basePath`
|
|
17
|
+
* (a `discoverOgcProcesses()`-discovered third-party service root) or the Honua
|
|
18
|
+
* facade default. Trailing slashes are trimmed so a discovered root and the
|
|
19
|
+
* facade compose the same sub-paths. Mirrors the OGC API Records seam.
|
|
20
|
+
*/
|
|
21
|
+
function processesBase(request) {
|
|
22
|
+
// An omitted basePath uses the Honua facade; an explicit "" is a legitimate
|
|
23
|
+
// root-mounted raw service and must NOT fall back to the facade prefix.
|
|
24
|
+
if (request.basePath === undefined)
|
|
25
|
+
return PROCESSES_FACADE_BASE;
|
|
26
|
+
const base = request.basePath;
|
|
27
|
+
let end = base.length;
|
|
28
|
+
while (end > 0 && base.charCodeAt(end - 1) === 0x2f)
|
|
29
|
+
end--;
|
|
30
|
+
return base.slice(0, end);
|
|
31
|
+
}
|
|
32
|
+
/** Cache-key discriminator so a discovered root never collides with the facade. */
|
|
33
|
+
function processesBaseKey(request) {
|
|
34
|
+
const base = processesBase(request);
|
|
35
|
+
return base === PROCESSES_FACADE_BASE ? "" : `${base}:`;
|
|
36
|
+
}
|
|
12
37
|
/** Top-level OGC API Processes handle. */
|
|
13
38
|
export class HonuaOgcProcesses {
|
|
14
39
|
client;
|
|
@@ -271,12 +296,12 @@ export class HonuaOgcProcessJobRun {
|
|
|
271
296
|
}
|
|
272
297
|
}
|
|
273
298
|
/** Error thrown when `IJobRun.results()` resolves a non-success terminal. */
|
|
274
|
-
export class HonuaJobFailedError extends
|
|
299
|
+
export class HonuaJobFailedError extends HonuaSdkError {
|
|
275
300
|
status;
|
|
276
301
|
errorCode;
|
|
277
302
|
details;
|
|
278
303
|
constructor(message, status, errorCode, details) {
|
|
279
|
-
super(message);
|
|
304
|
+
super("core.job-failed", message, { context: { status, errorCode } });
|
|
280
305
|
this.name = "HonuaJobFailedError";
|
|
281
306
|
this.status = status;
|
|
282
307
|
this.errorCode = errorCode;
|
|
@@ -371,15 +396,18 @@ export function createHonuaOgcProcesses(client) {
|
|
|
371
396
|
// ── OGC API Processes wire methods ──────────────────────────────
|
|
372
397
|
export async function getOgcProcessesLanding(transport, request = {}) {
|
|
373
398
|
const params = createOgcMetadataParams(request);
|
|
374
|
-
|
|
399
|
+
const base = processesBase(request);
|
|
400
|
+
return transport.requestCachedMetadataJson(`ogc-processes:landing:${processesBaseKey(request)}${params.toString()}`, `${base}?${params.toString()}`, request);
|
|
375
401
|
}
|
|
376
402
|
export async function getOgcProcessesConformance(transport, request = {}) {
|
|
377
403
|
const params = createOgcMetadataParams(request);
|
|
378
|
-
|
|
404
|
+
const base = processesBase(request);
|
|
405
|
+
return transport.requestCachedMetadataJson(`ogc-processes:conformance:${processesBaseKey(request)}${params.toString()}`, `${base}/conformance?${params.toString()}`, request);
|
|
379
406
|
}
|
|
380
407
|
export async function listOgcProcesses(transport, request = {}) {
|
|
381
408
|
const params = createOgcMetadataParams(request);
|
|
382
|
-
|
|
409
|
+
const base = processesBase(request);
|
|
410
|
+
return transport.requestCachedMetadataJson(`ogc-processes:processes:${processesBaseKey(request)}${params.toString()}`, `${base}/processes?${params.toString()}`, request);
|
|
383
411
|
}
|
|
384
412
|
export async function getOgcProcess(transport, request) {
|
|
385
413
|
const params = createOgcMetadataParams(request);
|
package/core/ogc-records.d.ts
CHANGED
|
@@ -12,10 +12,14 @@ import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
|
12
12
|
import type { HonuaOgcCollectionMetadata, HonuaOgcCollectionsResponse, HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcRecordResponse, HonuaOgcRecordsResponse, OgcCollectionRequest, OgcMetadataRequest, OgcRecordItemRequest, OgcRecordRawItemRequest, OgcRecordsRawSearchRequest, OgcRecordsSearchRequest } from "./types.js";
|
|
13
13
|
export interface HonuaOgcRecordsOptions {
|
|
14
14
|
client: HonuaClient;
|
|
15
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/records`). */
|
|
16
|
+
basePath?: string;
|
|
15
17
|
}
|
|
16
18
|
export interface HonuaOgcRecordCollectionOptions {
|
|
17
19
|
client: HonuaClient;
|
|
18
20
|
collectionId: string | number;
|
|
21
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/records`). */
|
|
22
|
+
basePath?: string;
|
|
19
23
|
}
|
|
20
24
|
export interface HonuaOgcRecordsSearchAllRequest extends OgcRecordsSearchRequest {
|
|
21
25
|
/** Maximum number of records to request per page. */
|
|
@@ -34,7 +38,9 @@ export type HonuaOgcRecordCollectionRawItemRequest = Omit<OgcRecordRawItemReques
|
|
|
34
38
|
/** Top-level OGC API Records handle. */
|
|
35
39
|
export declare class HonuaOgcRecords {
|
|
36
40
|
readonly client: HonuaClient;
|
|
41
|
+
private readonly basePath;
|
|
37
42
|
constructor(options: HonuaOgcRecordsOptions);
|
|
43
|
+
private withBase;
|
|
38
44
|
collection(collectionId: string | number): HonuaOgcRecordCollection;
|
|
39
45
|
landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
40
46
|
conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
@@ -54,7 +60,10 @@ export declare class HonuaOgcRecords {
|
|
|
54
60
|
export declare class HonuaOgcRecordCollection {
|
|
55
61
|
readonly client: HonuaClient;
|
|
56
62
|
readonly collectionId: string | number;
|
|
63
|
+
private readonly basePath;
|
|
57
64
|
constructor(options: HonuaOgcRecordCollectionOptions);
|
|
65
|
+
private bind;
|
|
66
|
+
private rootHandle;
|
|
58
67
|
metadata(request?: OgcMetadataRequest): Promise<HonuaOgcCollectionMetadata>;
|
|
59
68
|
search(request?: HonuaOgcRecordCollectionSearchRequest): Promise<HonuaOgcRecordsResponse>;
|
|
60
69
|
record(request: HonuaOgcRecordCollectionItemRequest): Promise<HonuaOgcRecordResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogc-records.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ogc-records.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,YAAY,CAAC;AA4BpB,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,WAAW,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC9E,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,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AsB,wBAAwB,CAC5C,SAAS,EAAE,sBAAsB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAQtC;AAED,wBAAsB,wBAAwB,CAC5C,SAAS,EAAE,sBAAsB,EACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAQtC;AAED,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,0BAA0B,CAAC,CAQrC;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CAOlC;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,QAAQ,CAAC,CAYnB;AAED,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAYnB"}
|
package/core/ogc-records.js
CHANGED
|
@@ -8,40 +8,73 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { createOgcMetadataParams, mergeHeaders, normalizeCsv, normalizeStringCsv } from "./wire-shared.js";
|
|
11
|
+
/** Honua facade path prefix for OGC API Records. */
|
|
12
|
+
const RECORDS_FACADE_BASE = "/ogc/records";
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the OGC API Records path prefix: the caller-supplied raw
|
|
15
|
+
* `basePath` (a `connect()`-discovered third-party service root) or the Honua
|
|
16
|
+
* facade default. Trailing slashes are trimmed so a discovered root and the
|
|
17
|
+
* facade compose the same sub-paths.
|
|
18
|
+
*/
|
|
19
|
+
function recordsBase(request) {
|
|
20
|
+
// An omitted basePath uses the Honua facade; an explicit "" is a legitimate
|
|
21
|
+
// root-mounted raw service and must NOT fall back to the facade prefix.
|
|
22
|
+
if (request.basePath === undefined)
|
|
23
|
+
return RECORDS_FACADE_BASE;
|
|
24
|
+
const base = request.basePath;
|
|
25
|
+
let end = base.length;
|
|
26
|
+
while (end > 0 && base.charCodeAt(end - 1) === 0x2f)
|
|
27
|
+
end--;
|
|
28
|
+
return base.slice(0, end);
|
|
29
|
+
}
|
|
30
|
+
/** Cache-key discriminator so a discovered root never collides with the facade. */
|
|
31
|
+
function recordsBaseKey(request) {
|
|
32
|
+
const base = recordsBase(request);
|
|
33
|
+
return base === RECORDS_FACADE_BASE ? "" : `${base}:`;
|
|
34
|
+
}
|
|
11
35
|
const DEFAULT_RECORDS_PAGE_SIZE = 100;
|
|
12
36
|
const DEFAULT_RECORDS_MAX_PAGES = 100;
|
|
13
37
|
/** Top-level OGC API Records handle. */
|
|
14
38
|
export class HonuaOgcRecords {
|
|
15
39
|
client;
|
|
40
|
+
basePath;
|
|
16
41
|
constructor(options) {
|
|
17
42
|
this.client = options.client;
|
|
43
|
+
this.basePath = options.basePath;
|
|
44
|
+
}
|
|
45
|
+
withBase(request) {
|
|
46
|
+
return this.basePath !== undefined ? { ...request, basePath: this.basePath } : request;
|
|
18
47
|
}
|
|
19
48
|
collection(collectionId) {
|
|
20
|
-
return new HonuaOgcRecordCollection({
|
|
49
|
+
return new HonuaOgcRecordCollection({
|
|
50
|
+
client: this.client,
|
|
51
|
+
collectionId,
|
|
52
|
+
...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
|
|
53
|
+
});
|
|
21
54
|
}
|
|
22
55
|
async landing(request = {}) {
|
|
23
|
-
return this.client.getOgcRecordsLanding(request);
|
|
56
|
+
return this.client.getOgcRecordsLanding(this.withBase(request));
|
|
24
57
|
}
|
|
25
58
|
async conformance(request = {}) {
|
|
26
|
-
return this.client.getOgcRecordsConformance(request);
|
|
59
|
+
return this.client.getOgcRecordsConformance(this.withBase(request));
|
|
27
60
|
}
|
|
28
61
|
async collections(request = {}) {
|
|
29
|
-
return this.client.listOgcRecordCollections(request);
|
|
62
|
+
return this.client.listOgcRecordCollections(this.withBase(request));
|
|
30
63
|
}
|
|
31
64
|
async collectionMetadata(request) {
|
|
32
|
-
return this.client.getOgcRecordCollection(request);
|
|
65
|
+
return this.client.getOgcRecordCollection(this.withBase(request));
|
|
33
66
|
}
|
|
34
67
|
async search(request) {
|
|
35
|
-
return this.client.searchOgcRecords(request);
|
|
68
|
+
return this.client.searchOgcRecords(this.withBase(request));
|
|
36
69
|
}
|
|
37
70
|
async record(request) {
|
|
38
|
-
return this.client.getOgcRecord(request);
|
|
71
|
+
return this.client.getOgcRecord(this.withBase(request));
|
|
39
72
|
}
|
|
40
73
|
async rawSearch(request) {
|
|
41
|
-
return this.client.fetchOgcRecordsRaw(request);
|
|
74
|
+
return this.client.fetchOgcRecordsRaw(this.withBase(request));
|
|
42
75
|
}
|
|
43
76
|
async rawRecord(request) {
|
|
44
|
-
return this.client.fetchOgcRecordRaw(request);
|
|
77
|
+
return this.client.fetchOgcRecordRaw(this.withBase(request));
|
|
45
78
|
}
|
|
46
79
|
async searchAll(request) {
|
|
47
80
|
const pageSize = request.pageSize ?? request.limit ?? DEFAULT_RECORDS_PAGE_SIZE;
|
|
@@ -49,11 +82,11 @@ export class HonuaOgcRecords {
|
|
|
49
82
|
const records = [];
|
|
50
83
|
let cursor = { offset: request.offset };
|
|
51
84
|
for (let page = 0; page < maxPages; page += 1) {
|
|
52
|
-
const response = await this.client.searchOgcRecords({
|
|
85
|
+
const response = await this.client.searchOgcRecords(this.withBase({
|
|
53
86
|
...request,
|
|
54
87
|
limit: pageSize,
|
|
55
88
|
offset: cursor.offset,
|
|
56
|
-
});
|
|
89
|
+
}));
|
|
57
90
|
const pageRecords = response.features ?? [];
|
|
58
91
|
if (pageRecords.length === 0)
|
|
59
92
|
break;
|
|
@@ -73,11 +106,11 @@ export class HonuaOgcRecords {
|
|
|
73
106
|
const maxPages = request.maxPages ?? DEFAULT_RECORDS_MAX_PAGES;
|
|
74
107
|
let cursor = { offset: request.offset };
|
|
75
108
|
for (let page = 0; page < maxPages; page += 1) {
|
|
76
|
-
const response = await this.client.searchOgcRecords({
|
|
109
|
+
const response = await this.client.searchOgcRecords(this.withBase({
|
|
77
110
|
...request,
|
|
78
111
|
limit: pageSize,
|
|
79
112
|
offset: cursor.offset,
|
|
80
|
-
});
|
|
113
|
+
}));
|
|
81
114
|
const pageRecords = response.features ?? [];
|
|
82
115
|
if (pageRecords.length === 0)
|
|
83
116
|
break;
|
|
@@ -97,32 +130,45 @@ export class HonuaOgcRecords {
|
|
|
97
130
|
export class HonuaOgcRecordCollection {
|
|
98
131
|
client;
|
|
99
132
|
collectionId;
|
|
133
|
+
basePath;
|
|
100
134
|
constructor(options) {
|
|
101
135
|
this.client = options.client;
|
|
102
136
|
this.collectionId = options.collectionId;
|
|
137
|
+
this.basePath = options.basePath;
|
|
138
|
+
}
|
|
139
|
+
bind(request) {
|
|
140
|
+
return {
|
|
141
|
+
...request,
|
|
142
|
+
collectionId: this.collectionId,
|
|
143
|
+
...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
rootHandle() {
|
|
147
|
+
return new HonuaOgcRecords({
|
|
148
|
+
client: this.client,
|
|
149
|
+
...(this.basePath !== undefined ? { basePath: this.basePath } : {}),
|
|
150
|
+
});
|
|
103
151
|
}
|
|
104
152
|
async metadata(request = {}) {
|
|
105
|
-
return this.client.getOgcRecordCollection(
|
|
153
|
+
return this.client.getOgcRecordCollection(this.bind(request));
|
|
106
154
|
}
|
|
107
155
|
async search(request = {}) {
|
|
108
|
-
return this.client.searchOgcRecords(
|
|
156
|
+
return this.client.searchOgcRecords(this.bind(request));
|
|
109
157
|
}
|
|
110
158
|
async record(request) {
|
|
111
|
-
return this.client.getOgcRecord(
|
|
159
|
+
return this.client.getOgcRecord(this.bind(request));
|
|
112
160
|
}
|
|
113
161
|
async rawSearch(request = {}) {
|
|
114
|
-
return this.client.fetchOgcRecordsRaw(
|
|
162
|
+
return this.client.fetchOgcRecordsRaw(this.bind(request));
|
|
115
163
|
}
|
|
116
164
|
async rawRecord(request) {
|
|
117
|
-
return this.client.fetchOgcRecordRaw(
|
|
165
|
+
return this.client.fetchOgcRecordRaw(this.bind(request));
|
|
118
166
|
}
|
|
119
167
|
async searchAll(request = {}) {
|
|
120
|
-
|
|
121
|
-
return root.searchAll({ ...request, collectionId: this.collectionId });
|
|
168
|
+
return this.rootHandle().searchAll({ ...request, collectionId: this.collectionId });
|
|
122
169
|
}
|
|
123
170
|
searchStream(request = {}) {
|
|
124
|
-
|
|
125
|
-
return root.searchStream({ ...request, collectionId: this.collectionId });
|
|
171
|
+
return this.rootHandle().searchStream({ ...request, collectionId: this.collectionId });
|
|
126
172
|
}
|
|
127
173
|
}
|
|
128
174
|
/**
|
|
@@ -170,20 +216,23 @@ export function createHonuaOgcRecords(client) {
|
|
|
170
216
|
// ── OGC API Records wire methods ────────────────────────────────
|
|
171
217
|
export async function getOgcRecordsLanding(transport, request = {}) {
|
|
172
218
|
const params = createOgcMetadataParams(request);
|
|
173
|
-
|
|
219
|
+
const base = recordsBase(request);
|
|
220
|
+
return transport.requestCachedMetadataJson(`ogc-records:landing:${recordsBaseKey(request)}${params.toString()}`, `${base}?${params.toString()}`, request);
|
|
174
221
|
}
|
|
175
222
|
export async function getOgcRecordsConformance(transport, request = {}) {
|
|
176
223
|
const params = createOgcMetadataParams(request);
|
|
177
|
-
|
|
224
|
+
const base = recordsBase(request);
|
|
225
|
+
return transport.requestCachedMetadataJson(`ogc-records:conformance:${recordsBaseKey(request)}${params.toString()}`, `${base}/conformance?${params.toString()}`, request);
|
|
178
226
|
}
|
|
179
227
|
export async function listOgcRecordCollections(transport, request = {}) {
|
|
180
228
|
const params = createOgcMetadataParams(request);
|
|
181
|
-
|
|
229
|
+
const base = recordsBase(request);
|
|
230
|
+
return transport.requestCachedMetadataJson(`ogc-records:collections:${recordsBaseKey(request)}${params.toString()}`, `${base}/collections?${params.toString()}`, request);
|
|
182
231
|
}
|
|
183
232
|
export async function getOgcRecordCollection(transport, request) {
|
|
184
233
|
const params = createOgcMetadataParams(request);
|
|
185
|
-
const path =
|
|
186
|
-
return transport.requestCachedMetadataJson(`ogc-records:collection:${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
|
|
234
|
+
const path = `${recordsBase(request)}/collections/${encodeURIComponent(String(request.collectionId))}`;
|
|
235
|
+
return transport.requestCachedMetadataJson(`ogc-records:collection:${recordsBaseKey(request)}${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
|
|
187
236
|
}
|
|
188
237
|
export async function searchOgcRecords(transport, request) {
|
|
189
238
|
return transport.requestJson("GET", buildOgcRecordsSearchPath(request), undefined, request.signal);
|
|
@@ -207,7 +256,7 @@ function normalizeRecordsBbox(value) {
|
|
|
207
256
|
function buildOgcRecordsSearchPath(request) {
|
|
208
257
|
const collection = encodeURIComponent(String(request.collectionId));
|
|
209
258
|
const params = serializeOgcRecordsSearchParams(request);
|
|
210
|
-
return
|
|
259
|
+
return `${recordsBase(request)}/collections/${collection}/items?${params.toString()}`;
|
|
211
260
|
}
|
|
212
261
|
function buildOgcRecordPath(request) {
|
|
213
262
|
const collection = encodeURIComponent(String(request.collectionId));
|
|
@@ -215,7 +264,7 @@ function buildOgcRecordPath(request) {
|
|
|
215
264
|
const params = createOgcMetadataParams(request);
|
|
216
265
|
if (request.profile !== undefined)
|
|
217
266
|
params.set("profile", normalizeStringCsv(request.profile));
|
|
218
|
-
return
|
|
267
|
+
return `${recordsBase(request)}/collections/${collection}/items/${record}?${params.toString()}`;
|
|
219
268
|
}
|
|
220
269
|
function serializeOgcRecordsSearchParams(request) {
|
|
221
270
|
const params = createOgcMetadataParams(request);
|
package/core/ogc-tiles.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcTile
|
|
|
15
15
|
export declare const DEFAULT_OGC_TILE_MATRIX_SET: OgcTileMatrixSetId;
|
|
16
16
|
export interface HonuaOgcTilesOptions {
|
|
17
17
|
client: HonuaClient;
|
|
18
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/tiles`). */
|
|
19
|
+
basePath?: string;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Structural shape of a MapLibre `VectorSourceSpecification` for tiled
|
|
@@ -47,6 +49,8 @@ export interface HonuaOgcTilesetOptions {
|
|
|
47
49
|
client: HonuaClient;
|
|
48
50
|
collectionId: string | number;
|
|
49
51
|
tileMatrixSetId: string;
|
|
52
|
+
/** Raw endpoint path prefix (defaults to the Honua facade `/ogc/tiles`). */
|
|
53
|
+
basePath?: string;
|
|
50
54
|
}
|
|
51
55
|
export type HonuaOgcCollectionTilesetRequest = Omit<OgcTilesetRequest, "collectionId" | "tileMatrixSetId">;
|
|
52
56
|
export type HonuaOgcCollectionTilesetsRequest = Omit<OgcTilesetsRequest, "collectionId">;
|
|
@@ -57,7 +61,9 @@ export type HonuaOgcCollectionTileRequest = Omit<OgcTileRequest, "collectionId"
|
|
|
57
61
|
*/
|
|
58
62
|
export declare class HonuaOgcTiles {
|
|
59
63
|
readonly client: HonuaClient;
|
|
64
|
+
private readonly basePath;
|
|
60
65
|
constructor(options: HonuaOgcTilesOptions);
|
|
66
|
+
private withBase;
|
|
61
67
|
tileset(collectionId: string | number, tileMatrixSetId: string): HonuaOgcTileset;
|
|
62
68
|
landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
63
69
|
conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
@@ -106,6 +112,7 @@ export declare class HonuaOgcTileset {
|
|
|
106
112
|
readonly client: HonuaClient;
|
|
107
113
|
readonly collectionId: string | number;
|
|
108
114
|
readonly tileMatrixSetId: string;
|
|
115
|
+
private readonly basePath;
|
|
109
116
|
constructor(options: HonuaOgcTilesetOptions);
|
|
110
117
|
metadata(request?: HonuaOgcCollectionTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
|
|
111
118
|
tile(request: HonuaOgcCollectionTileRequest): Promise<HonuaOgcTileResponse>;
|
|
@@ -118,7 +125,9 @@ export declare function getOgcTileMatrixSet(transport: HonuaProtocolTransport, r
|
|
|
118
125
|
tileMatrixSetId: string;
|
|
119
126
|
responseFormat?: string;
|
|
120
127
|
extraParams?: Record<string, string | number | boolean>;
|
|
121
|
-
} & HonuaMetadataRequestOptions
|
|
128
|
+
} & HonuaMetadataRequestOptions & {
|
|
129
|
+
basePath?: string;
|
|
130
|
+
}): Promise<HonuaOgcTileMatrixSet>;
|
|
122
131
|
export declare function listOgcCollectionTilesets(transport: HonuaProtocolTransport, request: OgcTilesetsRequest): Promise<HonuaOgcTilesetsResponse>;
|
|
123
132
|
export declare function getOgcCollectionTileset(transport: HonuaProtocolTransport, request: OgcTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
|
|
124
133
|
export declare function fetchOgcTile(transport: HonuaProtocolTransport, request: OgcTileRequest): Promise<HonuaOgcTileResponse>;
|
package/core/ogc-tiles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogc-tiles.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-tiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EA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