ol-stac 1.0.0-beta.8 → 1.0.0-rc.1

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/README.md CHANGED
@@ -15,6 +15,8 @@ Explore the examples to get started with some more code:
15
15
  Dig into the API documentation for all details:
16
16
  <https://m-mohr.github.io/ol-stac/en/latest/apidoc/>
17
17
 
18
+ **ol-stac requires OpenLayers version >=7.5.2**
19
+
18
20
  ## Sponsors
19
21
 
20
22
  ol-stac appreciates contributions of all kinds.
package/layer/STAC.d.ts CHANGED
@@ -15,6 +15,11 @@ export type Options = {
15
15
  * `data` take precedence over `url`.
16
16
  */
17
17
  data?: STAC | Asset | any;
18
+ /**
19
+ * For STAC Catalogs and Collections, any child entites
20
+ * to show. Can be STAC ItemCollections (as ItemCollection, GeoJSON FeatureCollection, or URL) or a list of STAC entities.
21
+ */
22
+ children?: ItemCollection | any | Array<STAC> | string | null;
18
23
  /**
19
24
  * The selector for the assets to be rendered,
20
25
  * only for STAC Items and Collections.
@@ -45,29 +50,32 @@ export type Options = {
45
50
  */
46
51
  displayGeoTiffByDefault?: boolean | undefined;
47
52
  /**
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`.
53
+ * Allow to display preview images that a browser can display (e.g. PNG, JPEG),
54
+ * i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
50
55
  * 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.
56
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
52
57
  */
53
58
  displayPreview?: boolean | undefined;
54
59
  /**
55
60
  * Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
56
- * usually the assets with role `overview` or `visual`.
61
+ * usually an asset with role `overview` or `visual`.
57
62
  */
58
63
  displayOverview?: boolean | undefined;
59
64
  /**
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`).
65
+ * Allow to display a layer
66
+ * based on the information provided through the web map links extension.
67
+ * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
68
+ * If set to true or to a specific type of web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`),
69
+ * it lets this library choose a web map link to show, but only if no other data is shown.
70
+ * To disable the functionality set this to `false`.
63
71
  */
64
- displayWebMapLink?: string | boolean | undefined;
72
+ displayWebMapLink?: string | boolean | any[] | undefined;
65
73
  /**
66
74
  * The style for the overall bounds / footprint.
67
75
  */
68
76
  boundsStyle?: import("ol/style/Style.js").default | undefined;
69
77
  /**
70
- * The style for individual items in a list of STAC Items or Collections.
78
+ * The style for individual children in a list of STAC Items or Collections.
71
79
  */
72
80
  collectionStyle?: import("ol/style/Style.js").default | undefined;
73
81
  /**
@@ -130,6 +138,11 @@ export type Options = {
130
138
  properties?: {
131
139
  [x: string]: any;
132
140
  } | undefined;
141
+ /**
142
+ * Disable the migration of the STAC object to the latest version.
143
+ * Only enable this if you are sure that the STAC object is already in the latest version.
144
+ */
145
+ disableMigration?: boolean | undefined;
133
146
  };
134
147
  /**
135
148
  * @typedef {import("ol/extent.js").Extent} Extent
@@ -152,6 +165,8 @@ export type Options = {
152
165
  * Can also be used as url for data, if it is absolute and doesn't contain a self link.
153
166
  * @property {STAC|Asset|Object} [data] The STAC metadata. Any of `url` and `data` must be provided.
154
167
  * `data` take precedence over `url`.
168
+ * @property {ItemCollection|Object|Array<STAC>|string|null} [children=null] For STAC Catalogs and Collections, any child entites
169
+ * to show. Can be STAC ItemCollections (as ItemCollection, GeoJSON FeatureCollection, or URL) or a list of STAC entities.
155
170
  * @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
156
171
  * only for STAC Items and Collections.
157
172
  * This can be an array of strings corresponding to asset keys or Asset objects.
@@ -167,17 +182,20 @@ export type Options = {
167
182
  * by default.
168
183
  * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
169
184
  * 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`.
185
+ * @property {boolean} [displayPreview=false] Allow to display preview images that a browser can display (e.g. PNG, JPEG),
186
+ * i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
172
187
  * 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.
188
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
174
189
  * @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`).
190
+ * usually an asset with role `overview` or `visual`.
191
+ * @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
192
+ * based on the information provided through the web map links extension.
193
+ * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
194
+ * If set to true or to a specific type of web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`),
195
+ * it lets this library choose a web map link to show, but only if no other data is shown.
196
+ * To disable the functionality set this to `false`.
179
197
  * @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.
198
+ * @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
181
199
  * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
182
200
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
183
201
  * @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
@@ -200,6 +218,8 @@ export type Options = {
200
218
  * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
201
219
  * be visible.
202
220
  * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
221
+ * @property {boolean} [disableMigration=false] Disable the migration of the STAC object to the latest version.
222
+ * Only enable this if you are sure that the STAC object is already in the latest version.
203
223
  */
204
224
  /**
205
225
  * @classdesc
@@ -224,12 +244,12 @@ declare class STACLayer extends LayerGroup {
224
244
  */
225
245
  private getSourceOptions_;
226
246
  /**
227
- * @type {STAC|Asset}
247
+ * @type {Array<STAC>|null}
228
248
  * @private
229
249
  */
230
- private data_;
250
+ private children_;
231
251
  /**
232
- * @type {Array<Asset> | null}
252
+ * @type {Array<Asset>|null}
233
253
  * @private
234
254
  */
235
255
  private assets_;
