ol-stac 1.5.0 → 1.6.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 | undefined): (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 | undefined): (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,kDAEF,OAAO,aAAa,EAAE,OAAO,QAAE,MAAM,KAAG,IAAI,CAQhE;AAED;;;;;;;;;;GAUG;AACH,mDALW,YAAY,kDAEF,OAAO,YAAY,EAAE,OAAO,QAAE,MAAM,KAAG,IAAI,CAU/D;;;;;kCArGqB,MAAM,KAAG,CAAC;QAAO,MAAM,GAAE,MAAM;IAAE,IAAI,CAAC;;;;+BAKtC,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;QACxB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;QACd,OAAO;KACR;IACD,KAAK,CAAC,GAAG,EAAE,EAAC,OAAO,EAAC,CAAC;SAClB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;SACxE;QACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC,CAAC;S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AAE,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC"}
package/layer/STAC.d.ts CHANGED
@@ -8,6 +8,10 @@ export type STACObject = any;
8
8
  export type Map = import("ol/Map.js").default;
9
9
  export type Style = import('ol/style/Style.js').default;
10
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,32 @@ 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) and the URL, and returns the new URL or
220
+ * `null` to keep the URL unchanged. The rewrite is applied before `getSourceOptions` is called.
221
+ * For tiled sources the tile URL template is rewritten, not the individual tile URLs.
222
+ */
223
+ getRequestUrl?: ((arg0: (Asset | Link | STACObject | null), arg1: string) => (string | null)) | undefined;
167
224
  };
168
225
  /**
169
226
  * @typedef {import("ol/extent.js").Extent} Extent
@@ -192,6 +249,18 @@ export type Options = {
192
249
  /**
193
250
  * @typedef {import('../source/type.js').SourceOptions} SourceOptions
194
251
  */
