@loaders.gl/loader-utils 4.3.0-alpha.1 → 4.3.0-alpha.3
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/dist/index.cjs +122 -4
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/json-loader.js +1 -1
- package/dist/lib/file-provider/data-view-file.d.ts +2 -2
- package/dist/lib/file-provider/data-view-file.d.ts.map +1 -1
- package/dist/lib/file-provider/file-handle-file.d.ts +2 -2
- package/dist/lib/file-provider/file-handle-file.d.ts.map +1 -1
- package/dist/lib/file-provider/file-provider-interface.d.ts +45 -0
- package/dist/lib/file-provider/file-provider-interface.d.ts.map +1 -0
- package/dist/lib/file-provider/file-provider-interface.js +9 -0
- package/dist/lib/file-provider/file-provider.d.ts +28 -17
- package/dist/lib/file-provider/file-provider.d.ts.map +1 -1
- package/dist/lib/file-provider/file-provider.js +104 -7
- package/dist/lib/log-utils/log.d.ts +0 -1
- package/dist/lib/log-utils/log.d.ts.map +1 -1
- package/dist/lib/log-utils/log.js +12 -3
- package/dist/lib/sources/data-source.d.ts +1 -0
- package/dist/lib/sources/data-source.d.ts.map +1 -1
- package/dist/lib/sources/image-source.d.ts +11 -13
- package/dist/lib/sources/image-source.d.ts.map +1 -1
- package/dist/lib/sources/image-source.js +1 -3
- package/dist/lib/sources/image-tile-source.d.ts +4 -3
- package/dist/lib/sources/image-tile-source.d.ts.map +1 -1
- package/dist/lib/sources/tile-source-adapter.d.ts +2 -1
- package/dist/lib/sources/tile-source-adapter.d.ts.map +1 -1
- package/dist/lib/sources/tile-source-adapter.js +4 -3
- package/dist/lib/sources/tile-source.d.ts +30 -25
- package/dist/lib/sources/tile-source.d.ts.map +1 -1
- package/dist/lib/sources/utils/utils.d.ts +1 -1
- package/dist/lib/sources/utils/utils.d.ts.map +1 -1
- package/dist/lib/sources/utils/utils.js +1 -1
- package/dist/lib/sources/vector-source.d.ts +61 -0
- package/dist/lib/sources/vector-source.d.ts.map +1 -0
- package/dist/lib/sources/vector-source.js +13 -0
- package/dist/lib/sources/vector-tile-source.d.ts +6 -3
- package/dist/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/source-types.d.ts +39 -0
- package/dist/source-types.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/index.ts +9 -4
- package/src/lib/file-provider/data-view-file.ts +2 -2
- package/src/lib/file-provider/file-handle-file.ts +2 -2
- package/src/lib/file-provider/file-provider-interface.ts +56 -0
- package/src/lib/file-provider/file-provider.ts +95 -25
- package/src/lib/log-utils/log.ts +15 -2
- package/src/lib/sources/data-source.ts +1 -0
- package/src/lib/sources/image-source.ts +19 -18
- package/src/lib/sources/image-tile-source.ts +8 -4
- package/src/lib/sources/tile-source-adapter.ts +5 -4
- package/src/lib/sources/tile-source.ts +38 -30
- package/src/lib/sources/utils/utils.ts +1 -1
- package/src/lib/sources/vector-source.ts +74 -0
- package/src/lib/sources/vector-tile-source.ts +11 -4
- package/src/source-types.ts +49 -0
- package/dist/service-types.d.ts +0 -10
- package/dist/service-types.d.ts.map +0 -1
- package/src/service-types.ts +0 -14
- /package/dist/{service-types.js → source-types.js} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for providing file data
|
|
3
|
+
*/
|
|
4
|
+
export interface FileProviderInterface {
|
|
5
|
+
/**
|
|
6
|
+
* Cleanup class data
|
|
7
|
+
*/
|
|
8
|
+
destroy(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
11
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
12
|
+
*/
|
|
13
|
+
getUint8(offset: bigint): Promise<number>;
|
|
14
|
+
/**
|
|
15
|
+
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
16
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
17
|
+
*/
|
|
18
|
+
getUint16(offset: bigint): Promise<number>;
|
|
19
|
+
/**
|
|
20
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
21
|
+
* @param offset The offset, in bytes, from the file of the view where to read the data.
|
|
22
|
+
*/
|
|
23
|
+
getUint32(offset: bigint): Promise<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
26
|
+
* @param offset The offset, in byte, from the file of the view where to read the data.
|
|
27
|
+
*/
|
|
28
|
+
getBigUint64(offset: bigint): Promise<bigint>;
|
|
29
|
+
/**
|
|
30
|
+
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
31
|
+
* @param startOffset The offset, in bytes, from the start of the file where to start reading the data.
|
|
32
|
+
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
33
|
+
*/
|
|
34
|
+
slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer>;
|
|
35
|
+
/**
|
|
36
|
+
* the length (in bytes) of the data.
|
|
37
|
+
*/
|
|
38
|
+
length: bigint;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check is the object has FileProvider members
|
|
42
|
+
* @param fileProvider - tested object
|
|
43
|
+
*/
|
|
44
|
+
export declare const isFileProvider: (fileProvider: unknown) => bigint;
|
|
45
|
+
//# sourceMappingURL=file-provider-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-provider-interface.d.ts","sourceRoot":"","sources":["../../../src/lib/file-provider/file-provider-interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3C;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9C;;;;OAIG;IACH,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,iBAAkB,OAAO,WAMnD,CAAC"}
|
|
@@ -1,46 +1,57 @@
|
|
|
1
|
+
import { ReadableFile } from "../files/file.js";
|
|
2
|
+
import { FileProviderInterface } from "./file-provider-interface.js";
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
4
|
+
* Provides file data using range requests to the server
|
|
3
5
|
* @deprecated - will be replaced with ReadableFile
|
|
4
6
|
*/
|
|
5
|
-
export
|
|
7
|
+
export declare class FileProvider implements FileProviderInterface {
|
|
8
|
+
/** The File object from which data is provided */
|
|
9
|
+
private file;
|
|
10
|
+
private size;
|
|
11
|
+
/** Create a new BrowserFile */
|
|
12
|
+
private constructor();
|
|
13
|
+
static create(file: ReadableFile): Promise<FileProvider>;
|
|
6
14
|
/**
|
|
7
|
-
*
|
|
15
|
+
* Truncates the file descriptor.
|
|
16
|
+
* @param length desired file lenght
|
|
8
17
|
*/
|
|
18
|
+
truncate(length: number): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Append data to a file.
|
|
21
|
+
* @param buffer data to append
|
|
22
|
+
*/
|
|
23
|
+
append(buffer: Uint8Array): Promise<void>;
|
|
24
|
+
/** Close file */
|
|
9
25
|
destroy(): Promise<void>;
|
|
10
26
|
/**
|
|
11
27
|
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
12
28
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
13
29
|
*/
|
|
14
|
-
getUint8(offset: bigint): Promise<number>;
|
|
30
|
+
getUint8(offset: number | bigint): Promise<number>;
|
|
15
31
|
/**
|
|
16
32
|
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
17
33
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
18
34
|
*/
|
|
19
|
-
getUint16(offset: bigint): Promise<number>;
|
|
35
|
+
getUint16(offset: number | bigint): Promise<number>;
|
|
20
36
|
/**
|
|
21
37
|
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
22
|
-
* @param offset The offset, in bytes, from the
|
|
38
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
23
39
|
*/
|
|
24
|
-
getUint32(offset: bigint): Promise<number>;
|
|
40
|
+
getUint32(offset: number | bigint): Promise<number>;
|
|
25
41
|
/**
|
|
26
42
|
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
27
|
-
* @param offset The offset, in
|
|
43
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
28
44
|
*/
|
|
29
|
-
getBigUint64(offset: bigint): Promise<bigint>;
|
|
45
|
+
getBigUint64(offset: number | bigint): Promise<bigint>;
|
|
30
46
|
/**
|
|
31
47
|
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
32
|
-
* @param startOffset The offset, in
|
|
48
|
+
* @param startOffset The offset, in byte, from the start of the file where to start reading the data.
|
|
33
49
|
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
34
50
|
*/
|
|
35
|
-
slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer>;
|
|
51
|
+
slice(startOffset: bigint | number, endOffset: bigint | number): Promise<ArrayBuffer>;
|
|
36
52
|
/**
|
|
37
53
|
* the length (in bytes) of the data.
|
|
38
54
|
*/
|
|
39
|
-
length: bigint;
|
|
55
|
+
get length(): bigint;
|
|
40
56
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Check is the object has FileProvider members
|
|
43
|
-
* @param fileProvider - tested object
|
|
44
|
-
*/
|
|
45
|
-
export declare const isFileProvider: (fileProvider: unknown) => bigint;
|
|
46
57
|
//# sourceMappingURL=file-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-provider.d.ts","sourceRoot":"","sources":["../../../src/lib/file-provider/file-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-provider.d.ts","sourceRoot":"","sources":["../../../src/lib/file-provider/file-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,yBAAsB;AAC3C,OAAO,EAAC,qBAAqB,EAAC,qCAAkC;AAEhE;;;GAGG;AACH,qBAAa,YAAa,YAAW,qBAAqB;IACxD,kDAAkD;IAClD,OAAO,CAAC,IAAI,CAAe;IAC3B,OAAO,CAAC,IAAI,CAAS;IAErB,+BAA+B;IAC/B,OAAO;WAKM,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAW9D;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,iBAAiB;IACX,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASxD;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASzD;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASzD;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAS5D;;;;OAIG;IACG,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAU3F;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -1,9 +1,106 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
2
|
+
* Provides file data using range requests to the server
|
|
3
|
+
* @deprecated - will be replaced with ReadableFile
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export class FileProvider {
|
|
6
|
+
/** The File object from which data is provided */
|
|
7
|
+
file;
|
|
8
|
+
size;
|
|
9
|
+
/** Create a new BrowserFile */
|
|
10
|
+
constructor(file, size) {
|
|
11
|
+
this.file = file;
|
|
12
|
+
this.size = BigInt(size);
|
|
13
|
+
}
|
|
14
|
+
static async create(file) {
|
|
15
|
+
return new FileProvider(file, file.bigsize > 0n
|
|
16
|
+
? file.bigsize
|
|
17
|
+
: file.size > 0n
|
|
18
|
+
? file.size
|
|
19
|
+
: (await file.stat?.())?.bigsize ?? 0n);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Truncates the file descriptor.
|
|
23
|
+
* @param length desired file lenght
|
|
24
|
+
*/
|
|
25
|
+
async truncate(length) {
|
|
26
|
+
throw new Error('file loaded via range requests cannot be changed');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Append data to a file.
|
|
30
|
+
* @param buffer data to append
|
|
31
|
+
*/
|
|
32
|
+
async append(buffer) {
|
|
33
|
+
throw new Error('file loaded via range requests cannot be changed');
|
|
34
|
+
}
|
|
35
|
+
/** Close file */
|
|
36
|
+
async destroy() {
|
|
37
|
+
throw new Error('file loaded via range requests cannot be changed');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
41
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
42
|
+
*/
|
|
43
|
+
async getUint8(offset) {
|
|
44
|
+
const arrayBuffer = await this.file.read(offset, 1);
|
|
45
|
+
const val = new Uint8Array(arrayBuffer).at(0);
|
|
46
|
+
if (val === undefined) {
|
|
47
|
+
throw new Error('something went wrong');
|
|
48
|
+
}
|
|
49
|
+
return val;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
53
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
54
|
+
*/
|
|
55
|
+
async getUint16(offset) {
|
|
56
|
+
const arrayBuffer = await this.file.read(offset, 2);
|
|
57
|
+
const val = new Uint16Array(arrayBuffer).at(0);
|
|
58
|
+
if (val === undefined) {
|
|
59
|
+
throw new Error('something went wrong');
|
|
60
|
+
}
|
|
61
|
+
return val;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
65
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
66
|
+
*/
|
|
67
|
+
async getUint32(offset) {
|
|
68
|
+
const arrayBuffer = await this.file.read(offset, 4);
|
|
69
|
+
const val = new Uint32Array(arrayBuffer).at(0);
|
|
70
|
+
if (val === undefined) {
|
|
71
|
+
throw new Error('something went wrong');
|
|
72
|
+
}
|
|
73
|
+
return val;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
77
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
78
|
+
*/
|
|
79
|
+
async getBigUint64(offset) {
|
|
80
|
+
const arrayBuffer = await this.file.read(offset, 8);
|
|
81
|
+
const val = new BigInt64Array(arrayBuffer).at(0);
|
|
82
|
+
if (val === undefined) {
|
|
83
|
+
throw new Error('something went wrong');
|
|
84
|
+
}
|
|
85
|
+
return val;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
89
|
+
* @param startOffset The offset, in byte, from the start of the file where to start reading the data.
|
|
90
|
+
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
91
|
+
*/
|
|
92
|
+
async slice(startOffset, endOffset) {
|
|
93
|
+
const bigLength = BigInt(endOffset) - BigInt(startOffset);
|
|
94
|
+
if (bigLength > Number.MAX_SAFE_INTEGER) {
|
|
95
|
+
throw new Error('too big slice');
|
|
96
|
+
}
|
|
97
|
+
const length = Number(bigLength);
|
|
98
|
+
return await this.file.read(startOffset, length);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* the length (in bytes) of the data.
|
|
102
|
+
*/
|
|
103
|
+
get length() {
|
|
104
|
+
return this.size;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/lib/log-utils/log.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AAKlC,eAAO,MAAM,OAAO,KAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/lib/log-utils/log.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AAKlC,eAAO,MAAM,OAAO,KAA8D,CAAC;AAkBnF,eAAO,MAAM,GAAG,KAAc,CAAC"}
|
|
@@ -5,7 +5,16 @@ import { Log } from '@probe.gl/log';
|
|
|
5
5
|
// Version constant cannot be imported, it needs to correspond to the build version of **this** module.
|
|
6
6
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
7
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
export const VERSION = typeof "4.
|
|
8
|
+
export const VERSION = typeof "4.3.0-alpha.2" !== 'undefined' ? "4.3.0-alpha.2" : 'latest';
|
|
9
9
|
const version = VERSION[0] >= '0' && VERSION[0] <= '9' ? `v${VERSION}` : '';
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// Make sure we set the global variable
|
|
11
|
+
function createLog() {
|
|
12
|
+
const log = new Log({ id: 'loaders.gl' });
|
|
13
|
+
globalThis.loaders = globalThis.loaders || {};
|
|
14
|
+
globalThis.loaders.log = log;
|
|
15
|
+
globalThis.loaders.version = version;
|
|
16
|
+
globalThis.probe = globalThis.probe || {};
|
|
17
|
+
globalThis.probe.loaders = log;
|
|
18
|
+
return log;
|
|
19
|
+
}
|
|
20
|
+
export const log = createLog();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
2
|
/** Common properties for all data sources */
|
|
3
3
|
export type DataSourceProps = {
|
|
4
|
+
url?: string | Blob;
|
|
4
5
|
/** LoaderOptions provide an option to override `fetch`. Will also be passed to any sub loaders */
|
|
5
6
|
loadOptions?: LoaderOptions;
|
|
6
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/data-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG;IAC5B,kGAAkG;IAClG,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC;AAEF,qCAAqC;AACrC,8BAAsB,UAAU,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe;IAC/E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,gEAAgE;IAChE,KAAK,EAAE,CAAC,GAAG,EAA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eAAe,CAAC,KAAK,GAAE,OAAc;CAOtC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { DataSourceProps } from "./data-source.js";
|
|
2
2
|
import { DataSource } from "./data-source.js";
|
|
3
3
|
import { ImageType } from "./utils/image-type.js";
|
|
4
|
+
export type ImageSourceProps = DataSourceProps;
|
|
5
|
+
/**
|
|
6
|
+
* ImageSource - data sources that allow images to be queried by (geospatial) extents
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class ImageSource<PropsT extends ImageSourceProps = ImageSourceProps> extends DataSource<PropsT> {
|
|
9
|
+
static type: string;
|
|
10
|
+
static testURL: (url: string) => boolean;
|
|
11
|
+
abstract getMetadata(): Promise<ImageSourceMetadata>;
|
|
12
|
+
abstract getImage(parameters: GetImageParameters): Promise<ImageType>;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* Normalized capabilities of an Image service
|
|
6
16
|
* @example
|
|
7
|
-
* The
|
|
17
|
+
* The WMSSourceLoader will normalize the response to the WMS `GetCapabilities`
|
|
8
18
|
* data structure extracted from WMS XML response into an ImageSourceMetadata.
|
|
9
19
|
*/
|
|
10
20
|
export type ImageSourceMetadata = {
|
|
@@ -46,16 +56,4 @@ export type GetImageParameters = {
|
|
|
46
56
|
/** requested format for the return image */
|
|
47
57
|
format?: 'image/png';
|
|
48
58
|
};
|
|
49
|
-
export type ImageSourceProps = DataSourceProps;
|
|
50
|
-
/**
|
|
51
|
-
* MapImageSource - data sources that allow data to be queried by (geospatial) extents
|
|
52
|
-
* @note
|
|
53
|
-
* - If geospatial, bounding box is expected to be in web mercator coordinates
|
|
54
|
-
*/
|
|
55
|
-
export declare abstract class ImageSource<PropsT extends ImageSourceProps = ImageSourceProps> extends DataSource<PropsT> {
|
|
56
|
-
static type: string;
|
|
57
|
-
static testURL: (url: string) => boolean;
|
|
58
|
-
abstract getMetadata(): Promise<ImageSourceMetadata>;
|
|
59
|
-
abstract getImage(parameters: GetImageParameters): Promise<ImageType>;
|
|
60
|
-
}
|
|
61
59
|
//# sourceMappingURL=image-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,yBAAsB;AACnD,OAAO,EAAC,UAAU,EAAC,yBAAsB;
|
|
1
|
+
{"version":3,"file":"image-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,yBAAsB;AACnD,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC,OAAO,EAAC,SAAS,EAAC,8BAA2B;AAE7C,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C;;GAEG;AACH,8BAAsB,WAAW,CAC/B,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,CAClD,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAc;IACjC,MAAM,CAAC,OAAO,QAAS,MAAM,KAAG,OAAO,CAAU;IAEjD,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IACpD,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;CACtE;AAID;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAA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8
|
-
* - If geospatial, bounding box is expected to be in web mercator coordinates
|
|
6
|
+
* ImageSource - data sources that allow images to be queried by (geospatial) extents
|
|
9
7
|
*/
|
|
10
8
|
export class ImageSource extends DataSource {
|
|
11
9
|
static type = 'template';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { ImageType } from "./utils/image-type.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { TileSourceProps, TileSourceMetadata, GetTileParameters } from "./tile-source.js";
|
|
3
|
+
import type { TileSource } from "./tile-source.js";
|
|
4
|
+
export type ImageTileSourceProps = TileSourceProps;
|
|
4
5
|
/**
|
|
5
6
|
* MapTileSource - data sources that allow data to be queried by (geospatial) tile
|
|
6
7
|
* @note If geospatial, bounding box is expected to be in web mercator coordinates
|
|
7
8
|
*/
|
|
8
|
-
export interface ImageTileSource<MetadataT extends TileSourceMetadata = TileSourceMetadata> extends TileSource<MetadataT> {
|
|
9
|
+
export interface ImageTileSource<PropsT extends TileSourceProps = TileSourceProps, MetadataT extends TileSourceMetadata = TileSourceMetadata> extends TileSource<PropsT, MetadataT> {
|
|
9
10
|
getImageTile(parameters: GetTileParameters): Promise<ImageType | null>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=image-tile-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-tile-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,SAAS,EAAC,8BAA2B;AAClD,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"image-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-tile-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,SAAS,EAAC,8BAA2B;AAClD,OAAO,KAAK,EAAC,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,yBAAsB;AAC1F,OAAO,KAAK,EAAC,UAAU,EAAC,yBAAsB;AAE9C,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,eAAe,CAC9B,MAAM,SAAS,eAAe,GAAG,eAAe,EAChD,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,CACzD,SAAQ,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC;IACrC,YAAY,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;CACxE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TileSource, GetTileParameters } from "./tile-source.js";
|
|
1
|
+
import { TileSource, GetTileParameters, GetTileDataParameters } from "./tile-source.js";
|
|
2
2
|
import { ImageSource, ImageSourceMetadata } from "./image-source.js";
|
|
3
3
|
/**
|
|
4
4
|
* MapTileSource - data sources that allow data to be queried by (geospatial) extents
|
|
@@ -12,6 +12,7 @@ export declare class TileSourceAdapter implements TileSource<ImageSourceMetadata
|
|
|
12
12
|
/** Flat parameters */
|
|
13
13
|
getTile(parameters: GetTileParameters): Promise<unknown>;
|
|
14
14
|
/** deck.gl style parameters */
|
|
15
|
+
getTileData(parameters: GetTileDataParameters): Promise<unknown | null>;
|
|
15
16
|
/** Bounding box of tiles in this tileset `[[w, s], [e, n]]` */
|
|
16
17
|
protected getTileBoundingBox(parameters: GetTileParameters): [min: [x: number, y: number], max: [x: number, y: number]];
|
|
17
18
|
getTileLowerLeftCorner(x: number, y: number, zoom: number): [number, number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-source-adapter.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAC,yBAAsB;
|
|
1
|
+
{"version":3,"file":"tile-source-adapter.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAE,qBAAqB,EAAC,yBAAsB;AACnF,OAAO,EAAC,WAAW,EAAE,mBAAmB,EAAC,0BAAuB;AAEhE;;;;GAIG;AAEH,qBAAa,iBAAkB,YAAW,UAAU,CAAC,mBAAmB,CAAC;IACvE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;gBACzB,MAAM,EAAE,WAAW;IAGzB,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIjD,sBAAsB;IACtB,OAAO,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAOxD,+BAA+B;IAC/B,WAAW,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAIvE,gEAAgE;IAChE,SAAS,CAAC,kBAAkB,CAC1B,UAAU,EAAE,iBAAiB,GAC5B,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAc7D,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAO7E"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @note
|
|
6
6
|
* - If geospatial, bounding box is expected to be in web mercator coordinates
|
|
7
7
|
*/
|
|
8
|
+
// @ts-expect-error TODO - does not implement all DataSource members
|
|
8
9
|
export class TileSourceAdapter {
|
|
9
10
|
viewportSource;
|
|
10
11
|
constructor(source) {
|
|
@@ -21,9 +22,9 @@ export class TileSourceAdapter {
|
|
|
21
22
|
return this.viewportSource.getImage({ boundingBox, layers: [], width, height });
|
|
22
23
|
}
|
|
23
24
|
/** deck.gl style parameters */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
getTileData(parameters) {
|
|
26
|
+
return this.getTile(parameters.index);
|
|
27
|
+
}
|
|
27
28
|
/** Bounding box of tiles in this tileset `[[w, s], [e, n]]` */
|
|
28
29
|
getTileBoundingBox(parameters) {
|
|
29
30
|
if (parameters.crs && parameters.crs !== 'ESPG3758') {
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
import type { DataSourceProps } from "./data-source.js";
|
|
2
|
+
import { DataSource } from "./data-source.js";
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
4
|
+
* Props for a TileSource
|
|
5
|
+
*/
|
|
6
|
+
export type TileSourceProps = DataSourceProps;
|
|
7
|
+
/**
|
|
8
|
+
* MapTileSource - data sources that allow data to be queried by (geospatial) extents
|
|
9
|
+
* @note
|
|
10
|
+
* - If geospatial, bounding box is expected to be in web mercator coordinates
|
|
11
|
+
*/
|
|
12
|
+
export interface TileSource<PropsT extends TileSourceProps = TileSourceProps, MetadataT extends TileSourceMetadata = TileSourceMetadata> extends DataSource<PropsT> {
|
|
13
|
+
getMetadata(): Promise<MetadataT>;
|
|
14
|
+
/** Flat parameters */
|
|
15
|
+
getTile(parameters: GetTileParameters): Promise<unknown | null>;
|
|
16
|
+
/** deck.gl compatibility: TileLayer and MTVLayer */
|
|
17
|
+
getTileData(parameters: GetTileDataParameters): Promise<unknown | null>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Normalized capabilities of an tile service
|
|
3
21
|
* Sources are expected to normalize the response to capabilities
|
|
4
|
-
* @example
|
|
5
|
-
* A WMS service would normalize the response to the WMS `GetCapabilities` data structure extracted from WMS XML response
|
|
6
|
-
* into an TileSourceMetadata.
|
|
7
22
|
*/
|
|
8
23
|
export type TileSourceMetadata = {
|
|
9
24
|
format?: string;
|
|
@@ -41,7 +56,7 @@ export type TileSourceLayer = {
|
|
|
41
56
|
layers: TileSourceLayer[];
|
|
42
57
|
};
|
|
43
58
|
/**
|
|
44
|
-
* Generic parameters for requesting an
|
|
59
|
+
* Generic parameters for requesting an tile from an tile source
|
|
45
60
|
*/
|
|
46
61
|
export type GetTileParameters = {
|
|
47
62
|
/** bounding box of the requested map image */
|
|
@@ -50,56 +65,46 @@ export type GetTileParameters = {
|
|
|
50
65
|
x: number;
|
|
51
66
|
/** tile y coordinate */
|
|
52
67
|
y: number;
|
|
53
|
-
/** Coordinate reference system for the
|
|
68
|
+
/** Coordinate reference system for the tile */
|
|
54
69
|
crs?: string;
|
|
55
70
|
/** Layers to render */
|
|
56
71
|
layers?: string | string[];
|
|
57
72
|
/** Styling */
|
|
58
73
|
styles?: unknown;
|
|
59
|
-
/** requested format for the return image */
|
|
74
|
+
/** requested format for the return image (in case of bitmap tiles) */
|
|
60
75
|
format?: 'image/png';
|
|
61
76
|
};
|
|
62
|
-
|
|
77
|
+
/** deck.gl compatibility: parameters for TileSource.getTileData() */
|
|
78
|
+
export type GetTileDataParameters = {
|
|
79
|
+
/** Tile index */
|
|
63
80
|
index: {
|
|
64
81
|
x: number;
|
|
65
82
|
y: number;
|
|
66
83
|
z: number;
|
|
67
84
|
};
|
|
68
85
|
id: string;
|
|
86
|
+
/** Bounding Box */
|
|
69
87
|
bbox: TileBoundingBox;
|
|
88
|
+
/** Zoom level */
|
|
70
89
|
zoom?: number;
|
|
71
90
|
url?: string | null;
|
|
72
91
|
signal?: AbortSignal;
|
|
73
92
|
userData?: Record<string, any>;
|
|
74
93
|
};
|
|
75
|
-
/** deck.gl
|
|
94
|
+
/** deck.gl compatibility: bounding box */
|
|
76
95
|
export type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;
|
|
96
|
+
/** deck.gl compatibility: bounding box */
|
|
77
97
|
export type GeoBoundingBox = {
|
|
78
98
|
west: number;
|
|
79
99
|
north: number;
|
|
80
100
|
east: number;
|
|
81
101
|
south: number;
|
|
82
102
|
};
|
|
103
|
+
/** deck.gl compatibility: bounding box */
|
|
83
104
|
export type NonGeoBoundingBox = {
|
|
84
105
|
left: number;
|
|
85
106
|
top: number;
|
|
86
107
|
right: number;
|
|
87
108
|
bottom: number;
|
|
88
109
|
};
|
|
89
|
-
/**
|
|
90
|
-
* Props for a TileSource
|
|
91
|
-
*/
|
|
92
|
-
export type TileSourceProps = {};
|
|
93
|
-
/**
|
|
94
|
-
* MapTileSource - data sources that allow data to be queried by (geospatial) extents
|
|
95
|
-
* @note
|
|
96
|
-
* - If geospatial, bounding box is expected to be in web mercator coordinates
|
|
97
|
-
*/
|
|
98
|
-
export interface TileSource<MetadataT extends TileSourceMetadata> {
|
|
99
|
-
getMetadata(): Promise<MetadataT>;
|
|
100
|
-
/** Flat parameters */
|
|
101
|
-
getTile(parameters: GetTileParameters): Promise<unknown | null>;
|
|
102
|
-
/** deck.gl style parameters */
|
|
103
|
-
getTileData?(parameters: TileLoadParameters): Promise<unknown | null>;
|
|
104
|
-
}
|
|
105
110
|
//# sourceMappingURL=tile-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAC,yBAAsB;AACnD,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,UAAU,CACzB,MAAM,SAAS,eAAe,GAAG,eAAe,EAChD,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,CACzD,SAAQ,UAAU,CAAC,MAAM,CAAC;IAE1B,WAAW,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC,sBAAsB;IACtB,OAAO,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAChE,oDAAoD;IACpD,WAAW,CAAC,UAAU,EAAE,qBAAqB,GAAG,O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GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import type { LoaderOptions } from '@loaders.gl/loader-utils';
|
|
|
7
7
|
* @param context
|
|
8
8
|
*/
|
|
9
9
|
export declare function getFetchFunction(options?: LoaderOptions): (url: string, fetchOptions?: RequestInit) => Promise<Response>;
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function mergeImageSourceLoaderProps<Props extends {
|
|
11
11
|
loadOptions?: any;
|
|
12
12
|
}>(props: Props): Required<Props>;
|
|
13
13
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,SAAS;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,EAC3E,KAAK,EAAE,KAAK,GACX,QAAQ,CAAC,KAAK,CAAC,CAUjB"}
|
|
@@ -22,7 +22,7 @@ export function getFetchFunction(options) {
|
|
|
22
22
|
// else return the global fetch function
|
|
23
23
|
return (url) => fetch(url);
|
|
24
24
|
}
|
|
25
|
-
export function
|
|
25
|
+
export function mergeImageSourceLoaderProps(props) {
|
|
26
26
|
// @ts-expect-error
|
|
27
27
|
return {
|
|
28
28
|
// Default fetch
|