@@ -239,7 +259,7 @@ declare class STACLayer extends LayerGroup {
239
259
  */
240
260
  private bands_;
241
261
  /**
242
- * @type {string | null}
262
+ * @type {string|null}
243
263
  * @private
244
264
  */
245
265
  private crossOrigin_;
@@ -264,9 +284,9 @@ declare class STACLayer extends LayerGroup {
264
284
  */
265
285
  private displayOverview_;
266
286
  /**
267
- * @type {string|boolean}
287
+ * @type {string|boolean|Array<Link|string>}
268
288
  */
269
- displayWebMapLink_: string | boolean;
289
+ displayWebMapLink_: string | boolean | Array<Link | string>;
270
290
  /**
271
291
  * @type {function(Asset):string|null}
272
292
  * @private
@@ -292,12 +312,17 @@ declare class STACLayer extends LayerGroup {
292
312
  * @private
293
313
  */
294
314
  private boundsLayer_;
315
+ /**
316
+ * @type {boolean}
317
+ * @private
318
+ */
319
+ private disableMigration_;
295
320
  /**
296
321
  * Returns the vector layer that visualizes the bounds / footprint.
297
322
  * @return {VectorLayer|null} The vector layer for the bounds
298
323
  * @api
299
324
  */
300
- getBoundsLayer(): VectorLayer<any> | null;
325
+ getBoundsLayer(): VectorLayer | null;
301
326
  /**
302
327
  * @private
303
328
  * @param {Error} error The error.
@@ -307,15 +332,18 @@ declare class STACLayer extends LayerGroup {
307
332
  * @private
308
333
  * @param {STAC|Asset|Object} data The STAC data.
309
334
  * @param {string} url The url to the data.
310
- * @param {Array<Asset|string> | null} assets The assets to show.
335
+ * @param {ItemCollection|Object|Array<STAC>|string|null} children The child STAC entities to show.
336
+ * @param {Array<Asset|string>|null} assets The assets to show.
311
337
  * @param {Array<number>} bands The (one-based) bands to show.
312
338
  */
313
339
  private configure_;
314
340
  /**
315
341
  * @private
342
+ * @param {Array<STAC>} collection The list of STAC entities to show.
343
+ * @param {STAC} data The parent STAC object.
316
344
  * @return {Promise} Resolves when complete.
317
345
  */
318
- private addApiCollection_;
346
+ private addChildren_;
319
347
  /**
320
348
  * @private
321
349
  * @return {Promise} Resolves when complete.
@@ -323,16 +351,10 @@ declare class STACLayer extends LayerGroup {
323
351
  private addStacAssets_;
324
352
  /**
325
353
  * @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
354
+ * @param {Asset|Link} [image] A STAC Link or Asset
333
355
  * @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
334
356
  */
335
- private addThumbnail_;
357
+ private addPreviewImage_;
336
358
  /**
337
359
  * Adds a layer for the web map links available in the STAC links.
338
360
  * @return {Promise<Array<Layer>|undefined>} Resolves with a Layer or undefined when complete.
@@ -394,6 +416,13 @@ declare class STACLayer extends LayerGroup {
394
416
  * @api
395
417
  */
396
418
  setAssets(assets: Array<string | Asset> | null): Promise<any>;
419
+ /**
420
+ * Updates the children STAC entities to be rendered.
421
+ * @param {ItemCollection|Object|Array<STAC>|string|null} childs The children to show.
422
+ * @return {Promise} Resolves when all items are rendered.
423
+ * @api
424
+ */
425
+ setChildren(childs: ItemCollection | any | Array<STAC> | string | null): Promise<any>;
397
426
  /**
398
427
  * Get the STAC object.
399
428
  *
@@ -401,6 +430,13 @@ declare class STACLayer extends LayerGroup {
401
430
  * @api
402
431
  */
403
432
  getData(): STAC | Asset;
433
+ /**
434
+ * Get the children STAC entities.
435
+ *
436
+ * @return {STAC} The STAC child entities.
437
+ * @api
438
+ */
439
+ getChildren(): STAC;
404
440
  /**
405
441
  * Get the STAC assets shown.
406
442
  *
@@ -408,6 +444,18 @@ declare class STACLayer extends LayerGroup {
408
444
  * @api
409
445
  */
410
446
  getAssets(): Array<Asset>;
447
+ /**
448
+ * Get the attributions of the STAC entity assigned to this layer.
449
+ *
450
+ * @return {Array<string>} Attributions for this layer.
451
+ * @api
452
+ */
453
+ getAttributions(): Array<string>;
454
+ /**
455
+ * Get the layer source.
456
+ * @return {SourceType|null} The layer source (or `null` if not yet set).
457
+ */
458
+ getSource(): SourceType | null;
411
459
  }
412
460
  import SourceType from '../source/type.js';
413
461
  import LayerGroup from 'ol/layer/Group.js';
@@ -1 +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;;;;;;;;;;;;;;;;;;;+BAOR,UAAU,QAAE,aAAa,QAAE,CAAC,QAAM,IAAI,CAAC,KAAE,CAAC,aAAa,GAAC,QAAQ,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAuBxE,MAAM,GAAC,IAAI;;;;;;;;;;;;;;;;;;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AED;;;OAGG;IACH,aAFY,UAAU,GAAC,IAAI,CAI1B;CACF;uBAp8BsB,mBAAmB;uBADnB,mBAAmB;wBAKlB,oBAAoB"}
package/layer/STAC.js CHANGED
@@ -4,7 +4,7 @@
4
4
  import * as pmtiles from 'pmtiles';
5
5
  import ErrorEvent from '../events/ErrorEvent.js';
6
6
  import GeoJSON from 'ol/format/GeoJSON.js';
7
- import GeoTIFF from '../source/GeoTIFF2.js';
7
+ import GeoTIFF from 'ol/source/GeoTIFF.js';
8
8
  import ImageLayer from 'ol/layer/Image.js';
9
9
  import LayerGroup from 'ol/layer/Group.js';
10
10
  import SourceType from '../source/type.js';
@@ -19,7 +19,7 @@ import WMS from 'ol/source/TileWMS.js';
19
19
  import WMTS, { optionsFromCapabilities } from 'ol/source/WMTS.js';
20
20
  import WebGLTileLayer from 'ol/layer/WebGLTile.js';
21
21
  import XYZ from 'ol/source/XYZ.js';
22
- import create, { Asset, STAC } from 'stac-js';
22
+ import create, { Asset, ItemCollection, STAC } from 'stac-js';
23
23
  import { PMTilesRasterSource, PMTilesVectorSource } from 'ol-pmtiles';
24
24
  import { defaultBoundsStyle, defaultCollectionStyle, getBoundsStyle, getGeoTiffSourceInfoFromAsset, getProjection, getSpecificWebMapUrl, getWmtsCapabilities, } from '../util.js';
25
25
  import { toGeoJSON } from 'stac-js/src/geo.js';
@@ -45,6 +45,8 @@ import { transformExtent } from 'ol/proj.js';
45
45
  * Can also be used as url for data, if it is absolute and doesn't contain a self link.
46
46
  * @property {STAC|Asset|Object} [data] The STAC metadata. Any of `url` and `data` must be provided.
47
47
  * `data` take precedence over `url`.
48
+ * @property {ItemCollection|Object|Array<STAC>|string|null} [children=null] For STAC Catalogs and Collections, any child entites
49
+ * to show. Can be STAC ItemCollections (as ItemCollection, GeoJSON FeatureCollection, or URL) or a list of STAC entities.
48
50
  * @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
49
51
  * only for STAC Items and Collections.
50
52
  * This can be an array of strings corresponding to asset keys or Asset objects.
@@ -60,17 +62,20 @@ import { transformExtent } from 'ol/proj.js';
60
62
  * by default.
61
63
  * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
62
64
  * which might not work well for larger files or larger amounts of files.
63
- * @property {boolean} [displayPreview=false] Allow to display images that a browser can display (e.g. PNG, JPEG),
64
- * usually assets with role `thumbnail` or the link with relation type `preview`.
65
+ * @property {boolean} [displayPreview=false] Allow to display preview images that a browser can display (e.g. PNG, JPEG),
66
+ * i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
65
67
  * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
66
- * For performance reasons, it is recommended to enable this option if you pass in STAC API Items.
68
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
67
69
  * @property {boolean} [displayOverview=true] Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
68
- * usually the assets with role `overview` or `visual`.
69
- * @property {string|boolean} [displayWebMapLink=false] Allow to display a layer based on the information provided through the
70
- * web map links extension. It is only used if no other data is shown. You can set a specific type of
71
- * web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`), let OpenLayers choose (`true`) or disable the functionality (`false`).
70
+ * usually an asset with role `overview` or `visual`.
71
+ * @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
72
+ * based on the information provided through the web map links extension.
73
+ * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
74
+ * If set to true or to a specific type of web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`),
75
+ * it lets this library choose a web map link to show, but only if no other data is shown.
76
+ * To disable the functionality set this to `false`.
72
77
  * @property {Style} [boundsStyle] The style for the overall bounds / footprint.
