@loaders.gl/wms 4.0.0-beta.5 → 4.0.0-beta.7
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 +5 -5
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts +3 -5
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.js +2 -2
- package/dist/lib/parsers/wms/parse-wms-capabilities.js.map +1 -1
- package/dist/wms-capabilities-loader.d.ts +1 -3
- package/dist/wms-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.js.map +1 -1
- package/package.json +12 -9
- package/src/index.ts +3 -11
- package/src/lib/parsers/wms/parse-wms-capabilities.ts +5 -8
- package/src/wms-capabilities-loader.ts +1 -3
- package/dist/dist.dev.js +0 -4194
- package/dist/lerc-loader.d.ts +0 -17
- package/dist/lerc-loader.d.ts.map +0 -1
- package/dist/lerc-loader.js +0 -21
- package/dist/lerc-loader.js.map +0 -1
- package/dist/lib/parsers/lerc/lerc-types.d.ts +0 -30
- package/dist/lib/parsers/lerc/lerc-types.d.ts.map +0 -1
- package/dist/lib/parsers/lerc/lerc-types.js +0 -2
- package/dist/lib/parsers/lerc/lerc-types.js.map +0 -1
- package/src/lerc-loader.ts +0 -48
- package/src/lib/parsers/lerc/lerc-types.ts +0 -43
package/dist/lerc-loader.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
|
-
import type { LERCData } from './lib/parsers/lerc/lerc-types';
|
|
3
|
-
export type LERCLoaderOptions = LoaderOptions & {
|
|
4
|
-
lerc?: {
|
|
5
|
-
/** The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position. */
|
|
6
|
-
inputOffset?: number;
|
|
7
|
-
/** It is recommended to use the returned mask instead of setting this value. */
|
|
8
|
-
noDataValue?: number;
|
|
9
|
-
/** (ndepth LERC2 only) If true, returned depth values are pixel-interleaved. */
|
|
10
|
-
returnInterleaved?: boolean;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Loader for the LERC raster format
|
|
15
|
-
*/
|
|
16
|
-
export declare const LERCLoader: LoaderWithParser<LERCData, never, LERCLoaderOptions>;
|
|
17
|
-
//# sourceMappingURL=lerc-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-loader.d.ts","sourceRoot":"","sources":["../src/lerc-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAO5D,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,IAAI,CAAC,EAAE;QACL,4GAA4G;QAC5G,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gFAAgF;QAChF,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gFAAgF;QAChF,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,iBAAiB,CAe3E,CAAC"}
|
package/dist/lerc-loader.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as Lerc from 'lerc';
|
|
2
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
3
|
-
export const LERCLoader = {
|
|
4
|
-
id: 'lerc',
|
|
5
|
-
name: 'LERC',
|
|
6
|
-
module: 'wms',
|
|
7
|
-
version: VERSION,
|
|
8
|
-
worker: false,
|
|
9
|
-
extensions: ['lrc', 'lerc', 'lerc2', 'lerc1'],
|
|
10
|
-
mimeTypes: ['application/octet-stream'],
|
|
11
|
-
options: {
|
|
12
|
-
wms: {}
|
|
13
|
-
},
|
|
14
|
-
parse: async (arrayBuffer, options) => parseLERC(arrayBuffer, options)
|
|
15
|
-
};
|
|
16
|
-
async function parseLERC(arrayBuffer, options) {
|
|
17
|
-
await Lerc.load();
|
|
18
|
-
const pixelBlock = Lerc.decode(arrayBuffer, options === null || options === void 0 ? void 0 : options.lerc);
|
|
19
|
-
return pixelBlock;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=lerc-loader.js.map
|
package/dist/lerc-loader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-loader.js","names":["Lerc","VERSION","__VERSION__","LERCLoader","id","name","module","version","worker","extensions","mimeTypes","options","wms","parse","arrayBuffer","parseLERC","load","pixelBlock","decode","lerc"],"sources":["../src/lerc-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {LERCData} from './lib/parsers/lerc/lerc-types';\nimport * as Lerc from 'lerc';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type LERCLoaderOptions = LoaderOptions & {\n lerc?: {\n /**\tThe number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position. */\n inputOffset?: number;\n /**\tIt is recommended to use the returned mask instead of setting this value. */\n noDataValue?: number;\n /**\t(ndepth LERC2 only) If true, returned depth values are pixel-interleaved. */\n returnInterleaved?: boolean;\n };\n};\n\n/**\n * Loader for the LERC raster format\n */\nexport const LERCLoader: LoaderWithParser<LERCData, never, LERCLoaderOptions> = {\n id: 'lerc',\n name: 'LERC',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['lrc', 'lerc', 'lerc2', 'lerc1'],\n mimeTypes: ['application/octet-stream'],\n // test: ?,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions) =>\n parseLERC(arrayBuffer, options)\n};\n\nasync function parseLERC(arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions): Promise<LERCData> {\n // Load the WASM library\n await Lerc.load();\n // Perform the decode\n const pixelBlock = Lerc.decode(arrayBuffer, options?.lerc);\n return pixelBlock;\n}\n"],"mappings":"AAIA,OAAO,KAAKA,IAAI,MAAM,MAAM;AAI5B,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AAgB3E,OAAO,MAAMC,UAAgE,GAAG;EAC9EC,EAAE,EAAE,MAAM;EACVC,IAAI,EAAE,MAAM;EAEZC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEN,OAAO;EAChBO,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;EAC7CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAEvCC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAA2B,KACjEI,SAAS,CAACD,WAAW,EAAEH,OAAO;AAClC,CAAC;AAED,eAAeI,SAASA,CAACD,WAAwB,EAAEH,OAA2B,EAAqB;EAEjG,MAAMX,IAAI,CAACgB,IAAI,CAAC,CAAC;EAEjB,MAAMC,UAAU,GAAGjB,IAAI,CAACkB,MAAM,CAACJ,WAAW,EAAEH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,IAAI,CAAC;EAC1D,OAAOF,UAAU;AACnB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** Data returned by LERC loader */
|
|
2
|
-
export type LERCData = {
|
|
3
|
-
/** Width of decoded image */
|
|
4
|
-
width: number;
|
|
5
|
-
/** Height of decoded image */
|
|
6
|
-
height: number;
|
|
7
|
-
/** The type of pixels represented in the output */
|
|
8
|
-
pixelType: LercPixelType;
|
|
9
|
-
/** [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values */
|
|
10
|
-
statistics: BandStats[];
|
|
11
|
-
/** [band1, band2, …] Each band is a typed array of width * height * depthCount */
|
|
12
|
-
pixels: TypedArray[];
|
|
13
|
-
/** Typed array with a size of width*height, or null if all pixels are valid */
|
|
14
|
-
mask: Uint8Array;
|
|
15
|
-
/** Depth count */
|
|
16
|
-
depthCount: number;
|
|
17
|
-
/** array [band1_mask, band2_mask, …] Each band is a Uint8Array of width * height * depthCount */
|
|
18
|
-
bandMasks?: Uint8Array[];
|
|
19
|
-
};
|
|
20
|
-
export type LercPixelType = 'S8' | 'U8' | 'S16' | 'U16' | 'S32' | 'U32' | 'F32' | 'F64';
|
|
21
|
-
export interface BandStats {
|
|
22
|
-
minValue: number;
|
|
23
|
-
maxValue: number;
|
|
24
|
-
depthStats?: {
|
|
25
|
-
minValues: Float64Array;
|
|
26
|
-
maxValues: Float64Array;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
30
|
-
//# sourceMappingURL=lerc-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-types.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/lerc/lerc-types.ts"],"names":[],"mappings":"AAEA,mCAAmC;AACnC,MAAM,MAAM,QAAQ,GAAG;IACrB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,SAAS,EAAE,aAAa,CAAC;IACzB,mHAAmH;IACnH,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,kFAAkF;IAClF,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,+EAA+E;IAC/E,IAAI,EAAE,UAAU,CAAC;IACjB,mBAAmB;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,SAAS,CAAC,EAAE,UAAU,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAExF,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE;QACX,SAAS,EAAE,YAAY,CAAC;QACxB,SAAS,EAAE,YAAY,CAAC;KACzB,CAAC;CACH;AAED,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,YAAY,GACZ,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lerc-types.js","names":[],"sources":["../../../../src/lib/parsers/lerc/lerc-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n/** Data returned by LERC loader */\nexport type LERCData = {\n /**\tWidth of decoded image */\n width: number;\n /**\tHeight of decoded image */\n height: number;\n /**\tThe type of pixels represented in the output */\n pixelType: LercPixelType;\n /**\t[statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values */\n statistics: BandStats[];\n /**\t[band1, band2, …] Each band is a typed array of width * height * depthCount */\n pixels: TypedArray[];\n /**\tTyped array with a size of width*height, or null if all pixels are valid */\n mask: Uint8Array;\n /**\tDepth count */\n depthCount: number;\n /**\tarray\t[band1_mask, band2_mask, …] Each band is a Uint8Array of width * height * depthCount */\n bandMasks?: Uint8Array[];\n};\n\nexport type LercPixelType = 'S8' | 'U8' | 'S16' | 'U16' | 'S32' | 'U32' | 'F32' | 'F64';\n\nexport interface BandStats {\n minValue: number;\n maxValue: number;\n depthStats?: {\n minValues: Float64Array;\n maxValues: Float64Array;\n };\n}\n\nexport type TypedArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Float32Array\n | Float64Array;\n"],"mappings":""}
|
package/src/lerc-loader.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// loaders.gl, MIT license
|
|
2
|
-
|
|
3
|
-
import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';
|
|
4
|
-
import type {LERCData} from './lib/parsers/lerc/lerc-types';
|
|
5
|
-
import * as Lerc from 'lerc';
|
|
6
|
-
|
|
7
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
8
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
9
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
10
|
-
|
|
11
|
-
export type LERCLoaderOptions = LoaderOptions & {
|
|
12
|
-
lerc?: {
|
|
13
|
-
/** The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position. */
|
|
14
|
-
inputOffset?: number;
|
|
15
|
-
/** It is recommended to use the returned mask instead of setting this value. */
|
|
16
|
-
noDataValue?: number;
|
|
17
|
-
/** (ndepth LERC2 only) If true, returned depth values are pixel-interleaved. */
|
|
18
|
-
returnInterleaved?: boolean;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Loader for the LERC raster format
|
|
24
|
-
*/
|
|
25
|
-
export const LERCLoader: LoaderWithParser<LERCData, never, LERCLoaderOptions> = {
|
|
26
|
-
id: 'lerc',
|
|
27
|
-
name: 'LERC',
|
|
28
|
-
|
|
29
|
-
module: 'wms',
|
|
30
|
-
version: VERSION,
|
|
31
|
-
worker: false,
|
|
32
|
-
extensions: ['lrc', 'lerc', 'lerc2', 'lerc1'],
|
|
33
|
-
mimeTypes: ['application/octet-stream'],
|
|
34
|
-
// test: ?,
|
|
35
|
-
options: {
|
|
36
|
-
wms: {}
|
|
37
|
-
},
|
|
38
|
-
parse: async (arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions) =>
|
|
39
|
-
parseLERC(arrayBuffer, options)
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
async function parseLERC(arrayBuffer: ArrayBuffer, options?: LERCLoaderOptions): Promise<LERCData> {
|
|
43
|
-
// Load the WASM library
|
|
44
|
-
await Lerc.load();
|
|
45
|
-
// Perform the decode
|
|
46
|
-
const pixelBlock = Lerc.decode(arrayBuffer, options?.lerc);
|
|
47
|
-
return pixelBlock;
|
|
48
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// loaders.gl, MIT license
|
|
2
|
-
|
|
3
|
-
/** Data returned by LERC loader */
|
|
4
|
-
export type LERCData = {
|
|
5
|
-
/** Width of decoded image */
|
|
6
|
-
width: number;
|
|
7
|
-
/** Height of decoded image */
|
|
8
|
-
height: number;
|
|
9
|
-
/** The type of pixels represented in the output */
|
|
10
|
-
pixelType: LercPixelType;
|
|
11
|
-
/** [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values */
|
|
12
|
-
statistics: BandStats[];
|
|
13
|
-
/** [band1, band2, …] Each band is a typed array of width * height * depthCount */
|
|
14
|
-
pixels: TypedArray[];
|
|
15
|
-
/** Typed array with a size of width*height, or null if all pixels are valid */
|
|
16
|
-
mask: Uint8Array;
|
|
17
|
-
/** Depth count */
|
|
18
|
-
depthCount: number;
|
|
19
|
-
/** array [band1_mask, band2_mask, …] Each band is a Uint8Array of width * height * depthCount */
|
|
20
|
-
bandMasks?: Uint8Array[];
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type LercPixelType = 'S8' | 'U8' | 'S16' | 'U16' | 'S32' | 'U32' | 'F32' | 'F64';
|
|
24
|
-
|
|
25
|
-
export interface BandStats {
|
|
26
|
-
minValue: number;
|
|
27
|
-
maxValue: number;
|
|
28
|
-
depthStats?: {
|
|
29
|
-
minValues: Float64Array;
|
|
30
|
-
maxValues: Float64Array;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type TypedArray =
|
|
35
|
-
| Int8Array
|
|
36
|
-
| Uint8Array
|
|
37
|
-
| Uint8ClampedArray
|
|
38
|
-
| Int16Array
|
|
39
|
-
| Uint16Array
|
|
40
|
-
| Int32Array
|
|
41
|
-
| Uint32Array
|
|
42
|
-
| Float32Array
|
|
43
|
-
| Float64Array;
|