@loaders.gl/services 5.0.0-alpha.3

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.
Files changed (80) hide show
  1. package/LICENSE +52 -0
  2. package/README.md +51 -0
  3. package/dist/arcgis/arcgis-capability-graph.d.ts +48 -0
  4. package/dist/arcgis/arcgis-capability-graph.d.ts.map +1 -0
  5. package/dist/arcgis/arcgis-capability-graph.js +220 -0
  6. package/dist/arcgis/arcgis-capability-graph.js.map +1 -0
  7. package/dist/arcgis/arcgis-feature-server-source-loader.d.ts +94 -0
  8. package/dist/arcgis/arcgis-feature-server-source-loader.d.ts.map +1 -0
  9. package/dist/arcgis/arcgis-feature-server-source-loader.js +228 -0
  10. package/dist/arcgis/arcgis-feature-server-source-loader.js.map +1 -0
  11. package/dist/arcgis/arcgis-image-server-source-loader.d.ts +96 -0
  12. package/dist/arcgis/arcgis-image-server-source-loader.d.ts.map +1 -0
  13. package/dist/arcgis/arcgis-image-server-source-loader.js +143 -0
  14. package/dist/arcgis/arcgis-image-server-source-loader.js.map +1 -0
  15. package/dist/arcgis/arcgis-image-tile-source-loader.d.ts +71 -0
  16. package/dist/arcgis/arcgis-image-tile-source-loader.d.ts.map +1 -0
  17. package/dist/arcgis/arcgis-image-tile-source-loader.js +153 -0
  18. package/dist/arcgis/arcgis-image-tile-source-loader.js.map +1 -0
  19. package/dist/arcgis/arcgis-map-tile-source-loader.d.ts +106 -0
  20. package/dist/arcgis/arcgis-map-tile-source-loader.d.ts.map +1 -0
  21. package/dist/arcgis/arcgis-map-tile-source-loader.js +202 -0
  22. package/dist/arcgis/arcgis-map-tile-source-loader.js.map +1 -0
  23. package/dist/arcgis/arcgis-scene-aggregation.d.ts +34 -0
  24. package/dist/arcgis/arcgis-scene-aggregation.d.ts.map +1 -0
  25. package/dist/arcgis/arcgis-scene-aggregation.js +57 -0
  26. package/dist/arcgis/arcgis-scene-aggregation.js.map +1 -0
  27. package/dist/arcgis/arcgis-scene-server-source-loader.d.ts +112 -0
  28. package/dist/arcgis/arcgis-scene-server-source-loader.d.ts.map +1 -0
  29. package/dist/arcgis/arcgis-scene-server-source-loader.js +157 -0
  30. package/dist/arcgis/arcgis-scene-server-source-loader.js.map +1 -0
  31. package/dist/arcgis/arcgis-server.d.ts +15 -0
  32. package/dist/arcgis/arcgis-server.d.ts.map +1 -0
  33. package/dist/arcgis/arcgis-server.js +41 -0
  34. package/dist/arcgis/arcgis-server.js.map +1 -0
  35. package/dist/arcgis/arcgis-url-utils.d.ts +3 -0
  36. package/dist/arcgis/arcgis-url-utils.d.ts.map +1 -0
  37. package/dist/arcgis/arcgis-url-utils.js +23 -0
  38. package/dist/arcgis/arcgis-url-utils.js.map +1 -0
  39. package/dist/arcgis/arcgis-vector-tile-server-source-loader.d.ts +115 -0
  40. package/dist/arcgis/arcgis-vector-tile-server-source-loader.d.ts.map +1 -0
  41. package/dist/arcgis/arcgis-vector-tile-server-source-loader.js +156 -0
  42. package/dist/arcgis/arcgis-vector-tile-server-source-loader.js.map +1 -0
  43. package/dist/authentication.d.ts +37 -0
  44. package/dist/authentication.d.ts.map +1 -0
  45. package/dist/authentication.js +41 -0
  46. package/dist/authentication.js.map +1 -0
  47. package/dist/bundled.d.ts +2 -0
  48. package/dist/bundled.d.ts.map +1 -0
  49. package/dist/bundled.js +6 -0
  50. package/dist/bundled.js.map +1 -0
  51. package/dist/index.cjs +21614 -0
  52. package/dist/index.cjs.map +6 -0
  53. package/dist/index.d.ts +32 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +24 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/service-registry.d.ts +18 -0
  58. package/dist/service-registry.d.ts.map +1 -0
  59. package/dist/service-registry.js +29 -0
  60. package/dist/service-registry.js.map +1 -0
  61. package/dist/unbundled.d.ts +2 -0
  62. package/dist/unbundled.d.ts.map +1 -0
  63. package/dist/unbundled.js +6 -0
  64. package/dist/unbundled.js.map +1 -0
  65. package/package.json +60 -0
  66. package/src/arcgis/arcgis-capability-graph.ts +295 -0
  67. package/src/arcgis/arcgis-feature-server-source-loader.ts +342 -0
  68. package/src/arcgis/arcgis-image-server-source-loader.ts +241 -0
  69. package/src/arcgis/arcgis-image-tile-source-loader.ts +206 -0
  70. package/src/arcgis/arcgis-map-tile-source-loader.ts +286 -0
  71. package/src/arcgis/arcgis-scene-aggregation.ts +90 -0
  72. package/src/arcgis/arcgis-scene-server-source-loader.ts +258 -0
  73. package/src/arcgis/arcgis-server.ts +61 -0
  74. package/src/arcgis/arcgis-url-utils.ts +26 -0
  75. package/src/arcgis/arcgis-vector-tile-server-source-loader.ts +233 -0
  76. package/src/authentication.ts +83 -0
  77. package/src/bundled.ts +6 -0
  78. package/src/index.ts +99 -0
  79. package/src/service-registry.ts +43 -0
  80. package/src/unbundled.ts +6 -0
