ol-stac 1.0.0-beta.7 → 1.0.0-beta.8

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 (124) hide show
  1. package/events/ErrorEvent.d.ts +20 -0
  2. package/events/ErrorEvent.d.ts.map +1 -0
  3. package/{src/ol/events → events}/ErrorEvent.js +10 -12
  4. package/events/ErrorEvent.js.map +1 -0
  5. package/layer/STAC.d.ts +415 -0
  6. package/layer/STAC.d.ts.map +1 -0
  7. package/layer/STAC.js +757 -0
  8. package/layer/STAC.js.map +1 -0
  9. package/package.json +2 -77
  10. package/source/GeoTIFF2.d.ts +33 -0
  11. package/source/GeoTIFF2.d.ts.map +1 -0
  12. package/{src/ol/source → source}/GeoTIFF2.js +9 -16
  13. package/source/GeoTIFF2.js.map +1 -0
  14. package/source/type.d.ts +110 -0
  15. package/source/type.d.ts.map +1 -0
  16. package/source/type.js +104 -0
  17. package/source/type.js.map +1 -0
  18. package/util.d.ts +58 -0
  19. package/util.d.ts.map +1 -0
  20. package/util.js +166 -0
  21. package/util.js.map +1 -0
  22. package/.eslintignore +0 -2
  23. package/.github/workflows/deploy.yml +0 -67
  24. package/.github/workflows/publish.yml +0 -32
  25. package/.github/workflows/release.yml +0 -21
  26. package/.github/workflows/test.yml +0 -82
  27. package/CHANGELOG.md +0 -57
  28. package/DEVELOPING.md +0 -104
  29. package/config/jsdoc/api/conf.json +0 -37
  30. package/config/jsdoc/api/index.md +0 -3
  31. package/config/jsdoc/api/readme.md +0 -61
  32. package/config/jsdoc/api/template/README.md +0 -3
  33. package/config/jsdoc/api/template/publish.js +0 -743
  34. package/config/jsdoc/api/template/static/scripts/linenumber.js +0 -11
  35. package/config/jsdoc/api/template/static/scripts/main.js +0 -305
  36. package/config/jsdoc/api/template/static/scripts/prettify/Apache-License-2.0.txt +0 -202
  37. package/config/jsdoc/api/template/static/scripts/prettify/lang-css.js +0 -2
  38. package/config/jsdoc/api/template/static/scripts/prettify/prettify.js +0 -28
  39. package/config/jsdoc/api/template/static/styles/carbon.css +0 -65
  40. package/config/jsdoc/api/template/static/styles/jaguar.css +0 -512
  41. package/config/jsdoc/api/template/static/styles/prettify-jsdoc.css +0 -111
  42. package/config/jsdoc/api/template/static/styles/prettify-tomorrow.css +0 -132
  43. package/config/jsdoc/api/template/static/theme +0 -1
  44. package/config/jsdoc/api/template/tmpl/container.tmpl +0 -197
  45. package/config/jsdoc/api/template/tmpl/details.tmpl +0 -84
  46. package/config/jsdoc/api/template/tmpl/example.tmpl +0 -2
  47. package/config/jsdoc/api/template/tmpl/examples.tmpl +0 -16
  48. package/config/jsdoc/api/template/tmpl/exceptions.tmpl +0 -30
  49. package/config/jsdoc/api/template/tmpl/layout.tmpl +0 -93
  50. package/config/jsdoc/api/template/tmpl/mainpage.tmpl +0 -14
  51. package/config/jsdoc/api/template/tmpl/members.tmpl +0 -38
  52. package/config/jsdoc/api/template/tmpl/method.tmpl +0 -132
  53. package/config/jsdoc/api/template/tmpl/navigation.tmpl +0 -59
  54. package/config/jsdoc/api/template/tmpl/observables.tmpl +0 -39
  55. package/config/jsdoc/api/template/tmpl/params.tmpl +0 -109
  56. package/config/jsdoc/api/template/tmpl/properties.tmpl +0 -85
  57. package/config/jsdoc/api/template/tmpl/returns.tmpl +0 -72
  58. package/config/jsdoc/api/template/tmpl/source.tmpl +0 -8
  59. package/config/jsdoc/api/template/tmpl/stability.tmpl +0 -7
  60. package/config/jsdoc/api/template/tmpl/tutorial.tmpl +0 -19
  61. package/config/jsdoc/api/template/tmpl/type.tmpl +0 -7
  62. package/config/jsdoc/info/conf.json +0 -22
  63. package/config/jsdoc/info/publish.js +0 -175
  64. package/config/jsdoc/package.json +0 -4
  65. package/config/jsdoc/plugins/api.cjs +0 -163
  66. package/config/jsdoc/plugins/default-export.cjs +0 -35
  67. package/config/jsdoc/plugins/define-plugin.cjs +0 -33
  68. package/config/jsdoc/plugins/events.cjs +0 -39
  69. package/config/jsdoc/plugins/inline-options.cjs +0 -102
  70. package/config/jsdoc/plugins/markdown.cjs +0 -119
  71. package/config/jsdoc/plugins/virtual-plugin.cjs +0 -16
  72. package/config/tsconfig-build.json +0 -25
  73. package/examples/.eslintrc +0 -29
  74. package/examples/index.html +0 -100
  75. package/examples/index.js +0 -109
  76. package/examples/planetary-computer.html +0 -14
  77. package/examples/planetary-computer.js +0 -56
  78. package/examples/resources/Jugl.js +0 -15
  79. package/examples/resources/common.js +0 -111
  80. package/examples/stac-collection-pmtiles-raster.html +0 -9
  81. package/examples/stac-collection-pmtiles-raster.js +0 -55
  82. package/examples/stac-collection-pmtiles-vector.html +0 -9
  83. package/examples/stac-collection-pmtiles-vector.js +0 -58
  84. package/examples/stac-collection-wms.html +0 -9
  85. package/examples/stac-collection-wms.js +0 -56
  86. package/examples/stac-item-from-object.html +0 -9
  87. package/examples/stac-item-from-object.js +0 -102
  88. package/examples/stac-item-tileserver.html +0 -9
  89. package/examples/stac-item-tileserver.js +0 -34
  90. package/examples/stac-item.html +0 -9
  91. package/examples/stac-item.js +0 -45
  92. package/examples/stac-itemcollection.html +0 -11
  93. package/examples/stac-itemcollection.js +0 -39
  94. package/examples/templates/example.html +0 -206
  95. package/examples/templates/readme.md +0 -3
  96. package/examples/webpack/config.mjs +0 -69
  97. package/examples/webpack/example-builder.js +0 -411
  98. package/site/build.js +0 -26
  99. package/site/layouts/default.hbs +0 -82
  100. package/site/src/doc/faq.md +0 -40
  101. package/site/src/doc/index.md +0 -16
  102. package/site/src/doc/quickstart.md +0 -45
  103. package/site/src/doc/tutorials/index.md +0 -8
  104. package/site/src/download/index.hbs +0 -47
  105. package/site/src/favicon.ico +0 -0
  106. package/site/src/index.hbs +0 -94
  107. package/site/src/theme/index.css +0 -26
  108. package/site/src/theme/site.css +0 -531
  109. package/src/ol/layer/STAC.js +0 -860
  110. package/src/ol/source/type.js +0 -108
  111. package/src/ol/util.js +0 -183
  112. package/tasks/.eslintrc +0 -5
  113. package/tasks/build-website.sh +0 -90
  114. package/tasks/create-release.js +0 -107
  115. package/tasks/get-latest-release.js +0 -36
  116. package/tasks/newest-tag.js +0 -47
  117. package/tasks/prepare-package.js +0 -41
  118. package/tasks/publish.sh +0 -90
  119. package/test/README.md +0 -56
  120. package/test/browser/.eslintrc +0 -14
  121. package/test/browser/karma.config.cjs +0 -94
  122. package/test/browser/spec/ol/layer/STAC.test.js +0 -18
  123. package/test/browser/test-extensions.js +0 -419
  124. package/tsconfig.json +0 -17