252
+ /**
253
+ * @typedef {import('./type.js').LayerOptions} LayerOptions
254
+ */
255
+ /**
256
+ * @typedef {import('../http.js').GetHeadersFn} GetHeadersFn
257
+ */
258
+ /**
259
+ * @typedef {import('../http.js').OnErrorFn} OnErrorFn
260
+ */
261
+ /**
262
+ * @typedef {function((import("ol/Image.js").default|import("ol/Tile.js").default), string): void} LoadFunction
263
+ */
195
264
  /**
196
265
  * @typedef {Object} Options
197
266
  * @property {string} [url] The STAC URL. Any of `url` and `data` must be provided.
@@ -212,8 +281,15 @@ export type Options = {
212
281
  * Optional function that can be used to configure the underlying sources. The function can do any additional work
213
282
  * and return the completed options or a promise for the same. The function will be called with the current source options
214
283
  * 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.
284
+ * This can be useful for advanced per-source customization such as signed URLs.
285
+ * To add credentials via query parameters, use the `getRequestUrl` option instead;
286
+ * to send credentials via HTTP headers, use the `getRequestHeaders` option instead.
287
+ * @property {function(LayerType, LayerOptions, (Asset|Link)):(LayerOptions|Promise<LayerOptions>)} [getLayerOptions]
288
+ * Optional function that can be used to configure the individual layers that are created for the assets and links.
289
+ * The function can do any additional (asynchronous) work and return the completed options or a promise for the same.
290
+ * The function will be called with the layer type, the current layer options and the STAC Asset or Link.
291
+ * This can be useful to customize the layers, e.g. to apply a style to a GeoTIFF or GeoZarr layer that is
292
+ * loaded from the STAC metadata.
217
293
  * @property {boolean} [displayFootprint=true] Allows to hide the footprints (bounding box/geometry) of the STAC object
218
294
  * by default.
219
295
  * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
@@ -222,8 +298,16 @@ export type Options = {
222
298
  * i.e. assets with any of the roles `thumbnail`, `overview`, or a link with relation type `preview`.
223
299
  * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
224
300
  * 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,
301
+ * @property {boolean} [displayOverview=true] Allow to display COGs, Zarr and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
226
302
  * usually an asset with role `overview` or `visual`.
303
+ * Zarr assets other than Web-Optimized Zarr are only displayed if the STAC metadata declares what to render
304
+ * (see the datacube extension) and the store is within the `maxDisplayPixels` limit.
305
+ * @property {number} [maxDisplayPixels=16777216] The maximum number of pixels the coarsest resolution level
306
+ * of a GeoTIFF or Zarr asset may have to be displayed client-side, as displaying the full extent of an asset
307
+ * loads every tile of that level. Files without (sufficient) overviews can easily exceed this limit.
308
+ * Larger assets are not chosen for the default visualization, and selecting one explicitly through `assets`
309
+ * reports an error through the `error` event (or renders through the tile server if `buildTileUrlTemplate`
310
+ * and `useTileLayerAsFallback` are set). Set to `Infinity` to display assets of any size.
227
311
  * @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
228
312
  * based on the information provided through the web map links extension.
229
313
  * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
@@ -231,13 +315,19 @@ export type Options = {
231
315
  * it lets this library choose a web map link to show, but only if no other data is shown.
232
316
  * To disable the functionality set this to `false`.
233
317
  * @property {import("ol/layer/WebGLTile.js").Style|null} [style=null] The style for GeoTIFF and GeoZarr layers (WebGLTileLayer style).
318
+ * @property {Array<import("ol/color.js").Color|string>|null} [defaultColormap=null] The colors of the colormap
319
+ * that is used for continuous single-band data when neither the STAC metadata nor the `style` option define
320
+ * a coloring. The colors are evenly distributed over the value range of the data (e.g. from the STAC
321
+ * `statistics`). If not set, the data is stretched to grayscale.
234
322
  * @property {Style} [boundsStyle] The style for the overall bounds / footprint.
235
323
  * @property {Style} [collectionStyle] The style for individual children in a list of STAC Items or Collections.
236
324
  * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
237
325
  * 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),
326
+ * @property {function((Asset|Link)):Promise<string|null>|string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
239
327
  * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
240
328
  * The function provided can return a promise (i.e. be async) or a string.
329
+ * The function can return `null` to not pass the given asset or link to the tile server,
330
+ * e.g. to filter by media type or protocol. In this case client-side rendering is used instead.
241
331
  * @property {boolean} [useTileLayerAsFallback=false] Uses the given URL template only when the client-side GeoTIFF rendering fails.
242
332
  * @property {number} [opacity=1] Opacity (0, 1).
243
333
  * @property {boolean} [visible=true] Visibility.
@@ -261,6 +351,22 @@ export type Options = {
261
351
  * @property {function(string,string):(*)} [httpRequestFn=null] Sets a custom function to make HTTP requests with.
262
352
  * The first parameter is the URL to request and the output is a promise that resolves with the response body.
263
353
  * The second parameter is the return type, either `json` (default) or `text`.
354
+ * The STAC Asset or Link the request is made for is passed as third parameter, if available.
355
+ * @property {Object<string, string>|function((Asset|Link|STACObject|null), string):(Object<string, string>|null)} [getRequestHeaders=null]
356
+ * The HTTP headers (e.g. for authentication) to send with the requests made by this layer,
357
+ * either as a plain object or as a function that returns the headers (or `null` for none) and
358
+ * is called with the STAC Asset or Link that is shown (if available) and the URL that is requested.
359
+ * Use a function to restrict the headers to specific hosts, as tile server URLs and asset URLs
360
+ * may point to hosts that should not receive the credentials.
361
+ * The headers are attached to requests made by the default `httpRequestFn`, to GeoTIFF, GeoZarr
362
+ * and PMTiles requests, and via image/tile load functions (through the Fetch API and object URLs)
363
+ * to preview images and XYZ, TileJSON, WMS and WMTS tiles.
364
+ * @property {function((Asset|Link|STACObject|null), string):(string|null)} [getRequestUrl=null]
365
+ * Rewrites a URL before a request is made or a source is created, e.g. to append query
366
+ * parameters for authentication (signed URLs, API keys). The function is called with the
367
+ * STAC Asset or Link that is shown (if available) and the URL, and returns the new URL or
368
+ * `null` to keep the URL unchanged. The rewrite is applied before `getSourceOptions` is called.
369
+ * For tiled sources the tile URL template is rewritten, not the individual tile URLs.
264
370
  */