73
- * @property {Style} [collectionStyle] The style for individual items in a list of STAC Items or Collections.
78
+ * @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
74
79
  * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
75
80
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
76
81
  * @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
@@ -93,6 +98,8 @@ import { transformExtent } from 'ol/proj.js';
93
98
  * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
94
99
  * be visible.
95
100
  * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
101
+ * @property {boolean} [disableMigration=false] Disable the migration of the STAC object to the latest version.
102
+ * Only enable this if you are sure that the STAC object is already in the latest version.
96
103
  */
97
104
  /**
98
105
  * @classdesc
@@ -129,12 +136,12 @@ class STACLayer extends LayerGroup {
129
136
  */
130
137
  this.getSourceOptions_ = options.getSourceOptions;
131
138
  /**
132
- * @type {STAC|Asset}
139
+ * @type {Array<STAC>|null}
133
140
  * @private
134
141
  */
135
- this.data_;
142
+ this.children_ = null;
136
143
  /**
137
- * @type {Array<Asset> | null}
144
+ * @type {Array<Asset>|null}
138
145
  * @private
139
146
  */
140
147
  this.assets_ = null;
@@ -144,7 +151,7 @@ class STACLayer extends LayerGroup {
144
151
  */
145
152
  this.bands_ = [];
146
153
  /**
147
- * @type {string | null}
154
+ * @type {string|null}
148
155
  * @private
149
156
  */
150
157
  this.crossOrigin_ = options.crossOrigin || null;
@@ -169,7 +176,7 @@ class STACLayer extends LayerGroup {
169
176
  */
170
177
  this.displayOverview_ = options.displayOverview === false ? false : true;
171
178
  /**
172
- * @type {string|boolean}
179
+ * @type {string|boolean|Array<Link|string>}
173
180
  */
174
181
  this.displayWebMapLink_ = options.displayWebMapLink || false;
175
182
  /**
@@ -197,9 +204,14 @@ class STACLayer extends LayerGroup {
197
204
  * @private
198
205
  */
199
206
  this.boundsLayer_ = null;
207
+ /**
208
+ * @type {boolean}
209
+ * @private
210
+ */
211
+ this.disableMigration_ = options.disableMigration || false;
200
212
  if (options.data) {
201
213
  try {
202
- this.configure_(options.data, options.url, options.assets, options.bands);
214
+ this.configure_(options.data, options.url, options.children, options.assets, options.bands);
203
215
  }
204
216
  catch (error) {
205
217
  this.handleError_(error);
@@ -211,7 +223,7 @@ class STACLayer extends LayerGroup {
211
223
  }
212
224
  fetch(options.url)
213
225
  .then((response) => response.json())
214
- .then((data) => this.configure_(data, options.url, options.assets, options.bands))
226
+ .then((data) => this.configure_(data, options.url, options.children, options.assets, options.bands))
215
227
  .catch((error) => this.handleError_(error));
216
228
  }
217
229
  /**
@@ -240,19 +252,22 @@ class STACLayer extends LayerGroup {
240
252
  * @private
241
253
  * @param {STAC|Asset|Object} data The STAC data.
242
254
  * @param {string} url The url to the data.
243
- * @param {Array<Asset|string> | null} assets The assets to show.
255
+ * @param {ItemCollection|Object|Array<STAC>|string|null} children The child STAC entities to show.
256
+ * @param {Array<Asset|string>|null} assets The assets to show.
244
257
  * @param {Array<number>} bands The (one-based) bands to show.
245
258
  */
246
- configure_(data, url = null, assets = null, bands = []) {
259
+ configure_(data, url = null, children = null, assets = null, bands = []) {
260
+ let stac;
247
261
  if (data instanceof Asset || data instanceof STAC) {
248
- this.data_ = data;
262
+ stac = data;
249
263
  }
250
264
  else {
251
- this.data_ = create(data);
265
+ stac = create(data, !this.disableMigration_);
252
266
  }
253
267
  if (url && url.includes('://')) {
254
- this.data_.setAbsoluteUrl(url);
268
+ stac.setAbsoluteUrl(url);
255
269
  }
270
+ this.set('stac', stac);
256
271
  this.bands_ = bands;
257
272
  this.boundsLayer_ = this.addFootprint_();
258
273
  const updateBoundsStyle = () => {
@@ -262,6 +277,16 @@ class STACLayer extends LayerGroup {
262
277
  };
263
278
  this.getLayers().on('add', updateBoundsStyle);
264
279
  this.getLayers().on('remove', updateBoundsStyle);
280
+ this.setChildren(children)
281
+ .then(() => {
282
+ /**
283
+ * Invoked once the child STAC entites are loaded and shown on the map.
284
+ *
285
+ * @event childrenready
286
+ */
287
+ return this.dispatchEvent('childrenready');
288
+ })
289
+ .catch((error) => this.handleError_(error));
265
290
  this.setAssets(assets)
266
291
  .then(() => {
267
292
  /**
@@ -283,12 +308,12 @@ class STACLayer extends LayerGroup {
283
308
  }
284
309
  /**
285
310
  * @private
311
+ * @param {Array<STAC>} collection The list of STAC entities to show.
312
+ * @param {STAC} data The parent STAC object.
286
313
  * @return {Promise} Resolves when complete.
287
314
  */
288
- async addApiCollection_() {
289
- const promises = this.getData()
290
- .getAll()
291
- .map((obj) => {
315
+ async addChildren_(collection, data = null) {
316
+ const promises = collection.map((obj) => {
292
317
  const subgroup = new STACLayer({
293
318
  data: obj,
294
319
  crossOrigin: this.crossOrigin_,
@@ -298,7 +323,7 @@ class STACLayer extends LayerGroup {
298
323
  displayPreview: this.displayPreview_,
299
324
  displayFootprint: this.displayFootprint_,
300
325
  });
301
- this.addLayer_(subgroup);
326
+ this.addLayer_(subgroup, data);
302
327
  return subgroup;
303
328
  });
304
329
  return await Promise.all(promises);
@@ -309,65 +334,66 @@ class STACLayer extends LayerGroup {
309
334
  */
310
335
  async addStacAssets_() {
311
336
  let assets = this.getAssets();
337
+ // No assets provided by the user, guess a sensible default visualization
312
338
  if (assets === null) {
313
339
  assets = [];
314
340
  // No specific asset given by the user, visualize the default geotiff
315
341
  const geotiff = this.getData().getDefaultGeoTIFF(true, !this.displayGeoTiffByDefault_);
316
- if (geotiff) {
317
- assets.push(geotiff);
342
+ let layer;
343
+ // Try to visualize the default GeoTIFF first
344
+ if (geotiff && this.displayOverview_) {
345
+ layer = await this.addGeoTiff_(geotiff);
318
346
  }
319
- else {
347
+ // If no GeoTIFF is available or it can't be shown (e.g. error),
348
+ // try to visualize the default thumbnail
349
+ if (this.displayPreview_ && (!geotiff || !layer)) {
320
350
  // This may return Links or Assets
321
- const thumbnails = this.getData().getThumbnails();
351
+ const thumbnails = this.getData().getThumbnails(true, 'overview');
322
352
  if (thumbnails.length > 0) {
323
- assets.push(thumbnails[0]);
353
+ await this.addPreviewImage_(thumbnails[0]);
324
354
  }
325
355
  }
326
356
  }
327
- const promises = assets.map((asset) => this.addImagery_(asset));
357
+ // Show the assets provided by the user
358
+ const promises = assets.map(async (ref) => {
359
+ if (ref && ref.isGeoTIFF()) {
360
+ return await this.addGeoTiff_(ref);
361
+ }
362
+ if (ref && ref.canBrowserDisplayImage()) {
363
+ return await this.addPreviewImage_(ref);
364
+ }
365
+ });
328
366
  return await Promise.all(promises);
329
367
  }
330
368
  /**
331
369
  * @private
332
- * @param {Asset|Link} [ref] A STAC Link or Asset
333
- * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
334
- */
335
- async addImagery_(ref) {
336
- if (!ref) {
337
- return;
338
- }
339
- if (ref.isGeoTIFF()) {
340
- return await this.addGeoTiff_(ref);
341
- }
342
- if (ref.canBrowserDisplayImage()) {
343
- return await this.addThumbnail_(ref);
344
- }
345
- }
346
- /**
347
- * @private
348
- * @param {Asset|Link} [thumbnail] A STAC Link or Asset
370
+ * @param {Asset|Link} [image] A STAC Link or Asset
349
371
  * @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
350
372
  */
351
- async addThumbnail_(thumbnail) {
352
- if (!this.displayPreview_) {
373
+ async addPreviewImage_(image) {
374
+ const projection = await getProjection(image, 'EPSG:4326');
375
+ const bboxes = image.getContext().getBoundingBoxes();
376
+ if (bboxes.length !== 1) {
353
377
  return;
354
378
  }
379
+ const bbox = bboxes[0];
355
380
  /**
356
381
  * @type {import("ol/source/ImageStatic.js").Options}
357
382
  */
358
383
  let options = {
359
- url: thumbnail.getAbsoluteUrl(),
360
- projection: await getProjection(thumbnail, 'EPSG:4326'),
361
- imageExtent: thumbnail.getContext().getBoundingBox(),
384
+ url: image.getAbsoluteUrl(),
385
+ projection,
386
+ imageExtent: transformExtent(bbox, 'EPSG:4326', projection),
362
387
  crossOrigin: this.crossOrigin_,
363
388
  };
364
389
  if (this.getSourceOptions_) {
365
- options = await this.getSourceOptions_(SourceType.ImageStatic, options, thumbnail);
390
+ // @ts-ignore
391
+ options = await this.getSourceOptions_(SourceType.ImageStatic, options, image);
366
392
  }
367
393
  const layer = new ImageLayer({
368
394
  source: new StaticImage(options),
369
395
  });
370
- this.addLayer_(layer, thumbnail);
396
+ this.addLayer_(layer, image);
371
397
  return layer;
372
398
  }
373
399
  /**
@@ -396,7 +422,7 @@ class STACLayer extends LayerGroup {
396
422
  }
397
423
  const options = {
398
424
  attributions: link.getMetadata('attribution') ||
399
- this.data_.getMetadata('attribution'),
425
+ this.getData().getMetadata('attribution'),
400
426
  crossOrigin: this.crossOrigin_,
401
427
  url,
402
428
  };
@@ -435,8 +461,8 @@ class STACLayer extends LayerGroup {
435
461
  break;
436
462
  }
437
463
  for (const i in link['wms:layers']) {
438
- const layers = link['wms:layers'][i];
439
- let styles;
464
+ const layers = link['wms:layers'][i] || '';
465
+ let styles = '';
440
466
  if (Array.isArray(link['wms:styles']) &&
441
467
  typeof link['wms:styles'][i] === 'string') {
442
468
  styles = link['wms:styles'][i];
@@ -504,15 +530,12 @@ class STACLayer extends LayerGroup {
504
530
  * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
505
531
  */
506
532
  async addGeoTiff_(asset) {
507
- if (!this.displayOverview_) {
508
- return;
509
- }
510
533
  if (this.buildTileUrlTemplate_ && !this.useTileLayerAsFallback_) {
511
534
  return await this.addTileLayerForImagery_(asset);
512
535
  }
513
536
  const sourceInfo = getGeoTiffSourceInfoFromAsset(asset, this.bands_);
514
537
  /**
515
- * @type {import("../source/GeoTIFF2.js").Options2}
538
+ * @type {import("ol/source/GeoTIFF.js").Options}
516
539
  */
517
540
  let options = {
518
541
  sources: [sourceInfo],
@@ -522,37 +545,31 @@ class STACLayer extends LayerGroup {
522
545
  options.projection = projection;
523
546
  }
524
547
  if (this.getSourceOptions_) {
548
+ // @ts-ignore
525
549
  options = await this.getSourceOptions_(SourceType.GeoTIFF, options, asset);
526
550
  }
527
- const tileserverFallback = async (asset, layer) => {
528
- if (layer) {
529
- this.getLayers().remove(layer);
530
- }
531
- return await this.addTileLayerForImagery_(asset);
532
- };
551
+ const source = new GeoTIFF(options);
552
+ const status = new Promise((resolve, reject) => {
553
+ source.on('error', reject);
554
+ source.on('change', () => {
555
+ // see https://github.com/openlayers/openlayers/issues/14926
556
+ if (source.getState() === 'error') {
557
+ reject(source.getError());
558
+ }
559
+ else {
560
+ resolve();
561
+ }
562
+ });
563
+ });
533
564
  try {
534
- const source = new GeoTIFF(options);
565
+ await status;
535
566
  const layer = new WebGLTileLayer({ source });
536
- if (this.useTileLayerAsFallback_) {
537
- const errorFn = () => tileserverFallback(asset, layer);
538
- source.on('error', errorFn);
539
- source.on('tileloaderror', errorFn);
540
- // see https://github.com/openlayers/openlayers/issues/14926
541
- source.on('change', () => {
542
- if (source.getState() === 'error') {
543
- tileserverFallback(asset, layer);
544
- }
545
- });
546
- layer.on('error', errorFn);
547
- // Call this to ensure we can load the GeoTIFF, otherwise try fallback
548
- await source.getView();
549
- }
550
567
  this.addLayer_(layer, asset);
551
568
  return layer;
552
569
  }
553
570
  catch (error) {
554
571
  if (this.useTileLayerAsFallback_) {
555
- return await tileserverFallback(asset, null);
572
+ return await this.addTileLayerForImagery_(asset);
556
573
  }
557
574
  this.handleError_(error);
558
575
  }
@@ -611,9 +628,6 @@ class STACLayer extends LayerGroup {
611
628
  const features = format.readFeatures(geojson, {
612
629
  featureProjection: projection,
613
630
  });
614
- // An issue in OL 8.2.0 makes this line fail in linting, disable it for now
615
- // https://github.com/openlayers/openlayers/pull/15338
616
- // @ts-ignore
617
631
  source.addFeatures(features);
618
632
  },
619
633
  });
@@ -636,22 +650,25 @@ class STACLayer extends LayerGroup {
636
650
  const oldLayers = this.getLayers();
637
651
  for (let i = oldLayers.getLength() - 1; i >= 0; i--) {
638
652
  const layer = oldLayers.item(i);
639
- const stac = layer.get('stac');
640
- if (stac && (stac.isLink() || stac.isAsset())) {
653
+ if (layer.get('stac') && !layer.get('bounds')) {
641
654
  oldLayers.removeAt(i);
642
655
  }
643
656
  }
644
657
  // Add new layers
645
658
  const data = this.getData();
646
659
  if (data.isItemCollection() || data.isCollectionCollection()) {
647
- await this.addApiCollection_();
660
+ await this.addChildren_(this.getData().getAll(), this.getData());
648
661
  }
649
662
  else if (data.isItem() || data.isCollection()) {
650
663
  await this.addStacAssets_();
651
664
  }
652
- if (this.displayWebMapLink_ && this.hasOnlyBounds()) {
665
+ if (this.displayWebMapLink_ &&
666
+ (Array.isArray(this.displayWebMapLink_) || this.hasOnlyBounds())) {
653
667
  await this.addWebMapLinks_();
654
668
  }
669
+ if (this.children_) {
670
+ await this.addChildren_(this.children_, this.getData());
671
+ }
655
672
  }
656
673
  /**
657
674
  * Indicates whether the LayerGroup shows only the bounds layer (i.e. no imagery/tile layers).
@@ -673,13 +690,29 @@ class STACLayer extends LayerGroup {
673
690
  if (typeof this.displayWebMapLink_ === 'string') {
674
691
  types = [this.displayWebMapLink_];
675
692
  }
676
- const links = this.data_.getLinksWithRels(types);
677
- links.sort((a, b) => {
678
- const prioA = types.indexOf(a.rel);
679
- const prioB = types.indexOf(b.rel);
680
- return prioA - prioB;
681
- });
682
- return links;
693
+ let mapLinks = this.getData().getLinksWithRels(types);
694
+ if (Array.isArray(this.displayWebMapLink_)) {
695
+ mapLinks = this.displayWebMapLink_
696
+ .map((link) => {
697
+ if (typeof link === 'string') {
698
+ const match = mapLinks.find((candidate) => candidate.id === link);
699
+ if (match) {
700
+ return match;
701
+ }
702
+ return null;
703
+ }
704
+ return link;
705
+ })
706
+ .filter((link) => !!link);
707
+ }
708
+ else {
709
+ mapLinks.sort((a, b) => {
710
+ const prioA = types.indexOf(a.rel);
711
+ const prioB = types.indexOf(b.rel);
712
+ return prioA - prioB;
713
+ });
714
+ }
715
+ return mapLinks;
683
716
  }
684
717
  /**
685
718
  * Update the assets to be rendered.
@@ -704,6 +737,44 @@ class STACLayer extends LayerGroup {
704
737
  }
705
738
  await this.updateLayers_();
706
739
  }
740
+ /**
741
+ * Updates the children STAC entities to be rendered.
742
+ * @param {ItemCollection|Object|Array<STAC>|string|null} childs The children to show.
743
+ * @return {Promise} Resolves when all items are rendered.
744
+ * @api
745
+ */
746
+ async setChildren(childs) {
747
+ if (!childs) {
748
+ this.children_ = null;
749
+ return;
750
+ }
751
+ if (typeof childs === 'string') {
752
+ const response = await fetch(childs);
753
+ childs = await response.json();
754
+ }
755
+ if (typeof childs === 'object' && childs.type === 'FeatureCollection') {
756
+ childs = childs.features;
757
+ }
758
+ if (childs instanceof ItemCollection) {
759
+ this.children_ = childs.getAll();
760
+ }
761
+ else if (Array.isArray(childs)) {
762
+ childs = childs.map((child) => {
763
+ if (child instanceof STAC) {
764
+ return child;
765
+ }
766
+ return create(child);
767
+ });
768
+ this.children_ = childs;
769
+ }
770
+ else {
771
+ this.children_ = null; // Invalid input
772
+ }
773
+ if (this.children_ && this.children_.length === 0) {
774
+ this.children_ = null;
775
+ }
776
+ await this.updateLayers_();
777
+ }
707
778
  /**
708
779
  * Get the STAC object.
709
780
  *
@@ -711,7 +782,16 @@ class STACLayer extends LayerGroup {
711
782
  * @api
712
783
  */
713
784
  getData() {
714
- return this.data_;
785
+ return this.get('stac');
786
+ }
787
+ /**
788
+ * Get the children STAC entities.
789
+ *
790
+ * @return {STAC} The STAC child entities.
791
+ * @api
792
+ */
793
+ getChildren() {
794
+ return this.children_;
715
795
  }
716
796
  /**
717
797
  * Get the STAC assets shown.
@@ -752,6 +832,30 @@ class STACLayer extends LayerGroup {
752
832
  return transformExtent(bbox, 'EPSG:4326', view.getProjection());
753
833
  }
754
834
  }
835
+ /**
836
+ * Get the attributions of the STAC entity assigned to this layer.
837
+ *
838
+ * @return {Array<string>} Attributions for this layer.
839
+ * @api
840
+ */
841
+ getAttributions() {
842
+ const attribution = [];
843
+ const stac = this.getData();
844
+ if (stac) {
845
+ const attribution = stac.getMetadata('attribution');
846
+ if (attribution) {
847
+ attribution.push(attribution);
848
+ }
849
+ }
850
+ return attribution;
851
+ }
852
+ /**
853
+ * Get the layer source.
854
+ * @return {SourceType|null} The layer source (or `null` if not yet set).
855
+ */
856
+ getSource() {
857
+ return null;
858
+ }
755
859
  }
756
860
  export default STACLayer;
757
861
  //# sourceMappingURL=STAC.js.map
package/layer/STAC.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"STAC.js","sourceRoot":"","sources":["../../../src/ol/layer/STAC.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,OAAO,IAAI,EAAE,EAAC,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAChE,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,6BAA6B,EAC7B,aAAa,EACb,oBAAoB,EACpB,mBA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KG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS;QACP,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,OAAO;SACR;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC/C,IAAI,CAAC,GAAG,EAAE;YACR,OAAO;SACR;QAED,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACnC,IAAI,IAAI,EAAE;YACR,OAAO,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;SACjE;IACH,CAAC;IAED;;;;;OAKG;IACH,eAAe;QACb,MAAM,WAAW,GAAG,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,IAAI,EAAE;YACR,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;YACpD,IAAI,WAAW,EAAE;gBACf,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAC/B;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-stac",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "An \"automagical\" STAC LayerGroup for OpenLayers",
5
5
  "homepage": "https://mohr.ws",
6
6
  "license": "Apache-2.0",
@@ -13,12 +13,16 @@
13
13
  "bugs": {
14
14
  "url": "https://github.com/m-mohr/ol-stac/issues"
15
15
  },
16
+ "funding": {
17
+ "type": "github",
18
+ "url": "https://github.com/sponsors/m-mohr"
19
+ },
16
20
  "dependencies": {
17
21
  "ol-pmtiles": "^0.2.0",
18
- "stac-js": "0.0.8"
22
+ "stac-js": "0.1.0"
19
23
  },
20
24
  "peerDependencies": {
21
- "ol": ">=7.0.0"
25
+ "ol": "*"
22
26
  },
23
27
  "browserslist": [
24
28
  "> 1%",
package/source/type.d.ts CHANGED
@@ -1,42 +1,42 @@
1
1
  export default SourceType;
2
- export type GeoTIFFSourceOptions = import("./GeoTIFF2.js").Options2;
3
- export type ImageStaticSourceOptions = import("ol/source/ImageStatic.js").Options;
4
- export type TileJSONSourceOptions = import("ol/source/TileJSON.js").Options;
5
- export type TileWMSSourceOptions = import("ol/source/TileWMS.js").Options;
6
- export type WMTSSourceOptions = import("ol/source/WMTS.js").Options;
7
- export type XYZSourceOptions = import("ol/source/XYZ.js").Options;
8
- export type SourceOptions = GeoTIFFSourceOptions | ImageStaticSourceOptions | TileJSONSourceOptions | TileWMSSourceOptions | WMTSSourceOptions | XYZSourceOptions | {
2
+ export type GeoTIFFOptions = import("ol/source/GeoTIFF.js").Options;
3
+ export type ImageStaticOptions = import("ol/source/ImageStatic.js").Options;
4
+ export type TileJSONOptions = import("ol/source/TileJSON.js").Options;
5
+ export type TileWMSOptions = import("ol/source/TileWMS.js").Options;
6
+ export type WMTSOptions = import("ol/source/WMTS.js").Options;
7
+ export type XYZOptions = import("ol/source/XYZ.js").Options;
8
+ export type SourceOptions = GeoTIFFOptions | ImageStaticOptions | TileJSONOptions | TileWMSOptions | WMTSOptions | XYZOptions | {
9
9
  [x: string]: any;
10
10
  };
11
11
  /**
12
12
  * @module ol/source/type
13
13
  */
14
14
  /**
15
- * @typedef {import("./GeoTIFF2.js").Options2} GeoTIFFSourceOptions
15
+ * @typedef {import("ol/source/GeoTIFF.js").Options} GeoTIFFOptions
16
16
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_GeoTIFF-GeoTIFFSource.html}
17
17
  */
18
18
  /**
19
- * @typedef {import("ol/source/ImageStatic.js").Options} ImageStaticSourceOptions
19
+ * @typedef {import("ol/source/ImageStatic.js").Options} ImageStaticOptions
20
20
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_ImageStatic-Static.html}
21
21
  */
22
22
  /**
23
- * @typedef {import("ol/source/TileJSON.js").Options} TileJSONSourceOptions
23
+ * @typedef {import("ol/source/TileJSON.js").Options} TileJSONOptions
24
24
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_TileJSON-TileJSON.html}
25
25
  */
26
26
  /**
27
- * @typedef {import("ol/source/TileWMS.js").Options} TileWMSSourceOptions
27
+ * @typedef {import("ol/source/TileWMS.js").Options} TileWMSOptions
28
28
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_TileWMS-TileWMS.html}
29
29
  */
30
30
  /**
31
- * @typedef {import("ol/source/WMTS.js").Options} WMTSSourceOptions
31
+ * @typedef {import("ol/source/WMTS.js").Options} WMTSOptions
32
32
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_WMTS-WMTS.html}
33
33
  */
34
34
  /**
35
- * @typedef {import("ol/source/XYZ.js").Options} XYZSourceOptions
35
+ * @typedef {import("ol/source/XYZ.js").Options} XYZOptions
36
36
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_XYZ-XYZ.html}
37
37
  */
38
38
  /**
39
- * @typedef {GeoTIFFSourceOptions|ImageStaticSourceOptions|TileJSONSourceOptions|TileWMSSourceOptions|WMTSSourceOptions|XYZSourceOptions|Object<string, *>} SourceOptions
39
+ * @typedef {GeoTIFFOptions|ImageStaticOptions|TileJSONOptions|TileWMSOptions|WMTSOptions|XYZOptions|Object<string, *>} SourceOptions
40
40
  */
41
41
  /**
42
42
  * @classdesc
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/ol/source/type.js"],"names":[],"mappings":";mCAKa,OAAO,eAAe,EAAE,QAAQ;uCAIhC,OAAO,0BAA0B,EAAE,OAAO;oCAI1C,OAAO,uBAAuB,EAAE,OAAO;mCAIvC,OAAO,sBAAsB,EAAE,OAAO;gCAItC,OAAO,mBAAmB,EAAE,OAAO;+BAInC,OAAO,kBAAkB,EAAE,OAAO;4BAIlC,oBAAoB,GAAC,wBAAwB,GAAC,qBAAqB,GAAC,oBAAoB,GAAC,iBAAiB,GAAC,gBAAgB;QAAQ,MAAM;CAAI;AA7B1J;;GAEG;AAEH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;GAEG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,2BAA2C;IAC3C;;;;OAIG;IACH,+BAAmD;IACnD;;;;OAIG;IACH,iCAAuD;IACvD;;;;OAIG;IACH,iCAAuD;IACvD;;;;OAIG;IACH,4BAA6C;IAC7C;;;;OAIG;IACH,2BAA2C;IAC3C;;;;OAIG;IACH,wBAAqC;IACrC;;;;OAIG;IACH,uBAAmC;IAEnC;;;;;OAKG;IACH,wBAEC;IADC,aAAgB;IAGlB;;;;OAIG;IACH,YAHY,MAAM,CAKjB;CACF"}
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/ol/source/type.js"],"names":[],"mappings":";6BAKa,OAAO,sBAAsB,EAAE,OAAO;iCAItC,OAAO,0BAA0B,EAAE,OAAO;8BAI1C,OAAO,uBAAuB,EAAE,OAAO;6BAIvC,OAAO,sBAAsB,EAAE,OAAO;0BAItC,OAAO,mBAAmB,EAAE,OAAO;yBAInC,OAAO,kBAAkB,EAAE,OAAO;4BAIlC,cAAc,GAAC,kBAAkB,GAAC,eAAe,GAAC,cAAc,GAAC,WAAW,GAAC,UAAU;QAAQ,MAAM;CAAI;AA7BtH;;GAEG;AAEH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;GAEG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,2BAA2C;IAC3C;;;;OAIG;IACH,+BAAmD;IACnD;;;;OAIG;IACH,iCAAuD;IACvD;;;;OAIG;IACH,iCAAuD;IACvD;;;;OAIG;IACH,4BAA6C;IAC7C;;;;OAIG;IACH,2BAA2C;IAC3C;;;;OAIG;IACH,wBAAqC;IACrC;;;;OAIG;IACH,uBAAmC;IAEnC;;;;;OAKG;IACH,wBAEC;IADC,aAAgB;IAGlB;;;;OAIG;IACH,YAHY,MAAM,CAKjB;CACF"}
package/source/type.js CHANGED
@@ -2,31 +2,31 @@
2
2
  * @module ol/source/type
3
3
  */
4
4
  /**
5
- * @typedef {import("./GeoTIFF2.js").Options2} GeoTIFFSourceOptions
5
+ * @typedef {import("ol/source/GeoTIFF.js").Options} GeoTIFFOptions
6
6
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_GeoTIFF-GeoTIFFSource.html}
7
7
  */
8
8
  /**
9
- * @typedef {import("ol/source/ImageStatic.js").Options} ImageStaticSourceOptions
9
+ * @typedef {import("ol/source/ImageStatic.js").Options} ImageStaticOptions
10
10
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_ImageStatic-Static.html}
11
11
  */
12
12
  /**
13
- * @typedef {import("ol/source/TileJSON.js").Options} TileJSONSourceOptions
13
+ * @typedef {import("ol/source/TileJSON.js").Options} TileJSONOptions
14
14
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_TileJSON-TileJSON.html}
15
15
  */
16
16
  /**
17
- * @typedef {import("ol/source/TileWMS.js").Options} TileWMSSourceOptions
17
+ * @typedef {import("ol/source/TileWMS.js").Options} TileWMSOptions
18
18
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_TileWMS-TileWMS.html}
19
19
  */
20
20
  /**
21
- * @typedef {import("ol/source/WMTS.js").Options} WMTSSourceOptions
21
+ * @typedef {import("ol/source/WMTS.js").Options} WMTSOptions
22
22
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_WMTS-WMTS.html}
23
23
  */
24
24
  /**
25
- * @typedef {import("ol/source/XYZ.js").Options} XYZSourceOptions
25
+ * @typedef {import("ol/source/XYZ.js").Options} XYZOptions
26
26
  * @see {@link https://openlayers.org/en/latest/apidoc/module-ol_source_XYZ-XYZ.html}
27
27
  */
28
28
  /**
29
- * @typedef {GeoTIFFSourceOptions|ImageStaticSourceOptions|TileJSONSourceOptions|TileWMSSourceOptions|WMTSSourceOptions|XYZSourceOptions|Object<string, *>} SourceOptions
29
+ * @typedef {GeoTIFFOptions|ImageStaticOptions|TileJSONOptions|TileWMSOptions|WMTSOptions|XYZOptions|Object<string, *>} SourceOptions
30
30
  */
31
31
  /**
32
32
  * @classdesc
package/util.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Get the STAC objects associated with this event, if any. Excludes API Collections.
3
3
  * @param {import('ol/MapBrowserEvent.js').default} event The asset to read the information from.
4
+ * @param {STAC} [exclude=null] Excludes the given STAC entity from the list.
4
5
  * @return {Promise<Array<STAC>>} A list of STAC objects
5
6
  * @api
6
7
  */
7
- export function getStacObjectsForEvent(event: import("ol/MapBrowserEvent.js").default<any>): Promise<Array<STAC>>;
8
+ export function getStacObjectsForEvent(event: import("ol/MapBrowserEvent.js").default<any>, exclude?: any): Promise<Array<STAC>>;
8
9
  /**
9
10
  * Get the source info for the GeoTiff from the asset.
10
11
  * @param {import('stac-js').Asset} asset The asset to read the information from.
package/util.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/ol/util.js"],"names":[],"mappings":"AAwCA;;;;;GAKG;AACH,6FAHY,QAAQ,WAAW,CAAC,CAsB/B;AAED;;;;;GAKG;AACH,iEAHW,MAAM,MAAM,CAAC,GACZ,OAAO,sBAAsB,EAAE,UAAU,CAiCpD;AAED;;;;;GAKG;AACH,kEAHW,OAAO,YAAY,EAAE,cAAc,GAClC,QAAQ,OAAO,YAAY,EAAE,cAAc,CAAC,CAgBvD;AAED;;;;;;;;GAQG;AACH,+HAHY,KAAK,CAShB;AAED;;;;;GAKG;AACH,iDAFY,MAAM,GAAC,IAAI,CAgBtB;AAED;;;;GAIG;AACH,yCAHW,MAAM,GACL,QAAQ,MAAO,IAAI,CAAC,CAY/B;AAzKD;;;;GAIG;AACH,iCAHU,KAAK,CAWZ;AAEH;;;;GAIG;AACH,qCAHU,KAAK,CAQZ;sBAjC+B,aAAa"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/ol/util.js"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AACH,4GAHY,QAAQ,WAAW,CAAC,CA4B/B;AAED;;;;;GAKG;AACH,iEAHW,MAAM,MAAM,CAAC,GACZ,OAAO,sBAAsB,EAAE,UAAU,CAiCpD;AAED;;;;;GAKG;AACH,kEAHW,OAAO,YAAY,EAAE,cAAc,GAClC,QAAQ,OAAO,YAAY,EAAE,cAAc,CAAC,CAmBvD;AAED;;;;;;;;GAQG;AACH,+HAHY,KAAK,CAShB;AAED;;;;;GAKG;AACH,iDAFY,MAAM,GAAC,IAAI,CAgBtB;AAED;;;;GAIG;AACH,yCAHW,MAAM,GACL,QAAQ,MAAO,IAAI,CAAC,CAY/B;AAnLD;;;;GAIG;AACH,iCAHU,KAAK,CAWZ;AAEH;;;;GAIG;AACH,qCAHU,KAAK,CAQZ;sBAjC+B,aAAa"}
package/util.js CHANGED
@@ -28,22 +28,29 @@ export const defaultBoundsStyle = new Style({
28
28
  export const defaultCollectionStyle = new Style({
29
29
  stroke: new Stroke({
30
30
  color: '#ff9933',
31
- width: 1,
31
+ width: 2,
32
32
  }),
33
33
  });
34
34
  /**
35
35
  * Get the STAC objects associated with this event, if any. Excludes API Collections.
36
36
  * @param {import('ol/MapBrowserEvent.js').default} event The asset to read the information from.
37
+ * @param {STAC} [exclude=null] Excludes the given STAC entity from the list.
37
38
  * @return {Promise<Array<STAC>>} A list of STAC objects
38
39
  * @api
39
40
  */
40
- export async function getStacObjectsForEvent(event) {
41
+ export async function getStacObjectsForEvent(event, exclude = null) {
41
42
  const objects = event.map
42
43
  .getAllLayers()
43
44
  .filter((layer) => {
44
45
  if (layer instanceof VectorLayer &&
45
46
  layer.get('bounds') === true &&
46
47
  layer.get('stac') instanceof STAC) {
48
+ if (exclude) {
49
+ const stac = layer.get('stac');
50
+ if (stac.equals(exclude)) {
51
+ return false;
52
+ }
53
+ }
47
54
  const features = layer
48
55
  .getSource()
49
56
  .getFeaturesAtCoordinate(event.coordinate);
@@ -65,13 +72,13 @@ export function getGeoTiffSourceInfoFromAsset(asset, bands) {
65
72
  const sourceInfo = {
66
73
  url: asset.getAbsoluteUrl(),
67
74
  };
68
- let band = null;
75
+ let source = asset;
69
76
  // If there's just one band, we can also read the information from there.
70
77
  if (asset.getBands().length === 1) {
71
- band = 0;
78
+ source = asset.getBand(0);
72
79
  }
73
80
  // TODO: It would be useful if OL would allow min/max values per band
74
- const { minimum, maximum } = asset.getMinMaxValues(band);
81
+ const { minimum, maximum } = source.getMinMaxValues();
75
82
  if (typeof minimum === 'number') {
76
83
  sourceInfo.min = minimum;
77
84
  }
@@ -79,7 +86,7 @@ export function getGeoTiffSourceInfoFromAsset(asset, bands) {
79
86
  sourceInfo.max = maximum;
80
87
  }
81
88
  // TODO: It would be useful if OL would allow multiple no-data values
82
- const nodata = asset.getNoDataValues(band);
89
+ const nodata = source.getNoDataValues();
83
90
  if (nodata.length > 0) {
84
91
  sourceInfo.nodata = nodata[0];
85
92
  }
@@ -98,10 +105,13 @@ export async function getProjection(reference, defaultProjection = undefined) {
98
105
  let projection = defaultProjection;
99
106
  if (isProj4Registered()) {
100
107
  // TODO: It would be great to handle WKT2 and PROJJSON, but is not supported yet by proj4js.
101
- const epsgCode = reference.getMetadata('proj:epsg');
102
- if (epsgCode) {
108
+ const code = reference.getMetadata('proj:code');
109
+ if (code) {
103
110
  try {
104
- projection = await fromEPSGCode(epsgCode);
111
+ if (code.startsWith('EPSG:')) {
112
+ const id = parseInt(code.replace('EPSG:', ''), 10);
113
+ projection = await fromEPSGCode(id);
114
+ }
105
115
  }
106
116
  catch (_) {
107
117
  // pass
package/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/ol/util.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,YAAY,IAAI,iBAAiB,GAClC,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,KAAK,CAAC;IAC1C,IAAI,EAAE,IAAI,IAAI,CAAC;QACb,KAAK,EAAE,uBAAuB;KAC/B,CAAC;IACF,MAAM,EAAE,IAAI,MAAM,CAAC;QACjB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC;KACT,CAAC;CACH,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,KAAK,CAAC;IAC9C,MAAM,EAAE,IAAI,MAAM,CAAC;QACjB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC;KACT,CAAC;CACH,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAAK;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG;SACtB,YAAY,EAAE;SACd,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAChB,IACE,KAAK,YAAY,WAAW;YAC5B,KAAK,CAAC,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G,CAAC,CAAC;QAC5B,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;QACrC,OAAO,IAAI,gBAAgB,EAAE,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;KAC3D;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,IAAI,CAAC;KACb;AACH,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * @typedef {import("ol/source/GeoTIFF.js").Options} GeoTIFFSourceOptions
3
- */
4
- /**
5
- * @typedef {import("ol/source/GeoTIFF.js").SourceInfo} SourceInfo
6
- */
7
- /**
8
- * @typedef {import("ol/source/GeoTIFF.js").Options} Options
9
- */
10
- /**
11
- * @typedef {Object} Options2
12
- * @extends Options
13
- * @property {import("ol/proj.js").ProjectionLike} [projection] Source projection. If not provided, the GeoTIFF metadata
14
- */
15
- /**
16
- * @classdesc
17
- * A source for working with GeoTIFF data.
18
- *
19
- * Available for backward compatibility with ol <= 7.5.1
20
- */
21
- export default class GeoTIFF2 extends GeoTIFF {
22
- /**
23
- * @param {Options2} options Data tile options.
24
- */
25
- constructor(options: Options2);
26
- projection: any;
27
- }
28
- export type GeoTIFFSourceOptions = import("ol/source/GeoTIFF.js").Options;
29
- export type SourceInfo = import("ol/source/GeoTIFF.js").SourceInfo;
30
- export type Options = import("ol/source/GeoTIFF.js").Options;
31
- export type Options2 = any;
32
- import GeoTIFF from 'ol/source/GeoTIFF.js';
33
- //# sourceMappingURL=GeoTIFF2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeoTIFF2.d.ts","sourceRoot":"","sources":["../../../src/ol/source/GeoTIFF2.js"],"names":[],"mappings":"AASA;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,QAAQ,EAQlB;IAFG,gBAAoC;CAGzC;mCAlCY,OAAO,sBAAsB,EAAE,OAAO;yBAItC,OAAO,sBAAsB,EAAE,UAAU;sBAIzC,OAAO,sBAAsB,EAAE,OAAO;;oBAX/B,sBAAsB"}
@@ -1,38 +0,0 @@
1
- // @ts-nocheck
2
- // to avoid: error TS8022: JSDoc '@extends' is not attached to a class.
3
- /**
4
- * @module ol/source/GeoTIFF2
5
- */
6
- import GeoTIFF from 'ol/source/GeoTIFF.js';
7
- /**
8
- * @typedef {import("ol/source/GeoTIFF.js").Options} GeoTIFFSourceOptions
9
- */
10
- /**
11
- * @typedef {import("ol/source/GeoTIFF.js").SourceInfo} SourceInfo
12
- */
13
- /**
14
- * @typedef {import("ol/source/GeoTIFF.js").Options} Options
15
- */
16
- /**
17
- * @typedef {Object} Options2
18
- * @extends Options
19
- * @property {import("ol/proj.js").ProjectionLike} [projection] Source projection. If not provided, the GeoTIFF metadata
20
- */
21
- /**
22
- * @classdesc
23
- * A source for working with GeoTIFF data.
24
- *
25
- * Available for backward compatibility with ol <= 7.5.1
26
- */
27
- export default class GeoTIFF2 extends GeoTIFF {
28
- /**
29
- * @param {Options2} options Data tile options.
30
- */
31
- constructor(options) {
32
- super(options);
33
- if (options.projection) {
34
- this.projection = options.projection;
35
- }
36
- }
37
- }
38
- //# sourceMappingURL=GeoTIFF2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeoTIFF2.js","sourceRoot":"","sources":["../../../src/ol/source/GeoTIFF2.js"],"names":[],"mappings":"AAAA,cAAc;AACd,uEAAuE;AAEvE;;GAEG;AAEH,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C;;OAEG;IACH,YAAY,OAAO;QACjB,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;SACtC;IACH,CAAC;CACF"}