@@ -0,0 +1,20 @@
1
+ export default ErrorEvent;
2
+ /**
3
+ * @classdesc
4
+ * Event emitted on configuration or loading error.
5
+ * @api
6
+ */
7
+ declare class ErrorEvent extends BaseEvent {
8
+ /**
9
+ * @param {Error} error error object.
10
+ * @api
11
+ */
12
+ constructor(error: Error);
13
+ /**
14
+ * @type {Error}
15
+ * @api
16
+ */
17
+ error: Error;
18
+ }
19
+ import BaseEvent from 'ol/events/Event.js';
20
+ //# sourceMappingURL=ErrorEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorEvent.d.ts","sourceRoot":"","sources":["../../../src/ol/events/ErrorEvent.js"],"names":[],"mappings":";AAMA;;;;GAIG;AACH;IACE;;;OAGG;IACH,mBAHW,KAAK,EAWf;IALC;;;OAGG;IACH,OAHU,KAAK,CAGG;CAErB;sBAtBqB,oBAAoB"}
@@ -3,26 +3,24 @@
3
3
  */
4
4
  import BaseEvent from 'ol/events/Event.js';
5
5
  import EventType from 'ol/events/EventType.js';
6
-
7
6
  /**
8
7
  * @classdesc
9
8
  * Event emitted on configuration or loading error.
10
9
  * @api
11
10
  */
