ol-stac 1.5.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,11 +17,12 @@ Dig into the API documentation for all details:
17
17
 
18
18
  ### OpenLayers versions
19
19
 
20
- ol-stac works best with OpenLayers >= 10.9.0.
20
+ ol-stac works best with OpenLayers >= 10.10.0.
21
21
 
22
22
  It should work with older versions >= 9.0.0, but certain features will be unavailable
23
23
  or work less reliably, for example:
24
24
 
25
+ - Better no-data/transparency handling (requires >= 10.10.0)
25
26
  - Better per-band visualization of GeoTiff files (requires >= 10.9.0)
26
27
  - Automatic loading of missing projections for GeoTiff files (EPSG code retrieval requires >= 10.0.0, other projection codes require >= 10.8.0)
27
28
  - GeoZARR support (requires >= 10.8.0)
package/http.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Creates an `imageLoadFunction` (e.g. for `ol/source/ImageStatic`) that
3
+ * attaches the headers returned by the given function to the image requests.
4
+ * See {@link module:ol/http~load} for details.
5
+ *
6
+ * @param {GetHeadersFn} getHeaders Returns the headers to send for a URL.
7
+ * @param {OnErrorFn|null} [onError] Called when a request failed.
8
+ * @return {function(import('ol/Image.js').default, string): void} The image load function.
9
+ * @api
10
+ */
11
+ export function createImageLoadFunction(getHeaders: GetHeadersFn, onError?: OnErrorFn | null): (arg0: import("ol/Image.js").default, arg1: string) => void;
12
+ /**
13
+ * Creates a `tileLoadFunction` for image tile sources (e.g. `ol/source/XYZ`)
14
+ * that attaches the headers returned by the given function to the tile
15
+ * requests. The headers are requested per tile URL.
16
+ * See {@link module:ol/http~load} for details.
17
+ *
18
+ * @param {GetHeadersFn} getHeaders Returns the headers to send for a URL.
19
+ * @param {OnErrorFn|null} [onError] Called when a request failed.
20
+ * @return {function(import('ol/Tile.js').default, string): void} The tile load function.
21
+ * @api
22
+ */
23
+ export function createTileLoadFunction(getHeaders: GetHeadersFn, onError?: OnErrorFn | null): (arg0: import("ol/Tile.js").default, arg1: string) => void;
24
+ /**
25
+ * A function that returns the HTTP headers to send for the given URL,
26
+ * or `null` if no additional headers should be sent.
27
+ */
28
+ export type GetHeadersFn = (arg0: string) => ({
29
+ [x: string]: string;
30
+ } | null);
31
+ /**
32
+ * A function that is called when a request has failed.
33
+ */
34
+ export type OnErrorFn = (arg0: Error) => void;
35
+ //# sourceMappingURL=http.d.ts.map
package/http.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/ol/http.js"],"names":[],"mappings":"AAyEA;;;;;;;;;GASG;AACH,oDALW,YAAY,YACZ,SAAS,GAAC,IAAI,GACb,CAAS,IAA6B,EAA7B,OAAO,aAAa,EAAE,OAAO,EAAE,IAAM,EAAN,MAAM,KAAG,IAAI,CAQhE;AAED;;;;;;;;;;GAUG;AACH,mDALW,YAAY,YACZ,SAAS,GAAC,IAAI,GACb,CAAS,IAA4B,EAA5B,OAAO,YAAY,EAAE,OAAO,EAAE,IAAM,EAAN,MAAM,KAAG,IAAI,CAU/D;;;;;2BArGY,CAAS,IAAM,EAAN,MAAM,KAAG,CAAC;QAAO,MAAM,GAAE,MAAM;CAAC,GAAC,IAAI,CAAC;;;;wBAK/C,CAAS,IAAK,EAAL,KAAK,KAAG,IAAI"}
package/http.js ADDED
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @module ol/http
3
+ */
4
+ /**
5
+ * A function that returns the HTTP headers to send for the given URL,
6
+ * or `null` if no additional headers should be sent.
7
+ * @typedef {function(string): (Object<string, string>|null)} GetHeadersFn
8
+ */
9
+ /**
10
+ * A function that is called when a request has failed.
11
+ * @typedef {function(Error): void} OnErrorFn
12
+ */
13
+ /**
14
+ * Checks whether the given headers are a non-empty object.
15
+ * @param {*} headers The headers to check.
16
+ * @return {boolean} `true` if there's at least one header, `false` otherwise.
17
+ */
18
+ function hasHeaders(headers) {
19
+ return (typeof headers === 'object' &&
20
+ headers !== null &&
21
+ Object.keys(headers).length > 0);
22
+ }
23
+ /**
24
+ * Loads the given source into the image element.
25
+ *
26
+ * If headers are returned for the source URL, the source is requested
27
+ * through the Fetch API with the headers attached and the response is
28
+ * assigned to the image element as an object URL, which is revoked once
29
+ * the image has loaded. Otherwise, the source is assigned directly.
30
+ *
31
+ * On request failure, the error is reported and the source is assigned
32
+ * directly as a fallback, so that errors are reported through the image
33
+ * element as usual.
34
+ *
35
+ * @param {HTMLImageElement} img The image element to load the source into.
36
+ * @param {string} src The source URL.
37
+ * @param {GetHeadersFn} getHeaders Returns the headers to send for a URL.
38
+ * @param {OnErrorFn|null} onError Called when the request failed.
39
+ */
40
+ function load(img, src, getHeaders, onError) {
41
+ const headers = getHeaders(src);
42
+ if (!hasHeaders(headers)) {
43
+ img.src = src;
44
+ return;
45
+ }
46
+ fetch(src, { headers })
47
+ .then((response) => {
48
+ if (!response.ok) {
49
+ throw new Error(`Unexpected response from ${src}: ${response.status}`);
50
+ }
51
+ return response.blob();
52
+ })
53
+ .then((blob) => {
54
+ const objectUrl = URL.createObjectURL(blob);
55
+ const revoke = () => URL.revokeObjectURL(objectUrl);
56
+ img.addEventListener('load', revoke, { once: true });
57
+ img.addEventListener('error', revoke, { once: true });
58
+ img.src = objectUrl;
59
+ })
60
+ .catch((error) => {
61
+ if (onError) {
62
+ onError(error);
63
+ }
64
+ img.src = src;
65
+ });
66
+ }
67
+ /**
68
+ * Creates an `imageLoadFunction` (e.g. for `ol/source/ImageStatic`) that
69
+ * attaches the headers returned by the given function to the image requests.
70
+ * See {@link module:ol/http~load} for details.
71
+ *
72
+ * @param {GetHeadersFn} getHeaders Returns the headers to send for a URL.
73
+ * @param {OnErrorFn|null} [onError] Called when a request failed.
74
+ * @return {function(import('ol/Image.js').default, string): void} The image load function.
75
+ * @api
76
+ */
77
+ export function createImageLoadFunction(getHeaders, onError = null) {
78
+ return (image, src) => {
79
+ const img = /** @type {HTMLImageElement} */ (image.getImage());
80
+ load(img, src, getHeaders, onError);
81
+ };
82
+ }
83
+ /**
84
+ * Creates a `tileLoadFunction` for image tile sources (e.g. `ol/source/XYZ`)
85
+ * that attaches the headers returned by the given function to the tile
86
+ * requests. The headers are requested per tile URL.
87
+ * See {@link module:ol/http~load} for details.
88
+ *
89
+ * @param {GetHeadersFn} getHeaders Returns the headers to send for a URL.
90
+ * @param {OnErrorFn|null} [onError] Called when a request failed.
91
+ * @return {function(import('ol/Tile.js').default, string): void} The tile load function.
92
+ * @api
93
+ */
94
+ export function createTileLoadFunction(getHeaders, onError = null) {
95
+ return (tile, src) => {
96
+ const img = /** @type {HTMLImageElement} */ (
97
+ /** @type {import('ol/ImageTile.js').default} */ (tile).getImage());
98
+ load(img, src, getHeaders, onError);
99
+ };
100
+ }
101
+ //# sourceMappingURL=http.js.map
package/http.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/ol/http.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH,SAAS,UAAU,CAAC,OAAO;IACzB,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAChC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO;IACzC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;QACd,OAAO;IACT,CAAC;IACD,KAAK,CAAC,GAAG,EAAE,EAAC,OAAO,EAAC,CAAC;SAClB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAA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,GAAG,EAAE,EAAE;QACnB,MAAM,GAAG,GAAG,+BAA+B,CAAC;QAC1C,gDAAgD,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CACnE,CAAC;QACF,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC"}
package/layer/STAC.d.ts CHANGED
@@ -6,8 +6,12 @@ export type Link = any;
6
6
  export type STAC = any;