package/LICENSE ADDED
@@ -0,0 +1,52 @@
1
+ loaders.gl is licensed under the MIT license
2
+
3
+ Copyright (c) vis.gl contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
22
+
23
+ ---
24
+
25
+ Copyright (c) 2015 Uber Technologies, Inc.
26
+
27
+ Portions of modules/images/src/lib/category-api/binary-image-api.ts are based on
28
+ binary-gltf-utils (https://github.com/Qantas94Heavy/binary-gltf-utils) under the
29
+ MIT License reproduced above.
30
+
31
+ Copyright (c) 2016-17 Karl Cheng
32
+
33
+ Portions of modules/schema-utils/src/lib/utils/async-queue.ts are adapted from
34
+ async-iter-demo (https://github.com/rauschma/async-iter-demo) under the MIT
35
+ License reproduced above.
36
+
37
+ Copyright (c) 2016 Axel Rauschmayer
38
+
39
+ loaders.gl includes certain files from Cesium (https://github.com/CesiumGS/cesium)
40
+ under the Apache 2.0 License, including files in modules/3d-tiles.
41
+
42
+ Copyright 2011-2018 CesiumJS Contributors
43
+
44
+ Licensed under the Apache License, Version 2.0 (the "License");
45
+ you may not use this file except in compliance with the License.
46
+ You may obtain a copy of the License at
47
+ http://www.apache.org/licenses/LICENSE-2.0
48
+
49
+ Unless required by applicable law or agreed to in writing, software
50
+ distributed under the License is distributed on an "AS IS" BASIS,
51
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52
+ See the License for the specific language governing permissions and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @loaders.gl/services
2
+
3
+ Framework-independent sources for geospatial service APIs.
4
+
5
+ This package is the home for ArcGIS REST service integrations including FeatureServer, ImageServer,
6
+ MapServer, and VectorTileServer sources. OGC protocol implementations remain in `@loaders.gl/wms`.
7
+
8
+ ArcGIS sources are owned and exported exclusively by this package. OGC protocol implementations, including WMS, WMTS, WFS, GML, and CSW, are exported by `@loaders.gl/wms`.
9
+
10
+ ```ts
11
+ import {createDataSource, load} from '@loaders.gl/core';
12
+ import {SERVICE_LOADERS} from '@loaders.gl/services';
13
+
14
+ const featureSource = createDataSource(
15
+ 'https://example.com/arcgis/rest/services/Roads/FeatureServer/0',
16
+ SERVICE_LOADERS,
17
+ {}
18
+ );
19
+
20
+ const imageSource = createDataSource(
21
+ 'https://example.com/arcgis/rest/services/Elevation/ImageServer',
22
+ SERVICE_LOADERS,
23
+ {}
24
+ );
25
+
26
+ const mapTileSource = createDataSource(
27
+ 'https://example.com/arcgis/rest/services/World/MapServer',
28
+ SERVICE_LOADERS,
29
+ {}
30
+ );
31
+
32
+ // `load` accepts the same registry and returns the selected runtime source.
33
+ const source = await load(serviceUrl, SERVICE_LOADERS, {
34
+ core: {type: 'arcgis-feature-server'}
35
+ });
36
+ ```
37
+
38
+ | Service | Generic contract | Output |
39
+ | --- | --- | --- |
40
+ | FeatureServer | `VectorSource` | GeoJSON, binary, or Arrow features |
41
+ | ImageServer | `ImageSource` | Rendered images or decoded LERC rasters |
42
+ | ImageServer tiles | `TileSource` | Image or LERC tiles |
43
+ | MapServer | `TileSource` | Cached or dynamically exported image tiles |
44
+ | VectorTileServer | `VectorTileSource` | Raw MVT or decoded WGS84 features |
45
+
46
+ The same source adapters provide normalized metadata and the generic vector, image, and tile APIs
47
+ used by loaders.gl and deck.gl integrations. `SourceLayer` from `@loaders.gl/deck-layers` accepts
48
+ `SERVICE_LOADERS` directly.
49
+
50
+ See the [complete service guide](https://loaders.gl/docs/modules/services) and the feature table on
51
+ each service page.
@@ -0,0 +1,48 @@
1
+ import type { ServiceCapabilities } from '@loaders.gl/loader-utils';
2
+ import type { Service as ArcGISService } from "./arcgis-server.js";
3
+ /** Normalized capabilities discovered from one ArcGIS REST service. */
4
+ export type ArcGISServiceCapabilities = ArcGISService & {
5
+ /** Stable identifier for the discovered service. */
6
+ id: string;
7
+ /** Broad service family used for selection. */
8
+ kind: 'vector' | 'image' | 'tile' | 'scene' | 'unknown';
9
+ /** Shared normalized service capability contract. */
10
+ capabilities: ServiceCapabilities;
11
+ /** Raw service metadata for provider-specific consumers. */
12
+ metadata: Record<string, unknown>;
13
+ };
14
+ /** A normalized graph of services discovered below an ArcGIS REST directory. */
15
+ export type ArcGISCapabilityGraph = {
16
+ /** URL used as the discovery root. */
17
+ rootUrl: string;
18
+ /** Services discovered below the root, including normalized capabilities. */
19
+ nodes: ArcGISServiceCapabilities[];
20
+ };
21
+ /** Requirements used to select the best matching service node. */
22
+ export type ArcGISServiceSelection = {
23
+ /** Preferred service family. */
24
+ kind?: ArcGISServiceCapabilities['kind'];
25
+ /** Required response or source format. */
26
+ format?: string;
27
+ /** Preferred coordinate system. */
28
+ crs?: string;
29
+ /** Required I3S layer profile for SceneServer nodes. */
30
+ profile?: string;
31
+ /** Required layer identifier for SceneServer nodes. */
32
+ layerId?: string | number;
33
+ };
34
+ /** Options controlling ArcGIS capability discovery. */
35
+ export type ArcGISCapabilityGraphOptions = {
36
+ /** Optional fetch implementation for hermetic tests and custom transports. */
37
+ fetch?: typeof fetch;
38
+ };
39
+ /**
40
+ * Discovers an ArcGIS REST directory and normalizes the capabilities of each service.
41
+ *
42
+ * Capability requests are explicit and independent from source loading. Applications that
43
+ * already know the endpoint can continue using the source classes directly.
44
+ */
45
+ export declare function discoverArcGISCapabilities(url: string, options?: ArcGISCapabilityGraphOptions): Promise<ArcGISCapabilityGraph | null>;
46
+ /** Selects the first service satisfying all supplied requirements. */
47
+ export declare function selectArcGISService(graph: ArcGISCapabilityGraph, requirements?: ArcGISServiceSelection): ArcGISServiceCapabilities | undefined;
48
+ //# sourceMappingURL=arcgis-capability-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arcgis-capability-graph.d.ts","sourceRoot":"","sources":["../../src/arcgis/arcgis-capability-graph.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAC,OAAO,IAAI,aAAa,EAAC,2BAAwB;AAE9D,uEAAuE;AACvE,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG;IACtD,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,qDAAqD;IACrD,YAAY,EAAE,mBAAmB,CAAC;IAClC,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,qBAAqB,GAAG;IAClC,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,KAAK,EAAE,yBAAyB,EAAE,CAAC;CACpC,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAAG;IACnC,gCAAgC;IAChC,IAAI,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACzC,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,4BAA4B,GAAG;IACzC,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAgBvC;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,qBAAqB,EAC5B,YAAY,GAAE,sBAA2B,GACxC,yBAAyB,GAAG,SAAS,CAyBvC"}
@@ -0,0 +1,220 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { getArcGISServices } from "./arcgis-server.js";
5
+ /**
6
+ * Discovers an ArcGIS REST directory and normalizes the capabilities of each service.
7
+ *
8
+ * Capability requests are explicit and independent from source loading. Applications that
9
+ * already know the endpoint can continue using the source classes directly.
10
+ */
11
+ export async function discoverArcGISCapabilities(url, options = {}) {
12
+ const fetchFile = options.fetch || fetch;
13
+ const services = await getArcGISServices(url, fetchFile);
14
+ if (!services)
15
+ return null;
16
+ const nodes = await Promise.all(services.map(async (service) => {
17
+ let metadata = await fetchServiceMetadata(service.url, fetchFile);
18
+ if (service.type.toLowerCase().includes('scene')) {
19
+ metadata = await enrichSceneServerMetadata(service.url, metadata, fetchFile);
20
+ }
21
+ return normalizeServiceCapabilities(service, metadata);
22
+ }));
23
+ return { rootUrl: url, nodes };
24
+ }
25
+ /** Selects the first service satisfying all supplied requirements. */
26
+ export function selectArcGISService(graph, requirements = {}) {
27
+ return graph.nodes.find(node => {
28
+ if (requirements.kind && node.kind !== requirements.kind)
29
+ return false;
30
+ if (requirements.format &&
31
+ !node.capabilities.formats.includes(requirements.format.toLowerCase()))
32
+ return false;
33
+ if (requirements.crs && !node.capabilities.crs.includes(requirements.crs))
34
+ return false;
35
+ if (requirements.profile &&
36
+ node.metadata.profile !== requirements.profile &&
37
+ !node.capabilities.layers.some(layer => layer.profile === requirements.profile))
38
+ return false;
39
+ if (requirements.layerId !== undefined &&
40
+ !node.capabilities.layers.some(layer => layer.id === String(requirements.layerId) || layer.name === String(requirements.layerId)))
41
+ return false;
42
+ return true;
43
+ });
44
+ }
45
+ /** Fetches one service's provider-specific metadata document. */
46
+ async function fetchServiceMetadata(serviceUrl, fetchFile) {
47
+ const url = new URL(serviceUrl);
48
+ url.searchParams.set('f', 'pjson');
49
+ const response = await fetchFile(url.toString());
50
+ if (!response.ok) {
51
+ throw new Error(`ArcGIS service metadata request failed: ${response.status}`);
52
+ }
53
+ return (await response.json());
54
+ }
55
+ /** Fetches layer documents so SceneServer profile selection uses authoritative store metadata. */
56
+ async function enrichSceneServerMetadata(serviceUrl, metadata, fetchFile) {
57
+ const layers = Array.isArray(metadata.layers) ? metadata.layers : [];
58
+ if (!layers.length)
59
+ return metadata;
60
+ const enrichedLayers = await Promise.all(layers.map(async (value) => {
61
+ if (!value || typeof value !== 'object')
62
+ return value;
63
+ const layer = value;
64
+ if (layer.id === undefined)
65
+ return value;
66
+ const layerURL = `${serviceUrl.replace(/\/$/, '')}/layers/${encodeURIComponent(String(layer.id))}`;
67
+ try {
68
+ const layerMetadata = await fetchServiceMetadata(layerURL, fetchFile);
69
+ return { ...layer, ...layerMetadata, id: layer.id, name: layer.name ?? layerMetadata.name };
70
+ }
71
+ catch {
72
+ // Keep directory metadata when an individual layer is unavailable.
73
+ return value;
74
+ }
75
+ }));
76
+ return { ...metadata, layers: enrichedLayers };
77
+ }
78
+ /** Combines directory information and metadata into a normalized capability node. */
79
+ function normalizeServiceCapabilities(service, metadata) {
80
+ const serviceType = service.type;
81
+ const kind = getServiceKind(serviceType);
82
+ const formats = getServiceFormats(metadata);
83
+ const crs = getServiceCrs(metadata);
84
+ const layers = getServiceLayers(metadata).map(layer => ({
85
+ ...layer,
86
+ url: layer.url ||
87
+ (serviceType.includes('scene') && layer.id
88
+ ? `${service.url.replace(/\/$/, '')}/layers/${encodeURIComponent(layer.id)}`
89
+ : undefined)
90
+ }));
91
+ const capabilities = {
92
+ url: service.url,
93
+ type: getServiceCapabilityType(serviceType),
94
+ name: service.name,
95
+ title: typeof metadata.name === 'string' ? metadata.name : undefined,
96
+ abstract: typeof metadata.description === 'string' ? metadata.description : undefined,
97
+ crs,
98
+ formats,
99
+ layers,
100
+ operations: getServiceOperations(metadata),
101
+ formatSpecificMetadata: metadata
102
+ };
103
+ return {
104
+ ...service,
105
+ id: service.url,
106
+ kind,
107
+ capabilities,
108
+ metadata
109
+ };
110
+ }
111
+ /** Extracts normalized layer entries from SceneServer and other service metadata. */
112
+ function getServiceLayers(metadata) {
113
+ const layerValues = Array.isArray(metadata.layers) ? metadata.layers : [];
114
+ return layerValues.flatMap(value => {
115
+ if (!value || typeof value !== 'object')
116
+ return [];
117
+ const layer = value;
118
+ const spatialReference = layer.spatialReference;
119
+ const wkid = spatialReference?.latestWkid || spatialReference?.wkid;
120
+ const extent = layer.extent;
121
+ const bounds = extent && [extent.xmin, extent.ymin, extent.xmax, extent.ymax].every(Number.isFinite)
122
+ ? [extent.xmin, extent.ymin, extent.xmax, extent.ymax]
123
+ : undefined;
124
+ return [
125
+ {
126
+ name: layer.id === undefined ? String(layer.name || '') : String(layer.id),
127
+ id: layer.id === undefined ? undefined : String(layer.id),
128
+ url: typeof layer.url === 'string' ? layer.url : undefined,
129
+ title: typeof layer.name === 'string' ? layer.name : undefined,
130
+ crs: wkid ? [`EPSG:${wkid}`] : undefined,
131
+ bounds,
132
+ profile: typeof layer.profile === 'string'
133
+ ? layer.profile
134
+ : layer.store &&
135
+ typeof layer.store === 'object' &&
136
+ typeof layer.store.profile === 'string'
137
+ ? layer.store.profile
138
+ : undefined,
139
+ layerType: typeof layer.layerType === 'string' ? layer.layerType : undefined,
140
+ version: typeof layer.version === 'string'
141
+ ? layer.version
142
+ : layer.store &&
143
+ typeof layer.store === 'object' &&
144
+ typeof layer.store.version === 'string'
145
+ ? layer.store.version
146
+ : undefined
147
+ }
148
+ ];
149
+ });
150
+ }
151
+ /** Extracts operation names when a service advertises them. */
152
+ function getServiceOperations(metadata) {
153
+ const capabilities = metadata.capabilities;
154
+ return typeof capabilities === 'string'
155
+ ? capabilities
156
+ .split(',')
157
+ .map(value => value.trim())
158
+ .filter(Boolean)
159
+ : [];
160
+ }
161
+ /** Maps a discovered ArcGIS family to the shared service capability type. */
162
+ function getServiceCapabilityType(serviceType) {
163
+ if (serviceType.includes('vectortile') || serviceType.includes('vector-tile')) {
164
+ return 'arcgis-vector-tile-server';
165
+ }
166
+ if (serviceType.includes('feature'))
167
+ return 'arcgis-feature-server';
168
+ if (serviceType.includes('image'))
169
+ return 'arcgis-image-server';
170
+ if (serviceType.includes('scene'))
171
+ return 'arcgis-scene-server';
172
+ if (serviceType.includes('map'))
173
+ return 'arcgis-map-server';
174
+ return 'unknown';
175
+ }
176
+ /** Maps an ArcGIS service type to the generic source family. */
177
+ function getServiceKind(serviceType) {
178
+ if (serviceType.includes('feature'))
179
+ return 'vector';
180
+ if (serviceType.includes('image'))
181
+ return 'image';
182
+ if (serviceType.includes('scene'))
183
+ return 'scene';
184
+ if (serviceType.includes('map') ||
185
+ serviceType.includes('vectortile') ||
186
+ serviceType.includes('vector-tile'))
187
+ return 'tile';
188
+ return 'unknown';
189
+ }
190
+ /** Extracts and canonicalizes formats advertised by an ArcGIS service. */
191
+ function getServiceFormats(metadata) {
192
+ const formats = new Set();
193
+ const supportedFormats = metadata.supportedQueryFormats;
194
+ if (typeof supportedFormats === 'string') {
195
+ for (const format of supportedFormats.split(','))
196
+ formats.add(format.trim().toLowerCase());
197
+ }
198
+ const imageFormats = metadata.supportedImageFormatTypes;
199
+ if (typeof imageFormats === 'string') {
200
+ for (const format of imageFormats.split(','))
201
+ formats.add(format.trim().toLowerCase());
202
+ }
203
+ const tileInfo = metadata.tileInfo;
204
+ if (typeof tileInfo?.format === 'string')
205
+ formats.add(tileInfo.format.toLowerCase());
206
+ return [...formats].sort();
207
+ }
208
+ /** Extracts unique EPSG identifiers from common ArcGIS metadata locations. */
209
+ function getServiceCrs(metadata) {
210
+ const spatialReferences = new Set();
211
+ for (const value of [metadata.spatialReference, metadata.fullExtent?.spatialReference]) {
212
+ const spatialReference = value;
213
+ for (const wkid of [spatialReference?.wkid, spatialReference?.latestWkid]) {
214
+ if (wkid)
215
+ spatialReferences.add(`EPSG:${wkid}`);
216
+ }
217
+ }
218
+ return [...spatialReferences].sort();
219
+ }
220
+ //# sourceMappingURL=arcgis-capability-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arcgis-capability-graph.js","sourceRoot":"","sources":["../../src/arcgis/arcgis-capability-graph.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,iBAAiB,EAAC,2BAAw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,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;AACvC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import type { Schema } from '@loaders.gl/schema';
2
+ import type { CoreAPI, DataSourceOptions, VectorSourceMetadata, GetFeaturesParameters, VectorSource, VectorSourceData } from '@loaders.gl/loader-utils';
3
+ import { DataSource } from '@loaders.gl/loader-utils';
4
+ /** Parameters for ArcGIS FeatureServer query requests. */
5
+ export type ArcGISFeatureServiceQueryOptions = {
6
+ /** Include feature geometries in the response. */
7
+ returnGeometry?: boolean;
8
+ /** SQL where clause. */
9
+ where?: string;
10
+ /** Output spatial reference. */
11
+ outSR?: string | number;
12
+ /** Output fields. */
13
+ outFields?: string | string[];
14
+ /** Input spatial reference for supplied geometry. */
15
+ inSR?: string | number;
16
+ /** Filter geometry as an ArcGIS REST geometry string. */
17
+ geometry?: string;
18
+ /** Filter geometry type. */
19
+ geometryType?: 'esriGeometryEnvelope' | 'esriGeometryPoint' | 'esriGeometryPolyline' | 'esriGeometryPolygon';
20
+ /** Spatial relationship for geometry filters. */
21
+ spatialRel?: 'esriSpatialRelIntersects' | 'esriSpatialRelContains' | 'esriSpatialRelCrosses' | 'esriSpatialRelEnvelopeIntersects' | 'esriSpatialRelIndexIntersects' | 'esriSpatialRelOverlaps' | 'esriSpatialRelTouches' | 'esriSpatialRelWithin';
22
+ /** Geometry precision. */
23
+ geometryPrecision?: number;
24
+ /** Query result type. */
25
+ resultType?: 'none' | 'standard' | 'tile';
26
+ /** ArcGIS response format. */
27
+ f?: 'geojson' | 'json' | 'pjson';
28
+ };
29
+ /** Options for the ArcGIS FeatureServer source. */
30
+ export type ArcGISFeatureServerSourceLoaderOptions = DataSourceOptions & {
31
+ 'arcgis-feature-server'?: {
32
+ /** Default ArcGIS query request parameters. */
33
+ queryParameters?: Partial<ArcGISFeatureServiceQueryOptions>;
34
+ };
35
+ };
36
+ /**
37
+ * @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
38
+ */
39
+ export declare const ArcGISFeatureServerSourceLoader: {
40
+ readonly dataType: ArcGISVectorSource;
41
+ readonly batchType: never;
42
+ readonly name: "ArcGISFeatureServer";
43
+ readonly id: "arcgis-feature-server";
44
+ readonly module: "services";
45
+ readonly version: "0.0.0";
46
+ readonly extensions: [];
47
+ readonly mimeTypes: [];
48
+ readonly type: "arcgis-feature-server";
49
+ readonly fromUrl: true;
50
+ readonly fromBlob: false;
51
+ readonly options: {
52
+ readonly url: never;
53
+ readonly 'arcgis-feature-server': {};
54
+ };
55
+ readonly defaultOptions: {
56
+ readonly url: never;
57
+ readonly 'arcgis-feature-server': {};
58
+ };
59
+ readonly testURL: (url: string) => boolean;
60
+ readonly createDataSource: (url: string, options: ArcGISFeatureServerSourceLoaderOptions, coreApi?: CoreAPI) => ArcGISVectorSource;
61
+ };
62
+ /**
63
+ * ArcGIS FeatureServer
64
+ * Note - exports a big API, that could be exposed here if there is a use case
65
+ * @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
66
+ */
67
+ export declare class ArcGISVectorSource extends DataSource<string, ArcGISFeatureServerSourceLoaderOptions> implements VectorSource {
68
+ /** Cached ArcGIS FeatureServer metadata request. */
69
+ protected formatSpecificMetadata: Promise<any> | null;
70
+ constructor(url: string, options: ArcGISFeatureServerSourceLoaderOptions, coreApi?: CoreAPI);
71
+ /** Returns a schema inferred from ArcGIS FeatureServer metadata fields. */
72
+ getSchema(): Promise<Schema>;
73
+ /** Returns normalized VectorSource metadata. */
74
+ getMetadata(options?: {
75
+ formatSpecificMetadata?: boolean;
76
+ }): Promise<VectorSourceMetadata>;
77
+ /** Requests features from the ArcGIS FeatureServer query endpoint. */
78
+ getFeatures(parameters: GetFeaturesParameters): Promise<VectorSourceData>;
79
+ /** Requests the raw ArcGIS FeatureServer metadata document. */
80
+ protected _getFormatSpecificMetadata(): Promise<any>;
81
+ /** Loads and caches the raw ArcGIS FeatureServer metadata. */
82
+ protected getFormatSpecificMetadata(): Promise<any>;
83
+ /** Builds a metadata URL for the ArcGIS FeatureServer endpoint. */
84
+ metadataURL(options?: {
85
+ parameters?: Record<string, unknown>;
86
+ }): string;
87
+ /** Builds a query URL from generic vector source parameters. */
88
+ getFeaturesURL(parameters: GetFeaturesParameters): string;
89
+ /** Builds an ArcGIS FeatureServer URL. */
90
+ protected getUrl(path: string, options: Record<string, unknown>, extra?: Record<string, unknown>): string;
91
+ /** Checks an ArcGIS FeatureServer response. */
92
+ protected checkResponse(response: Response): Promise<void>;
93
+ }
94
+ //# sourceMappingURL=arcgis-feature-server-source-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arcgis-feature-server-source-loader.d.ts","sourceRoot":"","sources":["../../src/arcgis/arcgis-feature-server-source-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAKvE,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAGpD,0DAA0D;AAC1D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,kDAAkD;IAClD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,YAAY,CAAC,EACT,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