ol-stac 1.0.0-beta.9 → 1.0.0-rc.2
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 +2 -0
- package/layer/STAC.d.ts +78 -35
- package/layer/STAC.d.ts.map +1 -1
- package/layer/STAC.js +218 -126
- package/layer/STAC.js.map +1 -1
- package/package.json +4 -4
- package/util.d.ts +2 -1
- package/util.d.ts.map +1 -1
- package/util.js +19 -9
- package/util.js.map +1 -1
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,15 @@ 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;
|
|
23
|
+
/**
|
|
24
|
+
* The the given children, apply the given options.
|
|
25
|
+
*/
|
|
26
|
+
childrenOptions?: Options | undefined;
|
|
18
27
|
/**
|
|
19
28
|
* The selector for the assets to be rendered,
|
|
20
29
|
* only for STAC Items and Collections.
|
|
@@ -45,15 +54,15 @@ export type Options = {
|
|
|
45
54
|
*/
|
|
46
55
|
displayGeoTiffByDefault?: boolean | undefined;
|
|
47
56
|
/**
|
|
48
|
-
* Allow to display images that a browser can display (e.g. PNG, JPEG),
|
|
49
|
-
*
|
|
57
|
+
* Allow to display preview images that a browser can display (e.g. PNG, JPEG),
|
|
58
|
+
* i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
|
|
50
59
|
* 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
|
|
60
|
+
* For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
|
|
52
61
|
*/
|
|
53
62
|
displayPreview?: boolean | undefined;
|
|
54
63
|
/**
|
|
55
64
|
* Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
|
|
56
|
-
* usually
|
|
65
|
+
* usually an asset with role `overview` or `visual`.
|
|
57
66
|
*/
|
|
58
67
|
displayOverview?: boolean | undefined;
|
|
59
68
|
/**
|
|
@@ -70,7 +79,7 @@ export type Options = {
|
|
|
70
79
|
*/
|
|
71
80
|
boundsStyle?: import("ol/style/Style.js").default | undefined;
|
|
72
81
|
/**
|
|
73
|
-
* The style for individual
|
|
82
|
+
* The style for individual children in a list of STAC Items or Collections.
|
|
74
83
|
*/
|
|
75
84
|
collectionStyle?: import("ol/style/Style.js").default | undefined;
|
|
76
85
|
/**
|
|
@@ -133,6 +142,11 @@ export type Options = {
|
|
|
133
142
|
properties?: {
|
|
134
143
|
[x: string]: any;
|
|
135
144
|
} | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Disable the migration of the STAC object to the latest version.
|
|
147
|
+
* Only enable this if you are sure that the STAC object is already in the latest version.
|
|
148
|
+
*/
|
|
149
|
+
disableMigration?: boolean | undefined;
|
|
136
150
|
};
|
|
137
151
|
/**
|
|
138
152
|
* @typedef {import("ol/extent.js").Extent} Extent
|
|
@@ -155,6 +169,9 @@ export type Options = {
|
|
|
155
169
|
* Can also be used as url for data, if it is absolute and doesn't contain a self link.
|
|
156
170
|
* @property {STAC|Asset|Object} [data] The STAC metadata. Any of `url` and `data` must be provided.
|
|
157
171
|
* `data` take precedence over `url`.
|
|
172
|
+
* @property {ItemCollection|Object|Array<STAC>|string|null} [children=null] For STAC Catalogs and Collections, any child entites
|
|
173
|
+
* to show. Can be STAC ItemCollections (as ItemCollection, GeoJSON FeatureCollection, or URL) or a list of STAC entities.
|
|
174
|
+
* @property {Options} [childrenOptions={}] The the given children, apply the given options.
|
|
158
175
|
* @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
|
|
159
176
|
* only for STAC Items and Collections.
|
|
160
177
|
* This can be an array of strings corresponding to asset keys or Asset objects.
|
|
@@ -170,12 +187,12 @@ export type Options = {
|
|
|
170
187
|
* by default.
|
|
171
188
|
* @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
|
|
172
189
|
* which might not work well for larger files or larger amounts of files.
|
|
173
|
-
* @property {boolean} [displayPreview=false] Allow to display images that a browser can display (e.g. PNG, JPEG),
|
|
174
|
-
*
|
|
190
|
+
* @property {boolean} [displayPreview=false] Allow to display preview images that a browser can display (e.g. PNG, JPEG),
|
|
191
|
+
* i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
|
|
175
192
|
* The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
|
|
176
|
-
* For performance reasons, it is recommended to enable this option if you pass in STAC API Items
|
|
193
|
+
* For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
|
|
177
194
|
* @property {boolean} [displayOverview=true] Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
|
|
178
|
-
* usually
|
|
195
|
+
* usually an asset with role `overview` or `visual`.
|
|
179
196
|
* @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
|
|
180
197
|
* based on the information provided through the web map links extension.
|
|
181
198
|
* If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
|
|
@@ -183,7 +200,7 @@ export type Options = {
|
|
|
183
200
|
* it lets this library choose a web map link to show, but only if no other data is shown.
|
|
184
201
|
* To disable the functionality set this to `false`.
|
|
185
202
|
* @property {Style} [boundsStyle] The style for the overall bounds / footprint.
|
|
186
|
-
* @property {Style} [collectionStyle] The style for individual
|
|
203
|
+
* @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
|
|
187
204
|
* @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
|
|
188
205
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
|
189
206
|
* @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
|
|
@@ -206,6 +223,8 @@ export type Options = {
|
|
|
206
223
|
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
207
224
|
* be visible.
|
|
208
225
|
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
|
|
226
|
+
* @property {boolean} [disableMigration=false] Disable the migration of the STAC object to the latest version.
|
|
227
|
+
* Only enable this if you are sure that the STAC object is already in the latest version.
|
|
209
228
|
*/
|
|
210
229
|
/**
|
|
211
230
|
* @classdesc
|
|
@@ -230,12 +249,17 @@ declare class STACLayer extends LayerGroup {
|
|
|
230
249
|
*/
|
|
231
250
|
private getSourceOptions_;
|
|
232
251
|
/**
|
|
233
|
-
* @type {STAC
|
|
252
|
+
* @type {Array<STAC>|null}
|
|
253
|
+
* @private
|
|
254
|
+
*/
|
|
255
|
+
private children_;
|
|
256
|
+
/**
|
|
257
|
+
* @type {Options}
|
|
234
258
|
* @private
|
|
235
259
|
*/
|
|
236
|
-
private
|
|
260
|
+
private childrenOptions_;
|
|
237
261
|
/**
|
|
238
|
-
* @type {Array<Asset
|
|
262
|
+
* @type {Array<Asset>|null}
|
|
239
263
|
* @private
|
|
240
264
|
*/
|
|
241
265
|
private assets_;
|
|
@@ -245,7 +269,7 @@ declare class STACLayer extends LayerGroup {
|
|
|
245
269
|
*/
|
|
246
270
|
private bands_;
|
|
247
271
|
/**
|
|
248
|
-
* @type {string
|
|
272
|
+
* @type {string|null}
|
|
249
273
|
* @private
|
|
250
274
|
*/
|
|
251
275
|
private crossOrigin_;
|
|
@@ -298,12 +322,17 @@ declare class STACLayer extends LayerGroup {
|
|
|
298
322
|
* @private
|
|
299
323
|
*/
|
|
300
324
|
private boundsLayer_;
|
|
325
|
+
/**
|
|
326
|
+
* @type {boolean}
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
private disableMigration_;
|
|
301
330
|
/**
|
|
302
331
|
* Returns the vector layer that visualizes the bounds / footprint.
|
|
303
332
|
* @return {VectorLayer|null} The vector layer for the bounds
|
|
304
333
|
* @api
|
|
305
334
|
*/
|
|
306
|
-
getBoundsLayer(): VectorLayer
|
|
335
|
+
getBoundsLayer(): VectorLayer | null;
|
|
307
336
|
/**
|
|
308
337
|
* @private
|
|
309
338
|
* @param {Error} error The error.
|
|
@@ -313,37 +342,24 @@ declare class STACLayer extends LayerGroup {
|
|
|
313
342
|
* @private
|
|
314
343
|
* @param {STAC|Asset|Object} data The STAC data.
|
|
315
344
|
* @param {string} url The url to the data.
|
|
316
|
-
* @param {Array<
|
|
345
|
+
* @param {ItemCollection|Object|Array<STAC>|string|null} children The child STAC entities to show.
|
|
346
|
+
* @param {Array<Asset|string>|null} assets The assets to show.
|
|
317
347
|
* @param {Array<number>} bands The (one-based) bands to show.
|
|
318
348
|
*/
|
|
319
349
|
private configure_;
|
|
320
350
|
/**
|
|
321
351
|
* @private
|
|
352
|
+
* @param {Array<STAC>} collection The list of STAC entities to show.
|
|
353
|
+
* @param {Options} [options] Options for the children.
|
|
322
354
|
* @return {Promise} Resolves when complete.
|
|
323
355
|
*/
|
|
324
|
-
private
|
|
325
|
-
/**
|
|
326
|
-
* @private
|
|
327
|
-
* @return {Promise} Resolves when complete.
|
|
328
|
-
*/
|
|
329
|
-
private addStacAssets_;
|
|
330
|
-
/**
|
|
331
|
-
* @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
|
-
private addImagery_;
|
|
356
|
+
private addChildren_;
|
|
336
357
|
/**
|
|
337
358
|
* @private
|
|
338
|
-
* @param {Asset|Link} [
|
|
359
|
+
* @param {Asset|Link} [image] A STAC Link or Asset
|
|
339
360
|
* @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
|
|
340
361
|
*/
|
|
341
|
-
private
|
|
342
|
-
/**
|
|
343
|
-
* Adds a layer for the web map links available in the STAC links.
|
|
344
|
-
* @return {Promise<Array<Layer>|undefined>} Resolves with a Layer or undefined when complete.
|
|
345
|
-
*/
|
|
346
|
-
addWebMapLinks_(): Promise<Array<Layer> | undefined>;
|
|
362
|
+
private addPreviewImage_;
|
|
347
363
|
/**
|
|
348
364
|
* Adds a layer for a link that implements the web-map-links extension.
|
|
349
365
|
* Supports: PMTiles, TileJSON, WMS, WMTS, XYZ
|
|
@@ -400,6 +416,14 @@ declare class STACLayer extends LayerGroup {
|
|
|
400
416
|
* @api
|
|
401
417
|
*/
|
|
402
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
|
+
* @param {Options} [options] STACLayer options for the children. Only applies if `children` are given.
|
|
423
|
+
* @return {Promise} Resolves when all items are rendered.
|
|
424
|
+
* @api
|
|
425
|
+
*/
|
|
426
|
+
setChildren(childs: ItemCollection | any | Array<STAC> | string | null, options?: Options | undefined): Promise<any>;
|
|
403
427
|
/**
|
|
404
428
|
* Get the STAC object.
|
|
405
429
|
*
|
|
@@ -407,6 +431,13 @@ declare class STACLayer extends LayerGroup {
|
|
|
407
431
|
* @api
|
|
408
432
|
*/
|
|
409
433
|
getData(): STAC | Asset;
|
|
434
|
+
/**
|
|
435
|
+
* Get the children STAC entities.
|
|
436
|
+
*
|
|
437
|
+
* @return {STAC} The STAC child entities.
|
|
438
|
+
* @api
|
|
439
|
+
*/
|
|
440
|
+
getChildren(): STAC;
|
|
410
441
|
/**
|
|
411
442
|
* Get the STAC assets shown.
|
|
412
443
|
*
|
|
@@ -414,6 +445,18 @@ declare class STACLayer extends LayerGroup {
|
|
|
414
445
|
* @api
|
|
415
446
|
*/
|
|
416
447
|
getAssets(): Array<Asset>;
|
|
448
|
+
/**
|
|
449
|
+
* Get the attributions of the STAC entity assigned to this layer.
|
|
450
|
+
*
|
|
451
|
+
* @return {Array<string>} Attributions for this layer.
|
|
452
|
+
* @api
|
|
453
|
+
*/
|
|
454
|
+
getAttributions(): Array<string>;
|
|
455
|
+
/**
|
|
456
|
+
* Get the layer source.
|
|
457
|
+
* @return {SourceType|null} The layer source (or `null` if not yet set).
|
|
458
|
+
*/
|
|
459
|
+
getSource(): SourceType | null;
|
|
417
460
|
}
|
|
418
461
|
import SourceType from '../source/type.js';
|
|
419
462
|
import LayerGroup from 'ol/layer/Group.js';
|
package/layer/STAC.d.ts.map
CHANGED
|
@@ -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
|
|
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;;;;;eAEjB,uBAAsB,WAA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BA6BC;IAED;;;;;;;OAOG;IACH,4BAHY,QAAQ,MAAM,KAAK,CAAC,GAAC,SAAS,CAAC,CAuI1C;IAED;;;;OAIG;IACH,oBAmDC;IAED;;;;OAIG;IACH,gCAgBC;IAED;;;;;OAKG;IACH,kBAMC;IAED;;;OAGG;IACH,sBA+BC;IAED;;OAEG;IACH,sBA0EC;IAED;;;;OAIG;IACH,iBAHY,OAAO,CASlB;IAED;;;;OAIG;IACH,kBAHY,MAAM,IAAI,CAAC,CA+BtB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,MAAM,QAAM,CAAC,GAAC,IAAI,gBAmBlC;IAED;;;;;;OAMG;IACH,oBALW,uBAAsB,WAAW,GAAC,MAAM,GAAC,IAAI,+CAoCvD;IAED;;;;;OAKG;IACH,WAHY,YAAU,CAKrB;IAED;;;;;OAKG;IACH,oBAEC;IAED;;;;;OAKG;IACH,aAHY,YAAY,CAKvB;IAqCD;;;;;OAKG;IACH,mBAHY,MAAM,MAAM,CAAC,CAaxB;IAED;;;OAGG;IACH,aAFY,UAAU,GAAC,IAAI,CAI1B;CACF;uBA18BsB,mBAAmB;uBADnB,mBAAmB;wBAKlB,oBAAoB"}
|
package/layer/STAC.js
CHANGED
|
@@ -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,9 @@ 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.
|
|
50
|
+
* @property {Options} [childrenOptions={}] The the given children, apply the given options.
|
|
48
51
|
* @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
|
|
49
52
|
* only for STAC Items and Collections.
|
|
50
53
|
* This can be an array of strings corresponding to asset keys or Asset objects.
|
|
@@ -60,12 +63,12 @@ import { transformExtent } from 'ol/proj.js';
|
|
|
60
63
|
* by default.
|
|
61
64
|
* @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
|
|
62
65
|
* 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
|
-
*
|
|
66
|
+
* @property {boolean} [displayPreview=false] Allow to display preview images that a browser can display (e.g. PNG, JPEG),
|
|
67
|
+
* i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
|
|
65
68
|
* 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
|
|
69
|
+
* For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
|
|
67
70
|
* @property {boolean} [displayOverview=true] Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
|
|
68
|
-
* usually
|
|
71
|
+
* usually an asset with role `overview` or `visual`.
|
|
69
72
|
* @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
|
|
70
73
|
* based on the information provided through the web map links extension.
|
|
71
74
|
* If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
|
|
@@ -73,7 +76,7 @@ import { transformExtent } from 'ol/proj.js';
|
|
|
73
76
|
* it lets this library choose a web map link to show, but only if no other data is shown.
|
|
74
77
|
* To disable the functionality set this to `false`.
|
|
75
78
|
* @property {Style} [boundsStyle] The style for the overall bounds / footprint.
|
|
76
|
-
* @property {Style} [collectionStyle] The style for individual
|
|
79
|
+
* @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
|
|
77
80
|
* @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
|
|
78
81
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
|
79
82
|
* @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
|
|
@@ -96,6 +99,8 @@ import { transformExtent } from 'ol/proj.js';
|
|
|
96
99
|
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
97
100
|
* be visible.
|
|
98
101
|
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
|
|
102
|
+
* @property {boolean} [disableMigration=false] Disable the migration of the STAC object to the latest version.
|
|
103
|
+
* Only enable this if you are sure that the STAC object is already in the latest version.
|
|
99
104
|
*/
|
|
100
105
|
/**
|
|
101
106
|
* @classdesc
|
|
@@ -132,12 +137,17 @@ class STACLayer extends LayerGroup {
|
|
|
132
137
|
*/
|
|
133
138
|
this.getSourceOptions_ = options.getSourceOptions;
|
|
134
139
|
/**
|
|
135
|
-
* @type {STAC
|
|
140
|
+
* @type {Array<STAC>|null}
|
|
136
141
|
* @private
|
|
137
142
|
*/
|
|
138
|
-
this.
|
|
143
|
+
this.children_ = null;
|
|
139
144
|
/**
|
|
140
|
-
* @type {
|
|
145
|
+
* @type {Options}
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
this.childrenOptions_ = options.childrenOptions || {};
|
|
149
|
+
/**
|
|
150
|
+
* @type {Array<Asset>|null}
|
|
141
151
|
* @private
|
|
142
152
|
*/
|
|
143
153
|
this.assets_ = null;
|
|
@@ -147,7 +157,7 @@ class STACLayer extends LayerGroup {
|
|
|
147
157
|
*/
|
|
148
158
|
this.bands_ = [];
|
|
149
159
|
/**
|
|
150
|
-
* @type {string
|
|
160
|
+
* @type {string|null}
|
|
151
161
|
* @private
|
|
152
162
|
*/
|
|
153
163
|
this.crossOrigin_ = options.crossOrigin || null;
|
|
@@ -200,9 +210,14 @@ class STACLayer extends LayerGroup {
|
|
|
200
210
|
* @private
|
|
201
211
|
*/
|
|
202
212
|
this.boundsLayer_ = null;
|
|
213
|
+
/**
|
|
214
|
+
* @type {boolean}
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
this.disableMigration_ = options.disableMigration || false;
|
|
203
218
|
if (options.data) {
|
|
204
219
|
try {
|
|
205
|
-
this.configure_(options.data, options.url, options.assets, options.bands);
|
|
220
|
+
this.configure_(options.data, options.url, options.children, options.assets, options.bands);
|
|
206
221
|
}
|
|
207
222
|
catch (error) {
|
|
208
223
|
this.handleError_(error);
|
|
@@ -214,7 +229,7 @@ class STACLayer extends LayerGroup {
|
|
|
214
229
|
}
|
|
215
230
|
fetch(options.url)
|
|
216
231
|
.then((response) => response.json())
|
|
217
|
-
.then((data) => this.configure_(data, options.url, options.assets, options.bands))
|
|
232
|
+
.then((data) => this.configure_(data, options.url, options.children, options.assets, options.bands))
|
|
218
233
|
.catch((error) => this.handleError_(error));
|
|
219
234
|
}
|
|
220
235
|
/**
|
|
@@ -243,19 +258,22 @@ class STACLayer extends LayerGroup {
|
|
|
243
258
|
* @private
|
|
244
259
|
* @param {STAC|Asset|Object} data The STAC data.
|
|
245
260
|
* @param {string} url The url to the data.
|
|
246
|
-
* @param {Array<
|
|
261
|
+
* @param {ItemCollection|Object|Array<STAC>|string|null} children The child STAC entities to show.
|
|
262
|
+
* @param {Array<Asset|string>|null} assets The assets to show.
|
|
247
263
|
* @param {Array<number>} bands The (one-based) bands to show.
|
|
248
264
|
*/
|
|
249
|
-
configure_(data, url = null, assets = null, bands = []) {
|
|
265
|
+
configure_(data, url = null, children = null, assets = null, bands = []) {
|
|
266
|
+
let stac;
|
|
250
267
|
if (data instanceof Asset || data instanceof STAC) {
|
|
251
|
-
|
|
268
|
+
stac = data;
|
|
252
269
|
}
|
|
253
270
|
else {
|
|
254
|
-
|
|
271
|
+
stac = create(data, !this.disableMigration_);
|
|
255
272
|
}
|
|
256
273
|
if (url && url.includes('://')) {
|
|
257
|
-
|
|
274
|
+
stac.setAbsoluteUrl(url);
|
|
258
275
|
}
|
|
276
|
+
this.set('stac', stac);
|
|
259
277
|
this.bands_ = bands;
|
|
260
278
|
this.boundsLayer_ = this.addFootprint_();
|
|
261
279
|
const updateBoundsStyle = () => {
|
|
@@ -265,6 +283,16 @@ class STACLayer extends LayerGroup {
|
|
|
265
283
|
};
|
|
266
284
|
this.getLayers().on('add', updateBoundsStyle);
|
|
267
285
|
this.getLayers().on('remove', updateBoundsStyle);
|
|
286
|
+
this.setChildren(children)
|
|
287
|
+
.then(() => {
|
|
288
|
+
/**
|
|
289
|
+
* Invoked once the child STAC entites are loaded and shown on the map.
|
|
290
|
+
*
|
|
291
|
+
* @event childrenready
|
|
292
|
+
*/
|
|
293
|
+
return this.dispatchEvent('childrenready');
|
|
294
|
+
})
|
|
295
|
+
.catch((error) => this.handleError_(error));
|
|
268
296
|
this.setAssets(assets)
|
|
269
297
|
.then(() => {
|
|
270
298
|
/**
|
|
@@ -286,13 +314,13 @@ class STACLayer extends LayerGroup {
|
|
|
286
314
|
}
|
|
287
315
|
/**
|
|
288
316
|
* @private
|
|
317
|
+
* @param {Array<STAC>} collection The list of STAC entities to show.
|
|
318
|
+
* @param {Options} [options] Options for the children.
|
|
289
319
|
* @return {Promise} Resolves when complete.
|
|
290
320
|
*/
|
|
291
|
-
async
|
|
292
|
-
const promises =
|
|
293
|
-
|
|
294
|
-
.map((obj) => {
|
|
295
|
-
const subgroup = new STACLayer({
|
|
321
|
+
async addChildren_(collection, options = {}) {
|
|
322
|
+
const promises = collection.map((obj) => {
|
|
323
|
+
const defaultOptions = {
|
|
296
324
|
data: obj,
|
|
297
325
|
crossOrigin: this.crossOrigin_,
|
|
298
326
|
boundsStyle: this.collectionStyle_,
|
|
@@ -300,90 +328,44 @@ class STACLayer extends LayerGroup {
|
|
|
300
328
|
displayOverview: this.displayOverview_,
|
|
301
329
|
displayPreview: this.displayPreview_,
|
|
302
330
|
displayFootprint: this.displayFootprint_,
|
|
303
|
-
}
|
|
304
|
-
|
|
331
|
+
};
|
|
332
|
+
const subgroup = new STACLayer(Object.assign(defaultOptions, options));
|
|
333
|
+
this.addLayer_(subgroup, null);
|
|
305
334
|
return subgroup;
|
|
306
335
|
});
|
|
307
336
|
return await Promise.all(promises);
|
|
308
337
|
}
|
|
309
338
|
/**
|
|
310
339
|
* @private
|
|
311
|
-
* @
|
|
312
|
-
*/
|
|
313
|
-
async addStacAssets_() {
|
|
314
|
-
let assets = this.getAssets();
|
|
315
|
-
if (assets === null) {
|
|
316
|
-
assets = [];
|
|
317
|
-
// No specific asset given by the user, visualize the default geotiff
|
|
318
|
-
const geotiff = this.getData().getDefaultGeoTIFF(true, !this.displayGeoTiffByDefault_);
|
|
319
|
-
if (geotiff) {
|
|
320
|
-
assets.push(geotiff);
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
// This may return Links or Assets
|
|
324
|
-
const thumbnails = this.getData().getThumbnails();
|
|
325
|
-
if (thumbnails.length > 0) {
|
|
326
|
-
assets.push(thumbnails[0]);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
const promises = assets.map((asset) => this.addImagery_(asset));
|
|
331
|
-
return await Promise.all(promises);
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* @private
|
|
335
|
-
* @param {Asset|Link} [ref] A STAC Link or Asset
|
|
336
|
-
* @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
|
|
337
|
-
*/
|
|
338
|
-
async addImagery_(ref) {
|
|
339
|
-
if (!ref) {
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
if (ref.isGeoTIFF()) {
|
|
343
|
-
return await this.addGeoTiff_(ref);
|
|
344
|
-
}
|
|
345
|
-
if (ref.canBrowserDisplayImage()) {
|
|
346
|
-
return await this.addThumbnail_(ref);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* @private
|
|
351
|
-
* @param {Asset|Link} [thumbnail] A STAC Link or Asset
|
|
340
|
+
* @param {Asset|Link} [image] A STAC Link or Asset
|
|
352
341
|
* @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
|
|
353
342
|
*/
|
|
354
|
-
async
|
|
355
|
-
|
|
343
|
+
async addPreviewImage_(image) {
|
|
344
|
+
const projection = await getProjection(image, 'EPSG:4326');
|
|
345
|
+
const bboxes = image.getContext().getBoundingBoxes();
|
|
346
|
+
if (bboxes.length !== 1) {
|
|
356
347
|
return;
|
|
357
348
|
}
|
|
349
|
+
const bbox = bboxes[0];
|
|
358
350
|
/**
|
|
359
351
|
* @type {import("ol/source/ImageStatic.js").Options}
|
|
360
352
|
*/
|
|
361
353
|
let options = {
|
|
362
|
-
url:
|
|
363
|
-
projection
|
|
364
|
-
imageExtent:
|
|
354
|
+
url: image.getAbsoluteUrl(),
|
|
355
|
+
projection,
|
|
356
|
+
imageExtent: transformExtent(bbox, 'EPSG:4326', projection),
|
|
365
357
|
crossOrigin: this.crossOrigin_,
|
|
366
358
|
};
|
|
367
359
|
if (this.getSourceOptions_) {
|
|
368
360
|
// @ts-ignore
|
|
369
|
-
options = await this.getSourceOptions_(SourceType.ImageStatic, options,
|
|
361
|
+
options = await this.getSourceOptions_(SourceType.ImageStatic, options, image);
|
|
370
362
|
}
|
|
371
363
|
const layer = new ImageLayer({
|
|
372
364
|
source: new StaticImage(options),
|
|
373
365
|
});
|
|
374
|
-
this.addLayer_(layer,
|
|
366
|
+
this.addLayer_(layer, image);
|
|
375
367
|
return layer;
|
|
376
368
|
}
|
|
377
|
-
/**
|
|
378
|
-
* Adds a layer for the web map links available in the STAC links.
|
|
379
|
-
* @return {Promise<Array<Layer>|undefined>} Resolves with a Layer or undefined when complete.
|
|
380
|
-
*/
|
|
381
|
-
async addWebMapLinks_() {
|
|
382
|
-
const links = this.getWebMapLinks();
|
|
383
|
-
if (links.length > 0) {
|
|
384
|
-
return await this.addLayerForLink(links[0]);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
369
|
/**
|
|
388
370
|
* Adds a layer for a link that implements the web-map-links extension.
|
|
389
371
|
* Supports: PMTiles, TileJSON, WMS, WMTS, XYZ
|
|
@@ -400,7 +382,7 @@ class STACLayer extends LayerGroup {
|
|
|
400
382
|
}
|
|
401
383
|
const options = {
|
|
402
384
|
attributions: link.getMetadata('attribution') ||
|
|
403
|
-
this.
|
|
385
|
+
this.getData().getMetadata('attribution'),
|
|
404
386
|
crossOrigin: this.crossOrigin_,
|
|
405
387
|
url,
|
|
406
388
|
};
|
|
@@ -439,8 +421,8 @@ class STACLayer extends LayerGroup {
|
|
|
439
421
|
break;
|
|
440
422
|
}
|
|
441
423
|
for (const i in link['wms:layers']) {
|
|
442
|
-
const layers = link['wms:layers'][i];
|
|
443
|
-
let styles;
|
|
424
|
+
const layers = link['wms:layers'][i] || '';
|
|
425
|
+
let styles = '';
|
|
444
426
|
if (Array.isArray(link['wms:styles']) &&
|
|
445
427
|
typeof link['wms:styles'][i] === 'string') {
|
|
446
428
|
styles = link['wms:styles'][i];
|
|
@@ -508,9 +490,6 @@ class STACLayer extends LayerGroup {
|
|
|
508
490
|
* @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
|
|
509
491
|
*/
|
|
510
492
|
async addGeoTiff_(asset) {
|
|
511
|
-
if (!this.displayOverview_) {
|
|
512
|
-
return;
|
|
513
|
-
}
|
|
514
493
|
if (this.buildTileUrlTemplate_ && !this.useTileLayerAsFallback_) {
|
|
515
494
|
return await this.addTileLayerForImagery_(asset);
|
|
516
495
|
}
|
|
@@ -529,35 +508,28 @@ class STACLayer extends LayerGroup {
|
|
|
529
508
|
// @ts-ignore
|
|
530
509
|
options = await this.getSourceOptions_(SourceType.GeoTIFF, options, asset);
|
|
531
510
|
}
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
511
|
+
const source = new GeoTIFF(options);
|
|
512
|
+
const status = new Promise((resolve, reject) => {
|
|
513
|
+
source.on('error', reject);
|
|
514
|
+
source.on('change', () => {
|
|
515
|
+
// see https://github.com/openlayers/openlayers/issues/14926
|
|
516
|
+
if (source.getState() === 'error') {
|
|
517
|
+
reject(source.getError());
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
resolve();
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
});
|
|
538
524
|
try {
|
|
539
|
-
|
|
525
|
+
await status;
|
|
540
526
|
const layer = new WebGLTileLayer({ source });
|
|
541
|
-
if (this.useTileLayerAsFallback_) {
|
|
542
|
-
const errorFn = () => tileserverFallback(asset, layer);
|
|
543
|
-
source.on('error', errorFn);
|
|
544
|
-
source.on('tileloaderror', errorFn);
|
|
545
|
-
// see https://github.com/openlayers/openlayers/issues/14926
|
|
546
|
-
source.on('change', () => {
|
|
547
|
-
if (source.getState() === 'error') {
|
|
548
|
-
tileserverFallback(asset, layer);
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
layer.on('error', errorFn);
|
|
552
|
-
// Call this to ensure we can load the GeoTIFF, otherwise try fallback
|
|
553
|
-
await source.getView();
|
|
554
|
-
}
|
|
555
527
|
this.addLayer_(layer, asset);
|
|
556
528
|
return layer;
|
|
557
529
|
}
|
|
558
530
|
catch (error) {
|
|
559
531
|
if (this.useTileLayerAsFallback_) {
|
|
560
|
-
return await
|
|
532
|
+
return await this.addTileLayerForImagery_(asset);
|
|
561
533
|
}
|
|
562
534
|
this.handleError_(error);
|
|
563
535
|
}
|
|
@@ -590,8 +562,10 @@ class STACLayer extends LayerGroup {
|
|
|
590
562
|
* @param {number} [zIndex=0] The z-index for the layer
|
|
591
563
|
* @private
|
|
592
564
|
*/
|
|
593
|
-
addLayer_(layer, data, zIndex = 0) {
|
|
594
|
-
|
|
565
|
+
addLayer_(layer, data = null, zIndex = 0) {
|
|
566
|
+
if (data) {
|
|
567
|
+
layer.set('stac', data);
|
|
568
|
+
}
|
|
595
569
|
layer.setZIndex(zIndex);
|
|
596
570
|
this.getLayers().push(layer);
|
|
597
571
|
}
|
|
@@ -638,22 +612,66 @@ class STACLayer extends LayerGroup {
|
|
|
638
612
|
const oldLayers = this.getLayers();
|
|
639
613
|
for (let i = oldLayers.getLength() - 1; i >= 0; i--) {
|
|
640
614
|
const layer = oldLayers.item(i);
|
|
641
|
-
|
|
642
|
-
if (stac && (stac.isLink() || stac.isAsset())) {
|
|
615
|
+
if (layer.get('stac') && !layer.get('bounds')) {
|
|
643
616
|
oldLayers.removeAt(i);
|
|
644
617
|
}
|
|
645
618
|
}
|
|
646
|
-
// Add
|
|
619
|
+
// Add layers by priority
|
|
647
620
|
const data = this.getData();
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
if (this.
|
|
655
|
-
|
|
656
|
-
|
|
621
|
+
// Show the web map links provided by the user
|
|
622
|
+
if (Array.isArray(this.displayWebMapLink_)) {
|
|
623
|
+
const promises = this.getWebMapLinks().map(async (link) => await this.addLayerForLink(link));
|
|
624
|
+
await Promise.all(promises);
|
|
625
|
+
}
|
|
626
|
+
// Show children if provided
|
|
627
|
+
if (this.children_) {
|
|
628
|
+
await this.addChildren_(this.children_, this.childrenOptions_);
|
|
629
|
+
}
|
|
630
|
+
// Show the assets provided by the user
|
|
631
|
+
const assets = this.getAssets();
|
|
632
|
+
if (assets) {
|
|
633
|
+
const promises = assets.map(async (ref) => {
|
|
634
|
+
if (ref && ref.isGeoTIFF()) {
|
|
635
|
+
return await this.addGeoTiff_(ref);
|
|
636
|
+
}
|
|
637
|
+
if (ref && ref.canBrowserDisplayImage()) {
|
|
638
|
+
return await this.addPreviewImage_(ref);
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
await Promise.all(promises);
|
|
642
|
+
}
|
|
643
|
+
// If the user didn't provide any specific asset/map link/children to show,
|
|
644
|
+
// choose a sensible default visualization
|
|
645
|
+
if (this.hasOnlyBounds()) {
|
|
646
|
+
// Show the ItemCollection/CollectionCollection entries
|
|
647
|
+
if (data.isItemCollection() || data.isCollectionCollection()) {
|
|
648
|
+
await this.addChildren_(this.getData().getAll(), this.childrenOptions_);
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
// Show web map links
|
|
652
|
+
const links = this.getWebMapLinks();
|
|
653
|
+
if (links.length > 0) {
|
|
654
|
+
await this.addLayerForLink(links[0]);
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
// Find an asset that we can visualize
|
|
658
|
+
const geotiff = this.getData().getDefaultGeoTIFF(true, !this.displayGeoTiffByDefault_);
|
|
659
|
+
let layer;
|
|
660
|
+
// Try to visualize the default GeoTIFF first
|
|
661
|
+
if (geotiff && this.displayOverview_) {
|
|
662
|
+
layer = await this.addGeoTiff_(geotiff);
|
|
663
|
+
}
|
|
664
|
+
// If no GeoTIFF is available or it can't be shown (e.g. error),
|
|
665
|
+
// try to visualize the default thumbnail
|
|
666
|
+
if (this.displayPreview_ && (!geotiff || !layer)) {
|
|
667
|
+
// This may return Links or Assets
|
|
668
|
+
const thumbnails = this.getData().getThumbnails(true, 'overview');
|
|
669
|
+
if (thumbnails.length > 0) {
|
|
670
|
+
await this.addPreviewImage_(thumbnails[0]);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
657
675
|
}
|
|
658
676
|
}
|
|
659
677
|
/**
|
|
@@ -676,7 +694,7 @@ class STACLayer extends LayerGroup {
|
|
|
676
694
|
if (typeof this.displayWebMapLink_ === 'string') {
|
|
677
695
|
types = [this.displayWebMapLink_];
|
|
678
696
|
}
|
|
679
|
-
let mapLinks = this.
|
|
697
|
+
let mapLinks = this.getData().getLinksWithRels(types);
|
|
680
698
|
if (Array.isArray(this.displayWebMapLink_)) {
|
|
681
699
|
mapLinks = this.displayWebMapLink_
|
|
682
700
|
.map((link) => {
|
|
@@ -723,6 +741,47 @@ class STACLayer extends LayerGroup {
|
|
|
723
741
|
}
|
|
724
742
|
await this.updateLayers_();
|
|
725
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* Updates the children STAC entities to be rendered.
|
|
746
|
+
* @param {ItemCollection|Object|Array<STAC>|string|null} childs The children to show.
|
|
747
|
+
* @param {Options} [options] STACLayer options for the children. Only applies if `children` are given.
|
|
748
|
+
* @return {Promise} Resolves when all items are rendered.
|
|
749
|
+
* @api
|
|
750
|
+
*/
|
|
751
|
+
async setChildren(childs, options = {}) {
|
|
752
|
+
if (!childs) {
|
|
753
|
+
this.children_ = null;
|
|
754
|
+
this.childrenOptions_ = {};
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
if (typeof childs === 'string') {
|
|
758
|
+
const response = await fetch(childs);
|
|
759
|
+
childs = await response.json();
|
|
760
|
+
}
|
|
761
|
+
if (typeof childs === 'object' && childs.type === 'FeatureCollection') {
|
|
762
|
+
childs = childs.features;
|
|
763
|
+
}
|
|
764
|
+
if (childs instanceof ItemCollection) {
|
|
765
|
+
this.children_ = childs.getAll();
|
|
766
|
+
}
|
|
767
|
+
else if (Array.isArray(childs)) {
|
|
768
|
+
childs = childs.map((child) => {
|
|
769
|
+
if (child instanceof STAC) {
|
|
770
|
+
return child;
|
|
771
|
+
}
|
|
772
|
+
return create(child);
|
|
773
|
+
});
|
|
774
|
+
this.children_ = childs;
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
this.children_ = null; // Invalid input
|
|
778
|
+
}
|
|
779
|
+
if (this.children_ && this.children_.length === 0) {
|
|
780
|
+
this.children_ = null;
|
|
781
|
+
}
|
|
782
|
+
this.childrenOptions_ = options;
|
|
783
|
+
await this.updateLayers_();
|
|
784
|
+
}
|
|
726
785
|
/**
|
|
727
786
|
* Get the STAC object.
|
|
728
787
|
*
|
|
@@ -730,7 +789,16 @@ class STACLayer extends LayerGroup {
|
|
|
730
789
|
* @api
|
|
731
790
|
*/
|
|
732
791
|
getData() {
|
|
733
|
-
return this.
|
|
792
|
+
return this.get('stac');
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Get the children STAC entities.
|
|
796
|
+
*
|
|
797
|
+
* @return {STAC} The STAC child entities.
|
|
798
|
+
* @api
|
|
799
|
+
*/
|
|
800
|
+
getChildren() {
|
|
801
|
+
return this.children_;
|
|
734
802
|
}
|
|
735
803
|
/**
|
|
736
804
|
* Get the STAC assets shown.
|
|
@@ -771,6 +839,30 @@ class STACLayer extends LayerGroup {
|
|
|
771
839
|
return transformExtent(bbox, 'EPSG:4326', view.getProjection());
|
|
772
840
|
}
|
|
773
841
|
}
|
|
842
|
+
/**
|
|
843
|
+
* Get the attributions of the STAC entity assigned to this layer.
|
|
844
|
+
*
|
|
845
|
+
* @return {Array<string>} Attributions for this layer.
|
|
846
|
+
* @api
|
|
847
|
+
*/
|
|
848
|
+
getAttributions() {
|
|
849
|
+
const attribution = [];
|
|
850
|
+
const stac = this.getData();
|
|
851
|
+
if (stac) {
|
|
852
|
+
const attribution = stac.getMetadata('attribution');
|
|
853
|
+
if (attribution) {
|
|
854
|
+
attribution.push(attribution);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
return attribution;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Get the layer source.
|
|
861
|
+
* @return {SourceType|null} The layer source (or `null` if not yet set).
|
|
862
|
+
*/
|
|
863
|
+
getSource() {
|
|
864
|
+
return null;
|
|
865
|
+
}
|
|
774
866
|
}
|
|
775
867
|
export default STACLayer;
|
|
776
868
|
//# 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,sBAAsB,CAAC;AAC3C,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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ACR;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-
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"description": "An \"automagical\" STAC LayerGroup for OpenLayers",
|
|
5
5
|
"homepage": "https://mohr.ws",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"url": "https://github.com/sponsors/m-mohr"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"ol-pmtiles": "
|
|
22
|
-
"stac-js": "0.
|
|
21
|
+
"ol-pmtiles": "~0.2.0",
|
|
22
|
+
"stac-js": "~0.1.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"ol": "
|
|
25
|
+
"ol": "*"
|
|
26
26
|
},
|
|
27
27
|
"browserslist": [
|
|
28
28
|
"> 1%",
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
-
|
|
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 } =
|
|
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 =
|
|
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
|
|
102
|
-
if (
|
|
108
|
+
const code = reference.getMetadata('proj:code');
|
|
109
|
+
if (code) {
|
|
103
110
|
try {
|
|
104
|
-
|
|
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,EAA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