7
7
  export type STACObject = any;
8
8
  export type Map = import("ol/Map.js").default;
9
- export type Style = import('ol/style/Style.js').default;
10
- export type SourceOptions = import('../source/type.js').SourceOptions;
9
+ export type Style = import("ol/style/Style.js").default;
10
+ export type SourceOptions = import("../source/type.js").SourceOptions;
11
+ export type LayerOptions = import("./type.js").LayerOptions;
12
+ export type GetHeadersFn = import("../http.js").GetHeadersFn;
13
+ export type OnErrorFn = import("../http.js").OnErrorFn;
14
+ export type LoadFunction = (arg0: (import("ol/Image.js").default | import("ol/Tile.js").default), arg1: string) => void;
11
15
  export type Options = {
12
16
  /**
13
17
  * The STAC URL. Any of `url` and `data` must be provided.
@@ -45,10 +49,19 @@ export type Options = {
45
49
  * Optional function that can be used to configure the underlying sources. The function can do any additional work
46
50
  * and return the completed options or a promise for the same. The function will be called with the current source options
47
51
  * and the STAC Asset or Link.
48
- * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
49
- * Please be aware that sending HTTP headers may not be supported by all sources.
52
+ * This can be useful for advanced per-source customization such as signed URLs.
53
+ * To add credentials via query parameters, use the `getRequestUrl` option instead;
54
+ * to send credentials via HTTP headers, use the `getRequestHeaders` option instead.
50
55
  */
51
56
  getSourceOptions?: ((arg0: SourceType, arg1: SourceOptions, arg2: (Asset | Link)) => (SourceOptions | Promise<SourceOptions>)) | undefined;
57
+ /**
58
+ * Optional function that can be used to configure the individual layers that are created for the assets and links.
59
+ * The function can do any additional (asynchronous) work and return the completed options or a promise for the same.
60
+ * The function will be called with the layer type, the current layer options and the STAC Asset or Link.
61
+ * This can be useful to customize the layers, e.g. to apply a style to a GeoTIFF or GeoZarr layer that is
62
+ * loaded from the STAC metadata.
63
+ */
64
+ getLayerOptions?: ((arg0: LayerType, arg1: LayerOptions, arg2: (Asset | Link)) => (LayerOptions | Promise<LayerOptions>)) | undefined;
52
65
  /**
53
66
  * Allows to hide the footprints (bounding box/geometry) of the STAC object
54
67
  * by default.
@@ -67,10 +80,21 @@ export type Options = {
67
80
  */
68
81
  displayPreview?: boolean | undefined;
69
82
  /**
70
- * Allow to display COGs/WOZs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
83
+ * Allow to display COGs, Zarr and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
71
84
  * usually an asset with role `overview` or `visual`.
85
+ * Zarr assets other than Web-Optimized Zarr are only displayed if the STAC metadata declares what to render
86
+ * (see the datacube extension) and the store is within the `maxDisplayPixels` limit.
72
87
  */
73
88
  displayOverview?: boolean | undefined;
89
+ /**
90
+ * The maximum number of pixels the coarsest resolution level
91
+ * of a GeoTIFF or Zarr asset may have to be displayed client-side, as displaying the full extent of an asset
92
+ * loads every tile of that level. Files without (sufficient) overviews can easily exceed this limit.
93
+ * Larger assets are not chosen for the default visualization, and selecting one explicitly through `assets`
94
+ * reports an error through the `error` event (or renders through the tile server if `buildTileUrlTemplate`
95
+ * and `useTileLayerAsFallback` are set). Set to `Infinity` to display assets of any size.
96
+ */
97
+ maxDisplayPixels?: number | undefined;
74
98
  /**
75
99
  * Allow to display a layer
76
100
  * based on the information provided through the web map links extension.
@@ -84,6 +108,13 @@ export type Options = {
84
108
  * The style for GeoTIFF and GeoZarr layers (WebGLTileLayer style).
85
109
  */
86
110
  style?: import("ol/layer/WebGLTile.js").Style | null | undefined;
111
+ /**
112
+ * The colors of the colormap
113
+ * that is used for continuous single-band data when neither the STAC metadata nor the `style` option define
114
+ * a coloring. The colors are evenly distributed over the value range of the data (e.g. from the STAC
115
+ * `statistics`). If not set, the data is stretched to grayscale.
116
+ */
117
+ defaultColormap?: (string | import("ol/color.js").Color)[] | null | undefined;
87
118
  /**
88
119
  * The style for the overall bounds / footprint.
89
120
  */
@@ -101,8 +132,10 @@ export type Options = {
101
132
  * A function that generates a URL template for a tile server (XYZ),
102
133
  * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
103
134
  * The function provided can return a promise (i.e. be async) or a string.
135
+ * The function can return `null` to not pass the given asset or link to the tile server,
136
+ * e.g. to filter by media type or protocol. In this case client-side rendering is used instead.
104
137
  */
105
- buildTileUrlTemplate?: ((arg0: (Asset | Link)) => Promise<string> | string | null) | undefined;
138
+ buildTileUrlTemplate?: ((arg0: (Asset | Link)) => Promise<string | null> | string | null) | undefined;
106
139
  /**
107
140
  * Uses the given URL template only when the client-side GeoTIFF rendering fails.
108
141
  */
@@ -162,8 +195,39 @@ export type Options = {
162
195
  * Sets a custom function to make HTTP requests with.
163
196
  * The first parameter is the URL to request and the output is a promise that resolves with the response body.
164
197
  * The second parameter is the return type, either `json` (default) or `text`.
198
+ * The STAC Asset or Link the request is made for is passed as third parameter, if available.
165
199
  */
166
200
  httpRequestFn?: ((arg0: string, arg1: string) => (any)) | undefined;
201
+ /**
202
+ * The HTTP headers (e.g. for authentication) to send with the requests made by this layer,
203
+ * either as a plain object or as a function that returns the headers (or `null` for none) and
204
+ * is called with the STAC Asset or Link that is shown (if available) and the URL that is requested.
205
+ * Use a function to restrict the headers to specific hosts, as tile server URLs and asset URLs
206
+ * may point to hosts that should not receive the credentials.
207
+ * The headers are attached to requests made by the default `httpRequestFn`, to GeoTIFF, GeoZarr
208
+ * and PMTiles requests, and via image/tile load functions (through the Fetch API and object URLs)
209
+ * to preview images and XYZ, TileJSON, WMS and WMTS tiles.
210
+ */
211
+ getRequestHeaders?: {
212
+ [x: string]: string;
213
+ } | ((arg0: (Asset | Link | STACObject | null), arg1: string) => ({
214
+ [x: string]: string;
215
+ } | null)) | undefined;
216
+ /**
217
+ * Rewrites a URL before a request is made or a source is created, e.g. to append query
218
+ * parameters for authentication (signed URLs, API keys). The function is called with the
219
+ * STAC Asset or Link that is shown (if available), the URL, and whether the URL is a
220
+ * tile URL template. It returns the new URL or `null` to keep the URL unchanged.
221
+ * The rewrite is applied to the initial source URL before `getSourceOptions` is called;
222
+ * templates discovered in fetched documents (TileJSON manifests, WMTS capabilities) are
223
+ * rewritten afterwards and are not passed to `getSourceOptions`.
224
+ * For tiled sources the tile URL template is rewritten, not the individual tile URLs.
225
+ * URL templates originate from XYZ web map links, TileJSON manifests, WMTS links
226
+ * (`uriTemplate`) and capabilities, and `buildTileUrlTemplate`. The returned URL must keep
227
+ * the template placeholders such as `{z}` unchanged, i.e. they must not be percent-encoded
228
+ * (e.g. through URL normalization).
229
+ */
230
+ getRequestUrl?: ((arg0: (Asset | Link | STACObject | null), arg1: string, arg2: boolean) => (string | null)) | undefined;
167
231
  };
168
232
  /**
169
233
  * @typedef {import("ol/extent.js").Extent} Extent
@@ -192,6 +256,18 @@ export type Options = {
192
256
  /**
193
257
  * @typedef {import('../source/type.js').SourceOptions} SourceOptions
194
258
  */
259
+ /**
260
+ * @typedef {import('./type.js').LayerOptions} LayerOptions
261
+ */
262
+ /**
263
+ * @typedef {import('../http.js').GetHeadersFn} GetHeadersFn
264
+ */
265
+ /**
266
+ * @typedef {import('../http.js').OnErrorFn} OnErrorFn
267
+ */
268
+ /**
269
+ * @typedef {function((import("ol/Image.js").default|import("ol/Tile.js").default), string): void} LoadFunction
270
+ */
195
271
  /**
196
272
  * @typedef {Object} Options
197
273
  * @property {string} [url] The STAC URL. Any of `url` and `data` must be provided.
@@ -212,8 +288,15 @@ export type Options = {
212
288
  * Optional function that can be used to configure the underlying sources. The function can do any additional work
213
289
  * and return the completed options or a promise for the same. The function will be called with the current source options
214
290
  * and the STAC Asset or Link.
215
- * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
216
- * Please be aware that sending HTTP headers may not be supported by all sources.
291
+ * This can be useful for advanced per-source customization such as signed URLs.
292
+ * To add credentials via query parameters, use the `getRequestUrl` option instead;
293
+ * to send credentials via HTTP headers, use the `getRequestHeaders` option instead.
294
+ * @property {function(LayerType, LayerOptions, (Asset|Link)):(LayerOptions|Promise<LayerOptions>)} [getLayerOptions]
295
+ * Optional function that can be used to configure the individual layers that are created for the assets and links.
296
+ * The function can do any additional (asynchronous) work and return the completed options or a promise for the same.
297
+ * The function will be called with the layer type, the current layer options and the STAC Asset or Link.
298
+ * This can be useful to customize the layers, e.g. to apply a style to a GeoTIFF or GeoZarr layer that is
299
+ * loaded from the STAC metadata.
217
300
  * @property {boolean} [displayFootprint=true] Allows to hide the footprints (bounding box/geometry) of the STAC object
218
301
  * by default.
219
302
  * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
@@ -222,8 +305,16 @@ export type Options = {
222
305
  * i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
223
306
  * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
224
307
  * For performance reasons, it is recommended to enable this option if you pass in STAC API Items instead of `displayOverview`.
225
- * @property {boolean} [displayOverview=true] Allow to display COGs/WOZs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
308
+ * @property {boolean} [displayOverview=true] Allow to display COGs, Zarr and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
226
309
  * usually an asset with role `overview` or `visual`.
310
+ * Zarr assets other than Web-Optimized Zarr are only displayed if the STAC metadata declares what to render
311
+ * (see the datacube extension) and the store is within the `maxDisplayPixels` limit.
312
+ * @property {number} [maxDisplayPixels=16777216] The maximum number of pixels the coarsest resolution level
313
+ * of a GeoTIFF or Zarr asset may have to be displayed client-side, as displaying the full extent of an asset
314
+ * loads every tile of that level. Files without (sufficient) overviews can easily exceed this limit.
315
+ * Larger assets are not chosen for the default visualization, and selecting one explicitly through `assets`
316
+ * reports an error through the `error` event (or renders through the tile server if `buildTileUrlTemplate`
317
+ * and `useTileLayerAsFallback` are set). Set to `Infinity` to display assets of any size.
227
318
  * @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
228
319
  * based on the information provided through the web map links extension.
229
320
  * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
@@ -231,13 +322,19 @@ export type Options = {
231
322
  * it lets this library choose a web map link to show, but only if no other data is shown.
232
323
  * To disable the functionality set this to `false`.
233
324
  * @property {import("ol/layer/WebGLTile.js").Style|null} [style=null] The style for GeoTIFF and GeoZarr layers (WebGLTileLayer style).
325
+ * @property {Array<import("ol/color.js").Color|string>|null} [defaultColormap=null] The colors of the colormap
326
+ * that is used for continuous single-band data when neither the STAC metadata nor the `style` option define
327
+ * a coloring. The colors are evenly distributed over the value range of the data (e.g. from the STAC
328
+ * `statistics`). If not set, the data is stretched to grayscale.
234
329
  * @property {Style} [boundsStyle] The style for the overall bounds / footprint.
235
330
  * @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
236
331
  * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
237
332
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
238
- * @property {function((Asset|Link)):Promise<string>|string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
333
+ * @property {function((Asset|Link)):Promise<string|null>|string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
239
334
  * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
240
335
  * The function provided can return a promise (i.e. be async) or a string.
336
+ * The function can return `null` to not pass the given asset or link to the tile server,
337
+ * e.g. to filter by media type or protocol. In this case client-side rendering is used instead.
241
338
  * @property {boolean} [useTileLayerAsFallback=false] Uses the given URL template only when the client-side GeoTIFF rendering fails.
242
339
  * @property {number} [opacity=1] Opacity (0, 1).
243
340
  * @property {boolean} [visible=true] Visibility.
@@ -261,6 +358,29 @@ export type Options = {
261
358
  * @property {function(string,string):(*)} [httpRequestFn=null] Sets a custom function to make HTTP requests with.
262
359
  * The first parameter is the URL to request and the output is a promise that resolves with the response body.
263
360
  * The second parameter is the return type, either `json` (default) or `text`.
361
+ * The STAC Asset or Link the request is made for is passed as third parameter, if available.
362
+ * @property {Object<string, string>|function((Asset|Link|STACObject|null), string):(Object<string, string>|null)} [getRequestHeaders=null]
363
+ * The HTTP headers (e.g. for authentication) to send with the requests made by this layer,
364
+ * either as a plain object or as a function that returns the headers (or `null` for none) and
365
+ * is called with the STAC Asset or Link that is shown (if available) and the URL that is requested.
366
+ * Use a function to restrict the headers to specific hosts, as tile server URLs and asset URLs
367
+ * may point to hosts that should not receive the credentials.
368
+ * The headers are attached to requests made by the default `httpRequestFn`, to GeoTIFF, GeoZarr
369
+ * and PMTiles requests, and via image/tile load functions (through the Fetch API and object URLs)
370
+ * to preview images and XYZ, TileJSON, WMS and WMTS tiles.
371
+ * @property {function((Asset|Link|STACObject|null), string, boolean):(string|null)} [getRequestUrl=null]
372
+ * Rewrites a URL before a request is made or a source is created, e.g. to append query
373
+ * parameters for authentication (signed URLs, API keys). The function is called with the
374
+ * STAC Asset or Link that is shown (if available), the URL, and whether the URL is a
375
+ * tile URL template. It returns the new URL or `null` to keep the URL unchanged.
376
+ * The rewrite is applied to the initial source URL before `getSourceOptions` is called;
377
+ * templates discovered in fetched documents (TileJSON manifests, WMTS capabilities) are
378
+ * rewritten afterwards and are not passed to `getSourceOptions`.
379
+ * For tiled sources the tile URL template is rewritten, not the individual tile URLs.
380
+ * URL templates originate from XYZ web map links, TileJSON manifests, WMTS links
381
+ * (`uriTemplate`) and capabilities, and `buildTileUrlTemplate`. The returned URL must keep
382
+ * the template placeholders such as `{z}` unchanged, i.e. they must not be percent-encoded
383
+ * (e.g. through URL normalization).
264
384
  */
265
385
  /**
266
386
  * @classdesc
@@ -284,6 +404,21 @@ declare class STACLayer extends LayerGroup {
284
404
  * @private
285
405
  */
286
406
  private getSourceOptions_;
407
+ /**
408
+ * @type {function(LayerType, LayerOptions, (Asset|Link)):(LayerOptions|Promise<LayerOptions>)}
409
+ * @private
410
+ */
411
+ private getLayerOptions_;
412
+ /**
413
+ * @type {Object<string, string>|function((Asset|Link|STACObject|null), string):(Object<string, string>|null)|null}
414
+ * @private
415
+ */
416
+ private getRequestHeaders_;
417
+ /**
418
+ * @type {function((Asset|Link|STACObject|null), string, boolean):(string|null)|null}
419
+ * @private
420
+ */
421
+ private getRequestUrl_;
287
422
  /**
288
423
  * @type {Array<STAC>|null}
289
424
  * @private
@@ -334,7 +469,12 @@ declare class STACLayer extends LayerGroup {
334
469
  */
335
470
  displayWebMapLink_: string | boolean | Array<Link | string>;
336
471
  /**
337
- * @type {function((Asset|Link)):Promise<string>|string|null}
472
+ * @type {number|undefined}
473
+ * @private
474
+ */
475
+ private maxDisplayPixels_;
476
+ /**
477
+ * @type {function((Asset|Link)):Promise<string|null>|string|null}
338
478
  * @private
339
479
  */
340
480
  private buildTileUrlTemplate_;
@@ -348,6 +488,11 @@ declare class STACLayer extends LayerGroup {
348
488
  * @private
349
489
  */
350
490
  private style_;
491
+ /**
492
+ * @type {Array<import("ol/color.js").Color|string>|null}
493
+ * @private
494
+ */
495
+ private defaultColormap_;
351
496
  /**
352
497
  * @type {Style}
353
498
  * @private
@@ -383,9 +528,40 @@ declare class STACLayer extends LayerGroup {
383
528
  *
384
529
  * @param {string} url The URL to request and the output is a promise that resolves with the response body.
385
530
  * @param {string} responseType The return type, either `json` (default) or `text`.
531
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link the request is made for, if available.
386
532
  * @return {Promise<*>} The (parsed) response body.
387
533
  */
388
- fetch_(url: string, responseType?: string): Promise<any>;
534
+ fetch_(url: string, responseType?: string, ref?: Asset | Link | STACObject | null): Promise<any>;
535
+ /**
536
+ * Rewrites the given URL based on the `getRequestUrl` option.
537
+ *
538
+ * @param {string} url The URL that is requested.
539
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link that is shown, if available.
540
+ * @param {boolean} [isTemplate] Whether the URL is a tile URL template with placeholders such as `{z}`.
541
+ * @return {string} The rewritten URL, or the given URL if it is not rewritten.
542
+ */
543
+ getRequestUrlFor_(url: string, ref?: Asset | Link | STACObject | null, isTemplate?: boolean): string;
544
+ /**
545
+ * Returns the HTTP headers to send for the given URL, based on the
546
+ * `getRequestHeaders` option.
547
+ *
548
+ * @param {string} url The URL that is requested.
549
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link that is shown, if available.
550
+ * @return {Object<string, string>|null} The headers, or `null` if there are none.
551
+ */
552
+ getRequestHeadersFor_(url: string, ref?: Asset | Link | STACObject | null): {
553
+ [x: string]: string;
554
+ } | null;
555
+ /**
556
+ * Creates a load function for images or tiles that attaches the headers
557
+ * from the `getRequestHeaders` option and reports errors through the
558
+ * layer's error event, or `undefined` if no headers are configured.
559
+ *
560
+ * @param {function(GetHeadersFn, OnErrorFn=):LoadFunction} factory `createImageLoadFunction` or `createTileLoadFunction`.
561
+ * @param {Asset|Link|STACObject|null} ref The STAC Asset or Link that is shown, if available.
562
+ * @return {LoadFunction|undefined} The load function.
563
+ */
564
+ createLoadFunction_(factory: (arg0: GetHeadersFn, arg1: OnErrorFn | undefined) => LoadFunction, ref: Asset | Link | STACObject | null): LoadFunction | undefined;
389
565
  /**
390
566
  * Returns the vector layer that visualizes the bounds / footprint.
391
567
  * @return {VectorLayer|null} The vector layer for the bounds
@@ -459,19 +635,32 @@ declare class STACLayer extends LayerGroup {
459
635
  * @return {Promise<Array<Layer>|undefined>} Resolves with a list of layers or undefined when complete.
460
636
  * @api
461
637
  */
462
- addLayerForLink(link: any): Promise<Array<Layer> | undefined>;
638
+ addLayerForLink(link: Link): Promise<Array<Layer> | undefined>;
463
639
  /**
464
640
  * @param {Asset} [asset] A STAC Asset
641
+ * @param {boolean} [autoDisplay] Whether the asset was chosen automatically
642
+ * (not explicitly requested): skip it silently instead of reporting an
643
+ * error when it can't be displayed within the configured limits.
465
644
  * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
466
645
  * @private
467
646
  */
468
647
  private addGeoTiff_;
469
648
  /**
470
649
  * @param {Asset|Link} [data] A STAC Asset or Link
471
- * @return {Promise<TileLayer>} Resolves with a TileLayer when complete.
650
+ * @return {Promise<TileLayer|undefined>} Resolves with a TileLayer, or undefined if no tile server URL was provided.
472
651
  * @private
473
652
  */
474
653
  private addTileLayerForImagery_;
654
+ /**
655
+ * Passes the layer options through the `getLayerOptions` function, if given.
656
+ *
657
+ * @param {LayerType} type The type of the layer that is going to be created.
658
+ * @param {LayerOptions} options The layer options.
659
+ * @param {Asset|Link} reference The STAC Asset or Link the layer is created for.
660
+ * @return {Promise<*>} The updated layer options.
661
+ * @private
662
+ */
663
+ private updateLayerOptions_;
475
664
  /**
476
665
  * @param {Layer|LayerGroup} [layer] A Layer to add to the LayerGroup
477
666
  * @param {STACObject} [data] The STAC object, can be any class exposed by stac-js
@@ -491,15 +680,15 @@ declare class STACLayer extends LayerGroup {
491
680
  */
492
681
  private addGeoJson_;
493
682
  /**
494
- * Creates a GeoJSON vector layer from the given GeoJSON object.
683
+ * Creates the options for a GeoJSON vector layer from the given GeoJSON object.
495
684
  *
496
685
  * @param {GeoJSON} [geojson] The GeoJSON object.
497
686
  * @param {Style} [style] The style for the layer.
498
687
  * @param {boolean} [visible] Whether the layer is visible.
499
- * @return {VectorLayer} The new vector layer.
688
+ * @return {import("ol/layer/Vector.js").Options} The vector layer options.
500
689
  * @private
501
690
  */
502
- private createGeoJsonLayer_;
691
+ private getGeoJsonLayerOptions_;
503
692
  /**
504
693
  * Adds GeoJSON labels and GeoTIFF source imagery to the map based on the label extension.
505
694
  *
@@ -507,7 +696,29 @@ declare class STACLayer extends LayerGroup {
507
696
  * @private
508
697
  */
509
698
  private addLabelExtension_;
510
- addGeoZarr_(asset: any): Promise<WebGLTileLayer | TileLayer<import("ol/source/Tile.js").default<import("ol/Tile.js").default>> | undefined>;
699
+ /**
700
+ * Checks the `maxDisplayPixels` limit for the given source.
701
+ * Returns `true` when the layer must not be added: automatically chosen
702
+ * assets are limited silently, for explicitly requested assets an error
703
+ * is thrown so that callers can fall back or report it.
704
+ * @param {import('ol/source/Tile.js').default} source The configured (ready) source.
705
+ * @param {Asset} asset The asset the source was created for.
706
+ * @param {boolean} autoDisplay Whether the asset was chosen automatically.
707
+ * @return {boolean} `true` if the asset must not be displayed.
708
+ * @private
709
+ */
710
+ private checkDisplayLimit_;
711
+ /**
712
+ * Adds a layer for a GeoZarr asset.
713
+ * @param {Asset} asset The Zarr asset to show.
714
+ * @param {boolean} [autoDisplay] Whether the asset was chosen automatically
715
+ * (not explicitly requested): skip it silently instead of reporting an
716
+ * error when it doesn't declare what to render or can't be displayed
717
+ * within the configured limits.
718
+ * @return {Promise<Layer|undefined>} The layer, if one was added.
719
+ * @private
720
+ */
721
+ private addGeoZarr_;
511
722
  /**
512
723
  * Update the layers shown manually based on the current configuration.
513
724
  * Usually this doesn't need to be called manually.
@@ -515,7 +726,7 @@ declare class STACLayer extends LayerGroup {
515
726
  * @return {Promise} Resolves once the layers are updated.
516
727
  * @api
517
728
  */
518
- updateLayers(emit?: boolean | undefined): Promise<any>;
729
+ updateLayers(emit?: boolean): Promise<any>;
519
730
  /**
520
731
  * Indicates whether the LayerGroup shows only the bounds layer (i.e. no imagery/tile layers).
521
732
  * @return {boolean} `true` if only the bounds layer is shown, `false` otherwise.
@@ -534,6 +745,17 @@ declare class STACLayer extends LayerGroup {
534
745
  * @api
535
746
  */
536
747
  setStyle(style: import("ol/layer/WebGLTile.js").Style | null): void;
748
+ /**
749
+ * Set the colors of the colormap that is used for continuous single-band
750
+ * data when neither the STAC metadata nor the `style` option define a
751
+ * coloring. The colors are evenly distributed over the value range of the
752
+ * data (e.g. from the STAC `statistics`). Set to `null` to stretch the
753
+ * data to grayscale instead.
754
+ * @param {Array<import("ol/color.js").Color|string>|null} colormap The colors of the colormap.
755
+ * @return {Promise} Resolves once the layers are updated.
756
+ * @api
757
+ */
758
+ setDefaultColormap(colormap: Array<import("ol/color.js").Color | string> | null): Promise<any>;
537
759
  /**
538
760
  * Update the assets to be rendered.
539
761
  * @param {Array<string|Asset>|null} assets The assets to show.
@@ -541,7 +763,7 @@ declare class STACLayer extends LayerGroup {
541
763
  * @return {Promise} Resolves when all assets are rendered.
542
764
  * @api
543
765
  */
544
- setAssets(assets: Array<string | Asset> | null, updateLayers?: boolean | undefined): Promise<any>;
766
+ setAssets(assets: Array<string | Asset> | null, updateLayers?: boolean): Promise<any>;
545
767
  /**
546
768
  * Updates the children STAC entities to be rendered.
547
769
  *
@@ -553,7 +775,7 @@ declare class STACLayer extends LayerGroup {
553
775
  * @return {Promise} Resolves when all items are rendered.
554
776
  * @api
555
777
  */
556
- setChildren(childs: APICollection | any | Array<STAC | any> | null, options?: Options | null | undefined, updateLayers?: boolean | undefined): Promise<any>;
778
+ setChildren(childs: APICollection | any | Array<STAC | any> | null, options?: Options | null, updateLayers?: boolean): Promise<any>;
557
779
  /**
558
780
  * Get the STAC object.
559
781
  *
@@ -591,6 +813,7 @@ declare class STACLayer extends LayerGroup {
591
813
  /**
592
814
  * Gets the WMTS capabilities from the given web-map-links URL.
593
815
  * @param {string} url Base URL for the WMTS
816
+ * @param {Link} link The web map link the request is made for.
594
817
  * @param {string} [encoding] The request encoding, either `kvp` (default) or `rest`.
595
818
  * @return {Promise<Object|null>} Resolves with the WMTS Capabilities object
596
819
  * @private
@@ -598,8 +821,7 @@ declare class STACLayer extends LayerGroup {
598
821
  private getWmtsCapabilities_;
599
822
  }
600
823
  import SourceType from '../source/type.js';
824
+ import LayerType from './type.js';
601
825
  import LayerGroup from 'ol/layer/Group.js';
602
826
  import VectorLayer from 'ol/layer/Vector.js';
603
- import WebGLTileLayer from 'ol/layer/WebGLTile.js';
604
- import TileLayer from 'ol/layer/Tile.js';
605
827
  //# sourceMappingURL=STAC.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"STAC.d.ts","sourceRoot":"","sources":["../../../src/ol/layer/STAC.js"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