265
371
  /**
266
372
  * @classdesc
@@ -284,6 +390,21 @@ declare class STACLayer extends LayerGroup {
284
390
  * @private
285
391
  */
286
392
  private getSourceOptions_;
393
+ /**
394
+ * @type {function(LayerType, LayerOptions, (Asset|Link)):(LayerOptions|Promise<LayerOptions>)}
395
+ * @private
396
+ */
397
+ private getLayerOptions_;
398
+ /**
399
+ * @type {Object<string, string>|function((Asset|Link|STACObject|null), string):(Object<string, string>|null)|null}
400
+ * @private
401
+ */
402
+ private getRequestHeaders_;
403
+ /**
404
+ * @type {function((Asset|Link|STACObject|null), string):(string|null)|null}
405
+ * @private
406
+ */
407
+ private getRequestUrl_;
287
408
  /**
288
409
  * @type {Array<STAC>|null}
289
410
  * @private
@@ -334,7 +455,12 @@ declare class STACLayer extends LayerGroup {
334
455
  */
335
456
  displayWebMapLink_: string | boolean | Array<Link | string>;
336
457
  /**
337
- * @type {function((Asset|Link)):Promise<string>|string|null}
458
+ * @type {number|undefined}
459
+ * @private
460
+ */
461
+ private maxDisplayPixels_;
462
+ /**
463
+ * @type {function((Asset|Link)):Promise<string|null>|string|null}
338
464
  * @private
339
465
  */
340
466
  private buildTileUrlTemplate_;
