@loaders.gl/wkt 4.2.0-alpha.6 → 4.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/dist.dev.js +15 -5
  2. package/dist/dist.min.js +2 -2
  3. package/dist/hex-wkb-loader.d.ts +23 -2
  4. package/dist/hex-wkb-loader.d.ts.map +1 -1
  5. package/dist/hex-wkb-loader.js +2 -0
  6. package/dist/index.cjs +16 -6
  7. package/dist/index.cjs.map +2 -2
  8. package/dist/lib/parse-wkb.js +4 -4
  9. package/dist/lib/utils/version.js +1 -1
  10. package/dist/twkb-loader.d.ts +41 -4
  11. package/dist/twkb-loader.d.ts.map +1 -1
  12. package/dist/twkb-loader.js +2 -0
  13. package/dist/twkb-writer.d.ts +16 -2
  14. package/dist/twkb-writer.d.ts.map +1 -1
  15. package/dist/wkb-loader.d.ts +41 -3
  16. package/dist/wkb-loader.d.ts.map +1 -1
  17. package/dist/wkb-loader.js +2 -0
  18. package/dist/wkb-writer.d.ts +16 -2
  19. package/dist/wkb-writer.d.ts.map +1 -1
  20. package/dist/wkt-crs-loader.d.ts +20 -3
  21. package/dist/wkt-crs-loader.d.ts.map +1 -1
  22. package/dist/wkt-crs-loader.js +2 -0
  23. package/dist/wkt-crs-writer.d.ts +17 -3
  24. package/dist/wkt-crs-writer.d.ts.map +1 -1
  25. package/dist/wkt-loader.d.ts +50 -4
  26. package/dist/wkt-loader.d.ts.map +1 -1
  27. package/dist/wkt-loader.js +3 -1
  28. package/dist/wkt-worker.js +4 -2
  29. package/dist/wkt-writer.d.ts +18 -2
  30. package/dist/wkt-writer.d.ts.map +1 -1
  31. package/package.json +5 -5
  32. package/src/hex-wkb-loader.ts +4 -2
  33. package/src/lib/parse-wkb.ts +4 -4
  34. package/src/twkb-loader.ts +7 -4
  35. package/src/twkb-writer.ts +2 -2
  36. package/src/wkb-loader.ts +6 -4
  37. package/src/wkb-writer.ts +2 -2
  38. package/src/wkt-crs-loader.ts +4 -2
  39. package/src/wkt-crs-writer.ts +2 -2
  40. package/src/wkt-loader.ts +13 -7
  41. package/src/wkt-writer.ts +2 -2