12
11
  class ErrorEvent extends BaseEvent {
13
- /**
14
- * @param {Error} error error object.
15
- * @api
16
- */
17
- constructor(error) {
18
- super(EventType.ERROR);
19
-
20
12
  /**
21
- * @type {Error}
13
+ * @param {Error} error error object.
22
14
  * @api
23
15
  */
24
- this.error = error;
25
- }
16
+ constructor(error) {
17
+ super(EventType.ERROR);
18
+ /**
19
+ * @type {Error}
20
+ * @api
21
+ */
22
+ this.error = error;
23
+ }
26
24
  }
27
-
28
25
  export default ErrorEvent;
26
+ //# sourceMappingURL=ErrorEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorEvent.js","sourceRoot":"","sources":["../../../src/ol/events/ErrorEvent.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAW,SAAQ,SAAS;IAChC;;;OAGG;IACH,YAAY,KAAK;QACf,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAEvB;;;WAGG;QACH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,415 @@
1
+ export default STACLayer;
2
+ export type Extent = import("ol/extent.js").Extent;
3
+ export type Layer = import("ol/layer.js").Layer;
4
+ export type Link = any;
5
+ export type Style = import('ol/style.js').Style;
6
+ export type SourceOptions = import('../source/type.js').SourceOptions;
7
+ export type Options = {
8
+ /**
9
+ * The STAC URL. Any of `url` and `data` must be provided.
10
+ * Can also be used as url for data, if it is absolute and doesn't contain a self link.
11
+ */
12
+ url?: string | undefined;
13
+ /**
14
+ * The STAC metadata. Any of `url` and `data` must be provided.
15
+ * `data` take precedence over `url`.
16
+ */
17
+ data?: STAC | Asset | any;
18
+ /**
19
+ * The selector for the assets to be rendered,
20
+ * only for STAC Items and Collections.
21
+ * This can be an array of strings corresponding to asset keys or Asset objects.
22
+ * null shows the default asset, an empty array shows no asset.
23
+ */
24
+ assets?: any[] | null | undefined;
25
+ /**
26
+ * The (one-based) bands to show.
27
+ */
28
+ bands?: number[] | undefined;
29
+ /**
30
+ * Optional function that can be used to configure the underlying sources. The function can do any additional work
31
+ * and return the completed options or a promise for the same. The function will be called with the current source options
32
+ * and the STAC Asset or Link.
33
+ * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
34
+ * Please be aware that sending HTTP headers may not be supported by all sources.
35
+ */
36
+ getSourceOptions?: ((arg0: SourceType, arg1: SourceOptions, arg2: (Asset | Link)) => (SourceOptions | Promise<SourceOptions>)) | undefined;
37
+ /**
38
+ * Allows to hide the footprints (bounding box/geometry) of the STAC object
39
+ * by default.
40
+ */
41
+ displayFootprint?: boolean | undefined;
42
+ /**
43
+ * Allow to choose non-cloud-optimized GeoTiffs as default image to show,
44
+ * which might not work well for larger files or larger amounts of files.
45
+ */
46
+ displayGeoTiffByDefault?: boolean | undefined;
47
+ /**
48
+ * Allow to display images that a browser can display (e.g. PNG, JPEG),
49
+ * usually assets with role `thumbnail` or the link with relation type `preview`.
50
+ * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
51
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items.
52
+ */
53
+ displayPreview?: boolean | undefined;
54
+ /**
55
+ * Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
56
+ * usually the assets with role `overview` or `visual`.
57
+ */
58
+ displayOverview?: boolean | undefined;
59
+ /**
60
+ * Allow to display a layer based on the information provided through the
61
+ * web map links extension. It is only used if no other data is shown. You can set a specific type of
62
+ * web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`), let OpenLayers choose (`true`) or disable the functionality (`false`).
63
+ */
64
+ displayWebMapLink?: string | boolean | undefined;
65
+ /**
66
+ * The style for the overall bounds / footprint.
67
+ */
68
+ boundsStyle?: import("ol/style/Style.js").default | undefined;
69
+ /**
70
+ * The style for individual items in a list of STAC Items or Collections.
71
+ */
72
+ collectionStyle?: import("ol/style/Style.js").default | undefined;
73
+ /**
74
+ * For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
75
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
76
+ */
77
+ crossOrigin?: string | null | undefined;
78
+ /**
79
+ * A function that generates a URL template for a tile server (XYZ),
80
+ * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
81
+ */
82
+ buildTileUrlTemplate?: ((arg0: Asset) => string | null) | undefined;
83
+ /**
84
+ * Uses the given URL template only when the client-side GeoTIFF rendering fails.
85
+ */
86
+ useTileLayerAsFallback?: boolean | undefined;
87
+ /**
88
+ * Opacity (0, 1).
89
+ */
90
+ opacity?: number | undefined;
91
+ /**
92
+ * Visibility.
93
+ */
94
+ visible?: boolean | undefined;
95
+ /**
96
+ * The bounding extent for layer rendering. The layer will not be
97
+ * rendered outside of this extent.
98
+ */
99
+ extent?: import("ol/extent.js").Extent | undefined;
100
+ /**
101
+ * The z-index for layer rendering. At rendering time, the layers
102
+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
103
+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
104
+ * method was used.
105
+ */
106
+ zIndex?: number | undefined;
107
+ /**
108
+ * The minimum resolution (inclusive) at which this layer will be
109
+ * visible.
110
+ */
111
+ minResolution?: number | undefined;
112
+ /**
113
+ * The maximum resolution (exclusive) below which this layer will
114
+ * be visible.
115
+ */
116
+ maxResolution?: number | undefined;
117
+ /**
118
+ * The minimum view zoom level (exclusive) above which this layer will be
119
+ * visible.
120
+ */
121
+ minZoom?: number | undefined;
122
+ /**
123
+ * The maximum view zoom level (inclusive) at which this layer will
124
+ * be visible.
125
+ */
126
+ maxZoom?: number | undefined;
127
+ /**
128
+ * Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
129
+ */
130
+ properties?: {
131
+ [x: string]: any;
132
+ } | undefined;
133
+ };
134
+ /**
135
+ * @typedef {import("ol/extent.js").Extent} Extent
136
+ */
137
+ /**
138
+ * @typedef {import("ol/layer.js").Layer} Layer
139
+ */
140
+ /**
141
+ * @typedef {import("stac-js").Link} Link
142
+ */
143
+ /**
144
+ * @typedef {import('ol/style.js').Style} Style
145
+ */
146
+ /**
147
+ * @typedef {import('../source/type.js').SourceOptions} SourceOptions
148
+ */
149
+ /**
150
+ * @typedef {Object} Options
151
+ * @property {string} [url] The STAC URL. Any of `url` and `data` must be provided.
152
+ * Can also be used as url for data, if it is absolute and doesn't contain a self link.
153
+ * @property {STAC|Asset|Object} [data] The STAC metadata. Any of `url` and `data` must be provided.
154
+ * `data` take precedence over `url`.
155
+ * @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
156
+ * only for STAC Items and Collections.
157
+ * This can be an array of strings corresponding to asset keys or Asset objects.
158
+ * null shows the default asset, an empty array shows no asset.
159
+ * @property {Array<number>} [bands] The (one-based) bands to show.
160
+ * @property {function(SourceType, SourceOptions, (Asset|Link)):(SourceOptions|Promise<SourceOptions>)} [getSourceOptions]
161
+ * Optional function that can be used to configure the underlying sources. The function can do any additional work
162
+ * and return the completed options or a promise for the same. The function will be called with the current source options
163
+ * and the STAC Asset or Link.
164
+ * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
165
+ * Please be aware that sending HTTP headers may not be supported by all sources.
166
+ * @property {boolean} [displayFootprint=true] Allows to hide the footprints (bounding box/geometry) of the STAC object
167
+ * by default.
168
+ * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
169
+ * which might not work well for larger files or larger amounts of files.
170
+ * @property {boolean} [displayPreview=false] Allow to display images that a browser can display (e.g. PNG, JPEG),
171
+ * usually assets with role `thumbnail` or the link with relation type `preview`.
172
+ * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
173
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items.
174
+ * @property {boolean} [displayOverview=true] Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
175
+ * usually the assets with role `overview` or `visual`.
176
+ * @property {string|boolean} [displayWebMapLink=false] Allow to display a layer based on the information provided through the
177
+ * web map links extension. It is only used if no other data is shown. You can set a specific type of
178
+ * web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`), let OpenLayers choose (`true`) or disable the functionality (`false`).
179
+ * @property {Style} [boundsStyle] The style for the overall bounds / footprint.
180
+ * @property {Style} [collectionStyle] The style for individual items in a list of STAC Items or Collections.
181
+ * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
182
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
183
+ * @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
184
+ * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
185
+ * @property {boolean} [useTileLayerAsFallback=false] Uses the given URL template only when the client-side GeoTIFF rendering fails.
186
+ * @property {number} [opacity=1] Opacity (0, 1).
187
+ * @property {boolean} [visible=true] Visibility.
188
+ * @property {Extent} [extent] The bounding extent for layer rendering. The layer will not be
189
+ * rendered outside of this extent.
190
+ * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
191
+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
192
+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
193
+ * method was used.
194
+ * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
195
+ * visible.
196
+ * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
197
+ * be visible.
198
+ * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
199
+ * visible.
200
+ * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
201
+ * be visible.
202
+ * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
203
+ */
204
+ /**
205
+ * @classdesc
206
+ * Renders STAC entities such as STAC Items, Collectons or lists of them as returned by APIs.
207
+ * The layers created by this LayerGroup all have a 'stac' value that can be retrieved using `layer.get('stac')`.
208
+ *
209
+ * @extends LayerGroup
210
+ * @fires sourceready
211
+ * @fires assetsready
212
+ * @fires ErorEvent#event:error
213
+ * @api
214
+ */
215
+ declare class STACLayer extends LayerGroup {
216
+ /**
217
+ * @param {Options} options Layer options.
218
+ * @api
219
+ */
220
+ constructor(options: Options);
221
+ /**
222
+ * @type {function(SourceType, SourceOptions, (Asset|Link)):(SourceOptions|Promise<SourceOptions>)}
223
+ * @private
224
+ */
225
+ private getSourceOptions_;
226
+ /**
227
+ * @type {STAC|Asset}
228
+ * @private
229
+ */
230
+ private data_;
231
+ /**
232
+ * @type {Array<Asset> | null}
233
+ * @private
234
+ */
235
+ private assets_;
236
+ /**
237
+ * @type {Array<number>}
238
+ * @private
239
+ */
240
+ private bands_;
241
+ /**
242
+ * @type {string | null}
243
+ * @private
244
+ */
245
+ private crossOrigin_;
246
+ /**
247
+ * @type {boolean}
248
+ * @private
249
+ */
250
+ private displayFootprint_;
251
+ /**
252
+ * @type {boolean}
253
+ * @private
254
+ */
255
+ private displayGeoTiffByDefault_;
256
+ /**
257
+ * @type {boolean}
258
+ * @private
259
+ */
260
+ private displayPreview_;
261
+ /**
262
+ * @type {boolean}
263
+ * @private
264
+ */
265
+ private displayOverview_;
266
+ /**
267
+ * @type {string|boolean}
268
+ */
269
+ displayWebMapLink_: string | boolean;
270
+ /**
271
+ * @type {function(Asset):string|null}
272
+ * @private
273
+ */
274
+ private buildTileUrlTemplate_;
275
+ /**
276
+ * @type {boolean}
277
+ * @private
278
+ */
279
+ private useTileLayerAsFallback_;
280
+ /**
281
+ * @type {Style}
282
+ * @private
283
+ */
284
+ private boundsStyle_;
285
+ /**
286
+ * @type {Style}
287
+ * @private
288
+ */
289
+ private collectionStyle_;
290
+ /**
291
+ * @type {VectorLayer|null}
292
+ * @private
293
+ */
294
+ private boundsLayer_;
295
+ /**
296
+ * Returns the vector layer that visualizes the bounds / footprint.
297
+ * @return {VectorLayer|null} The vector layer for the bounds
298
+ * @api
299
+ */
300
+ getBoundsLayer(): VectorLayer<any> | null;
301
+ /**
302
+ * @private
303
+ * @param {Error} error The error.
304
+ */
305
+ private handleError_;
306
+ /**
307
+ * @private
308
+ * @param {STAC|Asset|Object} data The STAC data.
309
+ * @param {string} url The url to the data.
310
+ * @param {Array<Asset|string> | null} assets The assets to show.
311
+ * @param {Array<number>} bands The (one-based) bands to show.
312
+ */
313
+ private configure_;
314
+ /**
315
+ * @private
316
+ * @return {Promise} Resolves when complete.
317
+ */
318
+ private addApiCollection_;
319
+ /**
320
+ * @private
321
+ * @return {Promise} Resolves when complete.
322
+ */
323
+ private addStacAssets_;
324
+ /**
325
+ * @private
326
+ * @param {Asset|Link} [ref] A STAC Link or Asset
327
+ * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
328
+ */
329
+ private addImagery_;
330
+ /**
331
+ * @private
332
+ * @param {Asset|Link} [thumbnail] A STAC Link or Asset
333
+ * @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
334
+ */
335
+ private addThumbnail_;
336
+ /**
337
+ * Adds a layer for the web map links available in the STAC links.
338
+ * @return {Promise<Array<Layer>|undefined>} Resolves with a Layer or undefined when complete.
339
+ */
340
+ addWebMapLinks_(): Promise<Array<Layer> | undefined>;
341
+ /**
342
+ * Adds a layer for a link that implements the web-map-links extension.
343
+ * Supports: PMTiles, TileJSON, WMS, WMTS, XYZ
344
+ * @see https://github.com/stac-extensions/web-map-links
345
+ * @param {Link} link A web map link
346
+ * @return {Promise<Array<Layer>|undefined>} Resolves with a list of layers or undefined when complete.
347
+ * @api
348
+ */
349
+ addLayerForLink(link: any): Promise<Array<Layer> | undefined>;
350
+ /**
351
+ * @private
352
+ * @param {Asset} [asset] A STAC Asset
353
+ * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
354
+ */
355
+ private addGeoTiff_;
356
+ /**
357
+ * @private
358
+ * @param {Asset|Link} [data] A STAC Asset or Link
359
+ * @return {Promise<TileLayer>} Resolves with a TileLayer when complete.
360
+ */
361
+ private addTileLayerForImagery_;
362
+ /**
363
+ * @param {Layer|LayerGroup} [layer] A Layer to add to the LayerGroup
364
+ * @param {import("stac-js").STACObject} [data] The STAC object, can be any class exposed by stac-js
365
+ * @param {number} [zIndex=0] The z-index for the layer
366
+ * @private
367
+ */
368
+ private addLayer_;
369
+ /**
370
+ * @private
371
+ * @return {VectorLayer|null} The vector layer showing the geometry/bbox.
372
+ */
373
+ private addFootprint_;
374
+ /**
375
+ * @private
376
+ */
377
+ private updateLayers_;
378
+ /**
379
+ * Indicates whether the LayerGroup shows only the bounds layer (i.e. no imagery/tile layers).
380
+ * @return {boolean} `true` if only the bounds layer is shown, `false` otherwise.
381
+ * @api
382
+ */
383
+ hasOnlyBounds(): boolean;
384
+ /**
385
+ * Returns all potential web map links based on the given value for `displayWebMapLink`.
386
+ * @return {Array<Link>} An array of links.
387
+ * @api
388
+ */
389
+ getWebMapLinks(): Array<Link>;
390
+ /**
391
+ * Update the assets to be rendered.
392
+ * @param {Array<string|Asset>|null} assets The assets to show.
393
+ * @return {Promise} Resolves when all assets are rendered.
394
+ * @api
395
+ */
396
+ setAssets(assets: Array<string | Asset> | null): Promise<any>;
397
+ /**
398
+ * Get the STAC object.
399
+ *
400
+ * @return {STAC|Asset} The STAC object.
401
+ * @api
402
+ */
403
+ getData(): STAC | Asset;
404
+ /**
405
+ * Get the STAC assets shown.
406
+ *
407
+ * @return {Array<Asset>} The STAC assets.
408
+ * @api
409
+ */
410
+ getAssets(): Array<Asset>;
411
+ }
412
+ import SourceType from '../source/type.js';
413
+ import LayerGroup from 'ol/layer/Group.js';
414
+ import VectorLayer from 'ol/layer/Vector.js';
415
+ //# sourceMappingURL=STAC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STAC.d.ts","sourceRoot":"","sources":["../../../src/ol/layer/STAC.js"],"names":[],"mappings":";qBAoCa,OAAO,cAAc,EAAE,MAAM;oBAG7B,OAAO,aAAa,EAAE,KAAK;;oBAM3B,OAAO,aAAa,EAAE,KAAK;4BAG3B,OAAO,mBAAmB,EAAE,aAAa;;;;;;;;;;;WAOxC,kBAAiB;;;;;;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