@@ -348,6 +474,11 @@ declare class STACLayer extends LayerGroup {
348
474
  * @private
349
475
  */
350
476
  private style_;
477
+ /**
478
+ * @type {Array<import("ol/color.js").Color|string>|null}
479
+ * @private
480
+ */
481
+ private defaultColormap_;
351
482
  /**
352
483
  * @type {Style}
353
484
  * @private
@@ -383,9 +514,39 @@ declare class STACLayer extends LayerGroup {
383
514
  *
384
515
  * @param {string} url The URL to request and the output is a promise that resolves with the response body.
385
516
  * @param {string} responseType The return type, either `json` (default) or `text`.
517
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link the request is made for, if available.
386
518
  * @return {Promise<*>} The (parsed) response body.
387
519
  */
388
- fetch_(url: string, responseType?: string): Promise<any>;
520
+ fetch_(url: string, responseType?: string, ref?: Asset | Link | STACObject | null): Promise<any>;
521
+ /**
522
+ * Rewrites the given URL based on the `getRequestUrl` option.
523
+ *
524
+ * @param {string} url The URL that is requested.
525
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link that is shown, if available.
526
+ * @return {string} The rewritten URL, or the given URL if it is not rewritten.
527
+ */
528
+ getRequestUrlFor_(url: string, ref?: Asset | Link | STACObject | null): string;
529
+ /**
530
+ * Returns the HTTP headers to send for the given URL, based on the
531
+ * `getRequestHeaders` option.
532
+ *
533
+ * @param {string} url The URL that is requested.
534
+ * @param {Asset|Link|STACObject|null} [ref] The STAC Asset or Link that is shown, if available.
535
+ * @return {Object<string, string>|null} The headers, or `null` if there are none.
536
+ */
537
+ getRequestHeadersFor_(url: string, ref?: Asset | Link | STACObject | null): {
538
+ [x: string]: string;
539
+ } | null;
540
+ /**
541
+ * Creates a load function for images or tiles that attaches the headers
542
+ * from the `getRequestHeaders` option and reports errors through the
543
+ * layer's error event, or `undefined` if no headers are configured.
544
+ *
545
+ * @param {function(GetHeadersFn, OnErrorFn=):LoadFunction} factory `createImageLoadFunction` or `createTileLoadFunction`.
546
+ * @param {Asset|Link|STACObject|null} ref The STAC Asset or Link that is shown, if available.
547
+ * @return {LoadFunction|undefined} The load function.
548
+ */
549
+ createLoadFunction_(factory: (arg0: GetHeadersFn, arg1: OnErrorFn | undefined) => LoadFunction, ref: Asset | Link | STACObject | null): LoadFunction | undefined;
389
550
  /**
390
551
  * Returns the vector layer that visualizes the bounds / footprint.
391
552
  * @return {VectorLayer|null} The vector layer for the bounds
@@ -462,16 +623,29 @@ declare class STACLayer extends LayerGroup {
462
623
  addLayerForLink(link: any): Promise<Array<Layer> | undefined>;
463
624
  /**
464
625
  * @param {Asset} [asset] A STAC Asset
626
+ * @param {boolean} [autoDisplay] Whether the asset was chosen automatically
627
+ * (not explicitly requested): skip it silently instead of reporting an
628
+ * error when it can't be displayed within the configured limits.
465
629
  * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
466
630
  * @private
467
631
  */
468
632
  private addGeoTiff_;
469
633
  /**
470
634
  * @param {Asset|Link} [data] A STAC Asset or Link
471
- * @return {Promise<TileLayer>} Resolves with a TileLayer when complete.
635
+ * @return {Promise<TileLayer|undefined>} Resolves with a TileLayer, or undefined if no tile server URL was provided.
472
636
  * @private
473
637
  */
474
638
  private addTileLayerForImagery_;
639
+ /**
640
+ * Passes the layer options through the `getLayerOptions` function, if given.
641
+ *
642
+ * @param {LayerType} type The type of the layer that is going to be created.
643
+ * @param {LayerOptions} options The layer options.
644
+ * @param {Asset|Link} reference The STAC Asset or Link the layer is created for.
645
+ * @return {Promise<*>} The updated layer options.
646
+ * @private
647
+ */
648
+ private updateLayerOptions_;
475
649
  /**
476
650
  * @param {Layer|LayerGroup} [layer] A Layer to add to the LayerGroup
477
651
  * @param {STACObject} [data] The STAC object, can be any class exposed by stac-js
@@ -491,15 +665,15 @@ declare class STACLayer extends LayerGroup {
491
665
  */
492
666
  private addGeoJson_;
493
667
  /**
494
- * Creates a GeoJSON vector layer from the given GeoJSON object.
668
+ * Creates the options for a GeoJSON vector layer from the given GeoJSON object.
495
669
  *
496
670
  * @param {GeoJSON} [geojson] The GeoJSON object.
497
671
  * @param {Style} [style] The style for the layer.
498
672
  * @param {boolean} [visible] Whether the layer is visible.
499
- * @return {VectorLayer} The new vector layer.
673
+ * @return {import("ol/layer/Vector.js").Options} The vector layer options.
500
674
  * @private
501
675
  */
502
- private createGeoJsonLayer_;
676
+ private getGeoJsonLayerOptions_;
503
677
  /**
504
678
  * Adds GeoJSON labels and GeoTIFF source imagery to the map based on the label extension.
505
679
  *
@@ -507,7 +681,29 @@ declare class STACLayer extends LayerGroup {
507
681
  * @private
508
682
  */
509
683
  private addLabelExtension_;
510
- addGeoZarr_(asset: any): Promise<WebGLTileLayer | TileLayer<import("ol/source/Tile.js").default<import("ol/Tile.js").default>> | undefined>;
684
+ /**
685
+ * Checks the `maxDisplayPixels` limit for the given source.
686
+ * Returns `true` when the layer must not be added: automatically chosen
687
+ * assets are limited silently, for explicitly requested assets an error
688
+ * is thrown so that callers can fall back or report it.
689
+ * @param {import('ol/source/Tile.js').default} source The configured (ready) source.
690
+ * @param {Asset} asset The asset the source was created for.
691
+ * @param {boolean} autoDisplay Whether the asset was chosen automatically.
692
+ * @return {boolean} `true` if the asset must not be displayed.
693
+ * @private
694
+ */
695
+ private checkDisplayLimit_;
696
+ /**
697
+ * Adds a layer for a GeoZarr asset.
698
+ * @param {Asset} asset The Zarr asset to show.
699
+ * @param {boolean} [autoDisplay] Whether the asset was chosen automatically
700
+ * (not explicitly requested): skip it silently instead of reporting an
701
+ * error when it doesn't declare what to render or can't be displayed
702
+ * within the configured limits.
703
+ * @return {Promise<Layer|undefined>} The layer, if one was added.
704
+ * @private
705
+ */
706
+ private addGeoZarr_;
511
707
  /**
512
708
  * Update the layers shown manually based on the current configuration.
513
709
  * Usually this doesn't need to be called manually.
@@ -534,6 +730,17 @@ declare class STACLayer extends LayerGroup {
534
730
  * @api
535
731
  */
536
732
  setStyle(style: import("ol/layer/WebGLTile.js").Style | null): void;
733
+ /**
734
+ * Set the colors of the colormap that is used for continuous single-band
735
+ * data when neither the STAC metadata nor the `style` option define a
736
+ * coloring. The colors are evenly distributed over the value range of the
737
+ * data (e.g. from the STAC `statistics`). Set to `null` to stretch the
738
+ * data to grayscale instead.
739
+ * @param {Array<import("ol/color.js").Color|string>|null} colormap The colors of the colormap.
740
+ * @return {Promise} Resolves once the layers are updated.
741
+ * @api
742
+ */
743
+ setDefaultColormap(colormap: Array<import("ol/color.js").Color | string> | null): Promise<any>;
537
744
  /**
538
745
  * Update the assets to be rendered.
539
746
  * @param {Array<string|Asset>|null} assets The assets to show.
@@ -591,6 +798,7 @@ declare class STACLayer extends LayerGroup {
591
798
  /**
592
799
  * Gets the WMTS capabilities from the given web-map-links URL.
593
800
  * @param {string} url Base URL for the WMTS
801
+ * @param {Link} link The web map link the request is made for.
594
802
  * @param {string} [encoding] The request encoding, either `kvp` (default) or `rest`.
595
803
  * @return {Promise<Object|null>} Resolves with the WMTS Capabilities object
596
804
  * @private
@@ -598,8 +806,7 @@ declare class STACLayer extends LayerGroup {
598
806
  private getWmtsCapabilities_;
599
807
  }
600
808
  import SourceType from '../source/type.js';
809
+ import LayerType from './type.js';
601
810
  import LayerGroup from 'ol/layer/Group.js';
602
811
  import VectorLayer from 'ol/layer/Vector.js';
603
- import WebGLTileLayer from 'ol/layer/WebGLTile.js';
604
- import TileLayer from 'ol/layer/Tile.js';
605
812
  //# sourceMappingURL=STAC.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"STAC.d.ts","sourceRoot":"","sources":["../../../src/ol/layer/STAC.js"],"names":[],"mappings":";qBA8Ca,OAAO,cAAc,EAAE,MAAM;oBAG7B,OAAO,mBAAmB,EAAE,OAAO;;;;;kBAenC,OAAO,WAAW,EAAE,OAAO;oBAG3B,OAAO,mBAAmB,EAAE,OAAO;4BAGnC,OAAO,mBAAmB,EAAE,aAAa;;;;;;;;;;;;;WASxC,IAAI,cAAa;;;;;eAEjB,aAAa,SAAQ,MAAM,IAAI,MAAO,CAAC,GAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;+BAQnC,UAAU,QAAE,aAAa,QAAE,CAAC,QAAM,IAAI,CAAC,KAAE,CAAC,aAAa,GAAC,QAAQ,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2B/E,CAAC,QAAM,IAAI,CAAC,KAAE,QAAQ,MAAM,CAAC,GAAC,MAAM,GAAC,IAAI;;;;;;;;;;;;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