@@ -4,4 +4,4 @@
4
4
  // Version constant cannot be imported, it needs to correspond to the build version of **this** module.
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- export const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest';
7
+ export const VERSION = typeof "4.2.0-beta.1" !== 'undefined' ? "4.2.0-beta.1" : 'latest';
@@ -1,5 +1,6 @@
1
- import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
2
- import { BinaryGeometry, Geometry } from '@loaders.gl/schema';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
+ import { Geometry } from '@loaders.gl/schema';
3
+ import { parseTWKBGeometry, isTWKB } from "./lib/parse-twkb.js";
3
4
  export type WKBLoaderOptions = LoaderOptions & {
4
5
  wkb?: {
5
6
  shape: 'geojson-geometry' | 'binary-geometry';
@@ -8,9 +9,45 @@ export type WKBLoaderOptions = LoaderOptions & {
8
9
  /**
9
10
  * Worker loader for WKB (Well-Known Binary)
10
11
  */
11
- export declare const TWKBWorkerLoader: Loader<Geometry, never, WKBLoaderOptions>;
12
+ export declare const TWKBWorkerLoader: {
13
+ readonly dataType: Geometry;
14
+ readonly batchType: never;
15
+ readonly name: "TWKB (Tiny Well-Known Binary)";
16
+ readonly id: "twkb";
17
+ readonly module: "wkt";
18
+ readonly version: any;
19
+ readonly worker: true;
20
+ readonly category: "geometry";
21
+ readonly extensions: ["twkb"];
22
+ readonly mimeTypes: [];
23
+ readonly tests: [typeof isTWKB];
24
+ readonly options: {
25
+ readonly wkb: {
26
+ readonly shape: "binary-geometry";
27
+ };
28
+ };
29
+ };
12
30
  /**
13
31
  * Loader for WKB (Well-Known Binary)
14
32
  */
15
- export declare const TWKBLoader: LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions>;
33
+ export declare const TWKBLoader: {
34
+ readonly parse: (arrayBuffer: ArrayBuffer) => Promise<Geometry>;
35
+ readonly parseSync: typeof parseTWKBGeometry;
36
+ readonly dataType: Geometry;
37
+ readonly batchType: never;
38
+ readonly name: "TWKB (Tiny Well-Known Binary)";
39
+ readonly id: "twkb";
40
+ readonly module: "wkt";
41
+ readonly version: any;
42
+ readonly worker: true;
43
+ readonly category: "geometry";
44
+ readonly extensions: ["twkb"];
45
+ readonly mimeTypes: [];
46
+ readonly tests: [typeof isTWKB];
47
+ readonly options: {
48
+ readonly wkb: {
49
+ readonly shape: "binary-geometry";
50
+ };
51
+ };
52
+ };
16
53
  //# sourceMappingURL=twkb-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"twkb-loader.d.ts","sourceRoot":"","sources":["../src/twkb-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAI5D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;KAC/C,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAgBtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAI3F,CAAC"}
1
+ {"version":3,"file":"twkb-loader.d.ts","sourceRoot":"","sources":["../src/twkb-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAiB,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAC,iBAAiB,EAAE,MAAM,EAAC,4BAAyB;AAE3D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;KAC/C,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAmBiC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,UAAU;kCAEM,WAAW;;;;;;;;;;;;;;;;;;CAEiD,CAAC"}
@@ -7,6 +7,8 @@ import { parseTWKBGeometry, isTWKB } from "./lib/parse-twkb.js";
7
7
  * Worker loader for WKB (Well-Known Binary)
8
8
  */
9
9
  export const TWKBWorkerLoader = {
10
+ dataType: null,
11
+ batchType: null,
10
12
  name: 'TWKB (Tiny Well-Known Binary)',
11
13
  id: 'twkb',
12
14
  module: 'wkt',
@@ -1,4 +1,4 @@
1
- import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils';
1
+ import type { WriterOptions } from '@loaders.gl/loader-utils';
2
2
  import { Geometry } from '@loaders.gl/schema';
3
3
  export type TWKBWriterOptions = WriterOptions & {
4
4
  twkb?: {
@@ -9,5 +9,19 @@ export type TWKBWriterOptions = WriterOptions & {
9
9
  /**
10
10
  * WKB exporter
11
11
  */
12
- export declare const TWKBWriter: WriterWithEncoder<Geometry, never, TWKBWriterOptions>;
12
+ export declare const TWKBWriter: {
13
+ readonly name: "TWKB (Tiny Well Known Binary)";
14
+ readonly id: "twkb";
15
+ readonly module: "wkt";
16
+ readonly version: any;
17
+ readonly extensions: ["twkb"];
18
+ readonly encode: (geometry: Geometry, options?: TWKBWriterOptions) => Promise<ArrayBuffer>;
19
+ readonly encodeSync: (geometry: Geometry, options?: TWKBWriterOptions) => ArrayBuffer;
20
+ readonly options: {
21
+ readonly twkb: {
22
+ readonly hasZ: false;
23
+ readonly hasM: false;
24
+ };
25
+ };
26
+ };
13
27
  //# sourceMappingURL=twkb-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"twkb-writer.d.ts","sourceRoot":"","sources":["../src/twkb-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,iBAAiB,CAgB5E,CAAC"}
1
+ {"version":3,"file":"twkb-writer.d.ts","sourceRoot":"","sources":["../src/twkb-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;gCAMI,QAAQ,YAAY,iBAAiB;oCAEvC,QAAQ,YAAY,iBAAiB;;;;;;;CAQY,CAAC"}
@@ -1,5 +1,7 @@
1
- import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
2
  import { BinaryGeometry, Geometry } from '@loaders.gl/schema';
3
+ import { parseWKB } from "./lib/parse-wkb.js";
4
+ import { isWKB } from "./lib/parse-wkb-header.js";
3
5
  export type WKBLoaderOptions = LoaderOptions & {
4
6
  wkb?: {
5
7
  /** 'geometry' is deprecated use 'geojson-geometry' */
@@ -9,9 +11,45 @@ export type WKBLoaderOptions = LoaderOptions & {
9
11
  /**
10
12
  * Worker loader for WKB (Well-Known Binary)
11
13
  */
12
- export declare const WKBWorkerLoader: Loader<Geometry | BinaryGeometry, never, WKBLoaderOptions>;
14
+ export declare const WKBWorkerLoader: {
15
+ readonly dataType: BinaryGeometry | Geometry;
16
+ readonly batchType: never;
17
+ readonly name: "WKB";
18
+ readonly id: "wkb";
19
+ readonly module: "wkt";
20
+ readonly version: any;
21
+ readonly worker: true;
22
+ readonly category: "geometry";
23
+ readonly extensions: ["wkb"];
24
+ readonly mimeTypes: [];
25
+ readonly tests: [typeof isWKB];
26
+ readonly options: {
27
+ readonly wkb: {
28
+ readonly shape: "binary-geometry";
29
+ };
30
+ };
31
+ };
13
32
  /**
14
33
  * Loader for WKB (Well-Known Binary)
15
34
  */
16
- export declare const WKBLoader: LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions>;
35
+ export declare const WKBLoader: {
36
+ readonly parse: (arrayBuffer: ArrayBuffer) => Promise<BinaryGeometry | Geometry>;
37
+ readonly parseSync: typeof parseWKB;
38
+ readonly dataType: BinaryGeometry | Geometry;
39
+ readonly batchType: never;
40
+ readonly name: "WKB";
41
+ readonly id: "wkb";
42
+ readonly module: "wkt";
43
+ readonly version: any;
44
+ readonly worker: true;
45
+ readonly category: "geometry";
46
+ readonly extensions: ["wkb"];
47
+ readonly mimeTypes: [];
48
+ readonly tests: [typeof isWKB];
49
+ readonly options: {
50
+ readonly wkb: {
51
+ readonly shape: "binary-geometry";
52
+ };
53
+ };
54
+ };
17
55
  //# sourceMappingURL=wkb-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkb-loader.d.ts","sourceRoot":"","sources":["../src/wkb-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAK5D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,sDAAsD;QACtD,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,UAAU,CAAC;KAC5D,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc,EAAE,KAAK,EAAE,gBAAgB,CAgBtF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAI1F,CAAC"}
1
+ {"version":3,"file":"wkb-loader.d.ts","sourceRoot":"","sources":["../src/wkb-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,cAAc,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAC,QAAQ,EAAC,2BAAwB;AACzC,OAAO,EAAC,KAAK,EAAC,kCAA+B;AAE7C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,sDAAsD;QACtD,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,UAAU,CAAC;KAC5D,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAkBmD,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,SAAS;kCAEO,WAAW;;;;;;;;;;;;;;;;;;CAEiD,CAAC"}
@@ -8,6 +8,8 @@ import { isWKB } from "./lib/parse-wkb-header.js";
8
8
  * Worker loader for WKB (Well-Known Binary)
9
9
  */
10
10
  export const WKBWorkerLoader = {
11
+ dataType: null,
12
+ batchType: null,
11
13
  name: 'WKB',
12
14
  id: 'wkb',
13
15
  module: 'wkt',
@@ -1,4 +1,4 @@
1
- import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils';
1
+ import type { WriterOptions } from '@loaders.gl/loader-utils';
2
2
  import type { Geometry, Feature } from '@loaders.gl/schema';
3
3
  export type WKBWriterOptions = WriterOptions & {
4
4
  wkb?: {
@@ -13,5 +13,19 @@ export type WKBWriterOptions = WriterOptions & {
13
13
  /**
14
14
  * WKB exporter
15
15
  */
16
- export declare const WKBWriter: WriterWithEncoder<Geometry | Feature, never, WriterOptions>;
16
+ export declare const WKBWriter: {
17
+ readonly name: "WKB (Well Known Binary)";
18
+ readonly id: "wkb";
19
+ readonly module: "wkt";
20
+ readonly version: any;
21
+ readonly extensions: ["wkb"];
22
+ readonly options: {
23
+ readonly wkb: {
24
+ readonly hasZ: false;
25
+ readonly hasM: false;
26
+ };
27
+ };
28
+ readonly encode: (data: Geometry | Feature, options?: WriterOptions) => Promise<ArrayBuffer>;
29
+ readonly encodeSync: (data: Geometry | Feature, options?: WriterOptions) => ArrayBuffer;
30
+ };
17
31
  //# sourceMappingURL=wkb-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkb-writer.d.ts","sourceRoot":"","sources":["../src/wkb-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,KAAK,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,4CAA4C;QAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,4CAA4C;QAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,0CAA0C;QAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,QAAQ,GAAG,OAAO,EAAE,KAAK,EAAE,aAAa,CAkBjF,CAAC"}
1
+ {"version":3,"file":"wkb-writer.d.ts","sourceRoot":"","sources":["../src/wkb-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,KAAK,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,4CAA4C;QAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,4CAA4C;QAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf,0CAA0C;QAC1C,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;4BAYD,QAAQ,GAAG,OAAO,YAAY,aAAa,KAAG,QAAQ,WAAW,CAAC;gCAGpE,QAAQ,GAAG,OAAO,YAAY,aAAa,KAAG,WAAW;CAGI,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
2
- import type { ParseWKTCRSOptions, WKTCRS } from "./lib/parse-wkt-crs.js";
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
+ import type { ParseWKTCRSOptions } from "./lib/parse-wkt-crs.js";
3
3
  export type WKTCRSLoaderOptions = LoaderOptions & {
4
4
  'wkt-crs'?: ParseWKTCRSOptions;
5
5
  };
@@ -8,5 +8,22 @@ export type WKTCRSLoaderOptions = LoaderOptions & {
8
8
  * @see OGC Standard: https://www.ogc.org/standards/wkt-crs
9
9
  * @see Wikipedia Page: https://en.wikipedia.org/wiki/Well-known_text_representation_of_coordinate_reference_systems
10
10
  */
11
- export declare const WKTCRSLoader: LoaderWithParser<WKTCRS, never, WKTCRSLoaderOptions>;
11
+ export declare const WKTCRSLoader: {
12
+ readonly dataType: any;
13
+ readonly batchType: never;
14
+ readonly name: "WKT CRS (Well-Known Text Coordinate Reference System)";
15
+ readonly id: "wkt-crs";
16
+ readonly module: "wkt-crs";
17
+ readonly version: any;
18
+ readonly worker: true;
19
+ readonly extensions: [];
20
+ readonly mimeTypes: ["text/plain"];
21
+ readonly category: "json";
22
+ readonly text: true;
23
+ readonly options: {
24
+ readonly 'wkt-crs': {};
25
+ };
26
+ readonly parse: (arrayBuffer: ArrayBuffer, options: WKTCRSLoaderOptions | undefined) => Promise<any>;
27
+ readonly parseTextSync: (string: string, options: WKTCRSLoaderOptions | undefined) => any;
28
+ };
12
29
  //# sourceMappingURL=wkt-crs-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkt-crs-loader.d.ts","sourceRoot":"","sources":["../src/wkt-crs-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAC,kBAAkB,EAAE,MAAM,EAAC,+BAA4B;AAGpE,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,mBAAmB,CAgB7E,CAAC"}
1
+ {"version":3,"file":"wkt-crs-loader.d.ts","sourceRoot":"","sources":["../src/wkt-crs-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAC,kBAAkB,EAAS,+BAA4B;AAGpE,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAkBgD,CAAC"}
@@ -9,6 +9,8 @@ import { parseWKTCRS } from "./lib/parse-wkt-crs.js";
9
9
  * @see Wikipedia Page: https://en.wikipedia.org/wiki/Well-known_text_representation_of_coordinate_reference_systems
10
10
  */
11
11
  export const WKTCRSLoader = {
12
+ dataType: null,
13
+ batchType: null,
12
14
  name: 'WKT CRS (Well-Known Text Coordinate Reference System)',
13
15
  id: 'wkt-crs',
14
16
  module: 'wkt-crs',
@@ -1,5 +1,4 @@
1
- import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils';
2
- import type { WKTCRS } from "./lib/parse-wkt-crs.js";
1
+ import type { WriterOptions } from '@loaders.gl/loader-utils';
3
2
  import type { EncodeWKTCRSOptions } from "./lib/encode-wkt-crs.js";
4
3
  export type WKTCRSWriterOptions = WriterOptions & {
5
4
  'wkt-crs'?: EncodeWKTCRSOptions;
@@ -9,5 +8,20 @@ export type WKTCRSWriterOptions = WriterOptions & {
9
8
  * @see OGC Standard: https://www.ogc.org/standards/wkt-crs
10
9
  * @see Wikipedia Page: https://en.wikipedia.org/wiki/Well-known_text_representation_of_coordinate_reference_systems
11
10
  */
12
- export declare const WKTCRSWriter: WriterWithEncoder<WKTCRS, never, WKTCRSWriterOptions>;
11
+ export declare const WKTCRSWriter: {
12
+ readonly name: "WKT CRS (Well-Known Text Coordinate Reference System)";
13
+ readonly id: "wkt-crs";
14
+ readonly module: "wkt-crs";
15
+ readonly version: any;
16
+ readonly worker: true;
17
+ readonly extensions: [];
18
+ readonly mimeTypes: ["text/plain"];
19
+ readonly text: true;
20
+ readonly options: {
21
+ readonly 'wkt-crs': {};
22
+ };
23
+ readonly encode: (wktcrs: any, options: WKTCRSWriterOptions | undefined) => Promise<Uint8Array>;
24
+ readonly encodeSync: (wktcrs: any, options: WKTCRSWriterOptions | undefined) => Uint8Array;
25
+ readonly encodeTextSync: (wktcrs: any, options: WKTCRSWriterOptions | undefined) => string;
26
+ };
13
27
  //# sourceMappingURL=wkt-crs-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkt-crs-writer.d.ts","sourceRoot":"","sources":["../src/wkt-crs-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,KAAK,EAAC,MAAM,EAAC,+BAA4B;AAChD,OAAO,KAAK,EAAC,mBAAmB,EAAC,gCAA6B;AAG9D,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,mBAAmB,CAkB9E,CAAC"}
1
+ {"version":3,"file":"wkt-crs-writer.d.ts","sourceRoot":"","sources":["../src/wkt-crs-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAI/E,OAAO,KAAK,EAAC,mBAAmB,EAAC,gCAA6B;AAG9D,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;CAkBiD,CAAC"}
@@ -1,19 +1,65 @@
1
- import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
2
  import { Geometry } from '@loaders.gl/schema';
3
+ import { isWKT } from "./lib/parse-wkt.js";
3
4
  export type WKTLoaderOptions = LoaderOptions & {
4
- /** Options for the WKT parser */
5
+ /** Options for the WKTLoader */
5
6
  wkt?: {
7
+ /** Shape of returned geometry */
6
8
  shape?: 'geojson-geometry';
7
9
  /** Whether to add any CRS, if found, as undocumented CRS property on the returned geometry */
8
10
  crs?: boolean;
11
+ /** Override the URL to the worker bundle (by default loads from unpkg.com) */
12
+ workerUrl?: string;
9
13
  };
10
14
  };
11
15
  /**
12
16
  * Well-Known text worker loader
13
17
  */
14
- export declare const WKTWorkerLoader: Loader<Geometry, never, WKTLoaderOptions>;
18
+ export declare const WKTWorkerLoader: {
19
+ readonly dataType: Geometry;
20
+ readonly batchType: never;
21
+ readonly name: "WKT (Well-Known Text)";
22
+ readonly id: "wkt";
23
+ readonly module: "wkt";
24
+ readonly version: any;
25
+ readonly worker: true;
26
+ readonly extensions: ["wkt"];
27
+ readonly mimeTypes: ["text/plain"];
28
+ readonly category: "geometry";
29
+ readonly text: true;
30
+ readonly tests: string[];
31
+ readonly testText: typeof isWKT;
32
+ readonly options: {
33
+ readonly wkt: {
34
+ readonly shape: "geojson-geometry";
35
+ readonly crs: true;
36
+ };
37
+ };
38
+ };
15
39
  /**
16
40
  * Well-Known text loader
17
41
  */
18
- export declare const WKTLoader: LoaderWithParser<Geometry, never, WKTLoaderOptions>;
42
+ export declare const WKTLoader: {
43
+ readonly parse: (arrayBuffer: ArrayBuffer, options?: WKTLoaderOptions | undefined) => Promise<Geometry>;
44
+ readonly parseTextSync: (string: string, options?: WKTLoaderOptions | undefined) => Geometry;
45
+ readonly dataType: Geometry;
46
+ readonly batchType: never;
47
+ readonly name: "WKT (Well-Known Text)";
48
+ readonly id: "wkt";
49
+ readonly module: "wkt";
50
+ readonly version: any;
51
+ readonly worker: true;
52
+ readonly extensions: ["wkt"];
53
+ readonly mimeTypes: ["text/plain"];
54
+ readonly category: "geometry";
55
+ readonly text: true;
56
+ readonly tests: string[];
57
+ readonly testText: typeof isWKT;
58
+ readonly options: {
59
+ readonly wkt: {
60
+ readonly shape: "geojson-geometry";
61
+ readonly crs: true;
62
+ };
63
+ };
64
+ };
19
65
  //# sourceMappingURL=wkt-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkt-loader.d.ts","sourceRoot":"","sources":["../src/wkt-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAGtF,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAG5C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,iCAAiC;IACjC,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,kBAAkB,CAAC;QAC3B,8FAA8F;QAC9F,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAkBrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAIzE,CAAC"}
1
+ {"version":3,"file":"wkt-loader.d.ts","sourceRoot":"","sources":["../src/wkt-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAGtF,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,KAAK,EAAoB,2BAAwB;AAEzD,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,gCAAgC;IAChC,GAAG,CAAC,EAAE;QACJ,iCAAiC;QACjC,KAAK,CAAC,EAAE,kBAAkB,CAAC;QAC3B,8FAA8F;QAC9F,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;CAqBkC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,SAAS;;qCAGI,MAAM;;;;;;;;;;;;;;;;;;;;CACwC,CAAC"}
@@ -8,6 +8,8 @@ import { isWKT, WKT_MAGIC_STRINGS } from "./lib/parse-wkt.js";
8
8
  * Well-Known text worker loader
9
9
  */
10
10
  export const WKTWorkerLoader = {
11
+ dataType: null,
12
+ batchType: null,
11
13
  name: 'WKT (Well-Known Text)',
12
14
  id: 'wkt',
13
15
  module: 'wkt',
@@ -32,5 +34,5 @@ export const WKTWorkerLoader = {
32
34
  export const WKTLoader = {
33
35
  ...WKTWorkerLoader,
34
36
  parse: async (arrayBuffer, options) => parseWKT(new TextDecoder().decode(arrayBuffer), options),
35
- parseTextSync: parseWKT
37
+ parseTextSync: (string, options) => parseWKT(string, options)
36
38
  };
@@ -200,7 +200,7 @@
200
200
  }
201
201
 
202
202
  // src/lib/utils/version.ts
203
- var VERSION = true ? "4.2.0-alpha.5" : "latest";
203
+ var VERSION = true ? "4.2.0-beta.1" : "latest";
204
204
 
205
205
  // src/lib/parse-wkt.ts
206
206
  var numberRegexp = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/;
@@ -445,6 +445,8 @@
445
445
 
446
446
  // src/wkt-loader.ts
447
447
  var WKTWorkerLoader = {
448
+ dataType: null,
449
+ batchType: null,
448
450
  name: "WKT (Well-Known Text)",
449
451
  id: "wkt",
450
452
  module: "wkt",
@@ -466,7 +468,7 @@
466
468
  var WKTLoader = {
467
469
  ...WKTWorkerLoader,
468
470
  parse: async (arrayBuffer, options) => parseWKT(new TextDecoder().decode(arrayBuffer), options),
469
- parseTextSync: parseWKT
471
+ parseTextSync: (string, options) => parseWKT(string, options)
470
472
  };
471
473
 
472
474
  // src/workers/wkt-worker.ts
@@ -1,4 +1,5 @@
1
- import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils';
1
+ import type { WriterOptions } from '@loaders.gl/loader-utils';
2
+ import { encodeWKT } from "./lib/encode-wkt.js";
2
3
  import { Geometry } from '@loaders.gl/schema';
3
4
  export type WKTWriterOptions = WriterOptions & {
4
5
  wkt?: {};
@@ -6,5 +7,20 @@ export type WKTWriterOptions = WriterOptions & {
6
7
  /**
7
8
  * WKT exporter
8
9
  */
9
- export declare const WKTWriter: WriterWithEncoder<Geometry, never, WKTWriterOptions>;
10
+ export declare const WKTWriter: {
11
+ readonly name: "WKT (Well Known Text)";
12
+ readonly id: "wkt";
13
+ readonly module: "wkt";
14
+ readonly version: any;
15
+ readonly extensions: ["wkt"];
16
+ readonly text: true;
17
+ readonly encode: (geometry: Geometry) => Promise<ArrayBuffer>;
18
+ readonly encodeSync: typeof encodeWKTSync;
19
+ readonly encodeTextSync: typeof encodeWKT;
20
+ readonly options: {
21
+ readonly wkt: {};
22
+ };
23
+ };
24
+ declare function encodeWKTSync(geometry: Geometry): ArrayBuffer;
25
+ export {};
10
26
  //# sourceMappingURL=wkt-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wkt-writer.d.ts","sourceRoot":"","sources":["../src/wkt-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAa1E,CAAC"}
1
+ {"version":3,"file":"wkt-writer.d.ts","sourceRoot":"","sources":["../src/wkt-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;gCAOK,QAAQ;;;;;;CAMsC,CAAC;AAE1E,iBAAS,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAEtD"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loaders.gl/wkt",
3
3
  "description": "Loader and Writer for the WKT (Well Known Text) Format",
4
- "version": "4.2.0-alpha.6",
4
+ "version": "4.2.0-beta.2",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -44,12 +44,12 @@
44
44
  "fuzzer": "^0.2.1"
45
45
  },
46
46
  "dependencies": {
47
- "@loaders.gl/gis": "4.2.0-alpha.6",
48
- "@loaders.gl/loader-utils": "4.2.0-alpha.6",
49
- "@loaders.gl/schema": "4.2.0-alpha.6"
47
+ "@loaders.gl/gis": "4.2.0-beta.2",
48
+ "@loaders.gl/loader-utils": "4.2.0-beta.2",
49
+ "@loaders.gl/schema": "4.2.0-beta.2"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@loaders.gl/core": "^4.0.0"
53
53
  },
54
- "gitHead": "37bd8ca71763529f18727ee4bf29dd176aa914ca"
54
+ "gitHead": "13c03663fec365a4d24c06377d50035cebd7ba9f"
55
55
  }
@@ -15,7 +15,9 @@ export type HexWKBLoaderOptions = WKBLoaderOptions;
15
15
  /**
16
16
  * Worker loader for Hex-encoded WKB (Well-Known Binary)
17
17
  */
18
- export const HexWKBLoader: LoaderWithParser<BinaryGeometry, never, HexWKBLoaderOptions> = {
18
+ export const HexWKBLoader = {
19
+ dataType: null as unknown as BinaryGeometry,
20
+ batchType: null as never,
19
21
  name: 'Hexadecimal WKB',
20
22
  id: 'wkb',
21
23
  module: 'wkt',
@@ -30,7 +32,7 @@ export const HexWKBLoader: LoaderWithParser<BinaryGeometry, never, HexWKBLoaderO
30
32
  // TODO - encoding here seems wasteful - extend hex transcoder?
31
33
  parse: async (arrayBuffer: ArrayBuffer) => parseHexWKB(new TextDecoder().decode(arrayBuffer)),
32
34
  parseTextSync: parseHexWKB
33
- };
35
+ } as const satisfies LoaderWithParser<BinaryGeometry, never, HexWKBLoaderOptions>;
34
36
 
35
37
  function parseHexWKB(text: string, options?: HexWKBLoaderOptions): BinaryGeometry {
36
38
  const uint8Array = decodeHex(text);
@@ -120,7 +120,7 @@ function parseLineString(
120
120
  geometry: {
121
121
  type: 'LineString',
122
122
  positions: {value: positions, size: dimension},
123
- pathIndices: {value: new Uint16Array(pathIndices), size: 1}
123
+ pathIndices: {value: new Uint32Array(pathIndices), size: 1}
124
124
  },
125
125
  offset
126
126
  };
@@ -159,10 +159,10 @@ function parsePolygon(
159
159
  type: 'Polygon',
160
160
  positions: {value: concatenatedPositions, size: dimension},
161
161
  polygonIndices: {
162
- value: new Uint16Array(polygonIndices),
162
+ value: new Uint32Array(polygonIndices),
163
163
  size: 1
164
164
  },
165
- primitivePolygonIndices: {value: new Uint16Array(primitivePolygonIndices), size: 1}
165
+ primitivePolygonIndices: {value: new Uint32Array(primitivePolygonIndices), size: 1}
166
166
  },
167
167
  offset
168
168
  };
@@ -283,7 +283,7 @@ function concatenateBinaryLineGeometries(
283
283
  return {
284
284
  type: 'LineString',
285
285
  positions: {value: concatenatedPositions, size: dimension},
286
- pathIndices: {value: new Uint16Array(pathIndices), size: 1}
286
+ pathIndices: {value: new Uint32Array(pathIndices), size: 1}
287
287
  };
288
288
  }
289
289
 
@@ -16,7 +16,10 @@ export type WKBLoaderOptions = LoaderOptions & {
16
16
  /**
17
17
  * Worker loader for WKB (Well-Known Binary)
18
18
  */
19
- export const TWKBWorkerLoader: Loader<Geometry, never, WKBLoaderOptions> = {
19
+ export const TWKBWorkerLoader = {
20
+ dataType: null as unknown as Geometry,
21
+ batchType: null as never,
22
+
20
23
  name: 'TWKB (Tiny Well-Known Binary)',
21
24
  id: 'twkb',
22
25
  module: 'wkt',
@@ -32,13 +35,13 @@ export const TWKBWorkerLoader: Loader<Geometry, never, WKBLoaderOptions> = {
32
35
  shape: 'binary-geometry' // 'geojson-geometry'
33
36
  }
34
37
  }
35
- };
38
+ } as const satisfies Loader<Geometry, never, WKBLoaderOptions>;
36
39
 
37
40
  /**
38
41
  * Loader for WKB (Well-Known Binary)
39
42
  */
40
- export const TWKBLoader: LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions> = {
43
+ export const TWKBLoader = {
41
44
  ...TWKBWorkerLoader,
42
45
  parse: async (arrayBuffer: ArrayBuffer) => parseTWKBGeometry(arrayBuffer),
43
46
  parseSync: parseTWKBGeometry
44
- };
47
+ } as const satisfies LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions>;
@@ -17,7 +17,7 @@ export type TWKBWriterOptions = WriterOptions & {
17
17
  /**
18
18
  * WKB exporter
19
19
  */
20
- export const TWKBWriter: WriterWithEncoder<Geometry, never, TWKBWriterOptions> = {
20
+ export const TWKBWriter = {
21
21
  name: 'TWKB (Tiny Well Known Binary)',
22
22
  id: 'twkb',
23
23
  module: 'wkt',
@@ -33,4 +33,4 @@ export const TWKBWriter: WriterWithEncoder<Geometry, never, TWKBWriterOptions> =
33
33
  hasM: false
34
34
  }
35
35
  }
36
- };
36
+ } as const satisfies WriterWithEncoder<Geometry, never, TWKBWriterOptions>;
package/src/wkb-loader.ts CHANGED
@@ -18,7 +18,9 @@ export type WKBLoaderOptions = LoaderOptions & {
18
18
  /**
19
19
  * Worker loader for WKB (Well-Known Binary)
20
20
  */
21
- export const WKBWorkerLoader: Loader<Geometry | BinaryGeometry, never, WKBLoaderOptions> = {
21
+ export const WKBWorkerLoader = {
22
+ dataType: null as unknown as Geometry | BinaryGeometry,
23
+ batchType: null as never,
22
24
  name: 'WKB',
23
25
  id: 'wkb',
24
26
  module: 'wkt',
@@ -34,13 +36,13 @@ export const WKBWorkerLoader: Loader<Geometry | BinaryGeometry, never, WKBLoader
34
36
  shape: 'binary-geometry' // 'geojson-geometry'
35
37
  }
36
38
  }
37
- };
39
+ } as const satisfies Loader<Geometry | BinaryGeometry, never, WKBLoaderOptions>;
38
40
 
39
41
  /**
40
42
  * Loader for WKB (Well-Known Binary)
41
43
  */
42
- export const WKBLoader: LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions> = {
44
+ export const WKBLoader = {
43
45
  ...WKBWorkerLoader,
44
46
  parse: async (arrayBuffer: ArrayBuffer) => parseWKB(arrayBuffer),
45
47
  parseSync: parseWKB
46
- };
48
+ } as const satisfies LoaderWithParser<BinaryGeometry | Geometry, never, WKBLoaderOptions>;
package/src/wkb-writer.ts CHANGED
@@ -23,7 +23,7 @@ export type WKBWriterOptions = WriterOptions & {
23
23
  /**
24
24
  * WKB exporter
25
25
  */
26
- export const WKBWriter: WriterWithEncoder<Geometry | Feature, never, WriterOptions> = {
26
+ export const WKBWriter = {
27
27
  name: 'WKB (Well Known Binary)',
28
28
  id: 'wkb',
29
29
  module: 'wkt',
@@ -41,4 +41,4 @@ export const WKBWriter: WriterWithEncoder<Geometry | Feature, never, WriterOptio
41
41
  encodeSync(data: Geometry | Feature, options?: WriterOptions): ArrayBuffer {
42
42
  return encodeWKB(data, options?.wkb);
43
43
  }
44
- };
44
+ } as const satisfies WriterWithEncoder<Geometry | Feature, never, WriterOptions>;
@@ -16,7 +16,9 @@ export type WKTCRSLoaderOptions = LoaderOptions & {
16
16
  * @see OGC Standard: https://www.ogc.org/standards/wkt-crs
17
17
  * @see Wikipedia Page: https://en.wikipedia.org/wiki/Well-known_text_representation_of_coordinate_reference_systems
18
18
  */
19
- export const WKTCRSLoader: LoaderWithParser<WKTCRS, never, WKTCRSLoaderOptions> = {
19
+ export const WKTCRSLoader = {
20
+ dataType: null as unknown as WKTCRS,
21
+ batchType: null as never,
20
22
  name: 'WKT CRS (Well-Known Text Coordinate Reference System)',
21
23
  id: 'wkt-crs',
22
24
  module: 'wkt-crs',
@@ -32,4 +34,4 @@ export const WKTCRSLoader: LoaderWithParser<WKTCRS, never, WKTCRSLoaderOptions>
32
34
  parse: async (arrayBuffer, options) =>
33
35
  parseWKTCRS(new TextDecoder().decode(arrayBuffer), options?.['wkt-crs']),
34
36
  parseTextSync: (string, options) => parseWKTCRS(string, options?.['wkt-crs'])
35
- };
37
+ } as const satisfies LoaderWithParser<WKTCRS, never, WKTCRSLoaderOptions>;