@loaders.gl/flatgeobuf 4.2.0-alpha.6 → 4.2.0-beta.1

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.
@@ -1,13 +1,60 @@
1
- import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
+ import { parseFlatGeobuf, parseFlatGeobufInBatches } from "./lib/parse-flatgeobuf.js";
2
3
  export type FlatGeobufLoaderOptions = LoaderOptions & {
3
4
  flatgeobuf?: {
4
5
  shape?: 'geojson-table' | 'columnar-table' | 'binary';
6
+ /** Override the URL to the worker bundle (by default loads from unpkg.com) */
7
+ workerUrl?: string;
5
8
  };
6
9
  gis?: {
7
10
  reproject?: boolean;
8
11
  _targetCrs?: string;
9
12
  };
10
13
  };
11
- export declare const FlatGeobufWorkerLoader: Loader<any, any, FlatGeobufLoaderOptions>;
12
- export declare const FlatGeobufLoader: LoaderWithParser<any, any, FlatGeobufLoaderOptions>;
14
+ export declare const FlatGeobufWorkerLoader: {
15
+ readonly dataType: any;
16
+ readonly batchType: any;
17
+ readonly id: "flatgeobuf";
18
+ readonly name: "FlatGeobuf";
19
+ readonly module: "flatgeobuf";
20
+ readonly version: any;
21
+ readonly worker: true;
22
+ readonly extensions: ["fgb"];
23
+ readonly mimeTypes: ["application/octet-stream"];
24
+ readonly category: "geometry";
25
+ readonly tests: [ArrayBufferLike];
26
+ readonly options: {
27
+ readonly flatgeobuf: {
28
+ readonly shape: "geojson-table";
29
+ };
30
+ readonly gis: {
31
+ readonly reproject: false;
32
+ };
33
+ };
34
+ };
35
+ export declare const FlatGeobufLoader: {
36
+ readonly parse: (arrayBuffer: ArrayBuffer, options: FlatGeobufLoaderOptions | undefined) => Promise<import("@loaders.gl/schema").Table>;
37
+ readonly parseSync: typeof parseFlatGeobuf;
38
+ readonly parseInBatchesFromStream: typeof parseFlatGeobufInBatches;
39
+ readonly binary: true;
40
+ readonly dataType: any;
41
+ readonly batchType: any;
42
+ readonly id: "flatgeobuf";
43
+ readonly name: "FlatGeobuf";
44
+ readonly module: "flatgeobuf";
45
+ readonly version: any;
46
+ readonly worker: true;
47
+ readonly extensions: ["fgb"];
48
+ readonly mimeTypes: ["application/octet-stream"];
49
+ readonly category: "geometry";
50
+ readonly tests: [ArrayBufferLike];
51
+ readonly options: {
52
+ readonly flatgeobuf: {
53
+ readonly shape: "geojson-table";
54
+ };
55
+ readonly gis: {
56
+ readonly reproject: false;
57
+ };
58
+ };
59
+ };
13
60
  //# sourceMappingURL=flatgeobuf-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flatgeobuf-loader.d.ts","sourceRoot":"","sources":["../src/flatgeobuf-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAUtF,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG;IACpD,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,QAAQ,CAAC;KACvD,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,uBAAuB,CAkB5E,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,uBAAuB,CAOhF,CAAC"}
1
+ {"version":3,"file":"flatgeobuf-loader.d.ts","sourceRoot":"","sources":["../src/flatgeobuf-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,eAAe,EAAE,wBAAwB,EAAC,kCAA+B;AASjF,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG;IACpD,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,QAAQ,CAAC;QACtD,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;CAqB2B,CAAC;AAE/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;CAO2C,CAAC"}
@@ -4,10 +4,12 @@
4
4
  import { parseFlatGeobuf, parseFlatGeobufInBatches } from "./lib/parse-flatgeobuf.js";
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest';
7
+ const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest';
8
8
  // FGB\3FGB\1
9
9
  const FGB_MAGIC_NUMBER = [0x66, 0x67, 0x62, 0x03, 0x66, 0x67, 0x62, 0x01];
10
10
  export const FlatGeobufWorkerLoader = {
11
+ dataType: null,
12
+ batchType: null,
11
13
  id: 'flatgeobuf',
12
14
  name: 'FlatGeobuf',
13
15
  module: 'flatgeobuf',
@@ -7,6 +7,52 @@
7
7
  return value;
8
8
  };
9
9
 
10
+ // ../../node_modules/@babel/runtime/helpers/esm/typeof.js
11
+ function _typeof(obj) {
12
+ "@babel/helpers - typeof";
13
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
14
+ return typeof obj2;
15
+ } : function(obj2) {
16
+ return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
17
+ }, _typeof(obj);
18
+ }
19
+
20
+ // ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
21
+ function _toPrimitive(input, hint) {
22
+ if (_typeof(input) !== "object" || input === null)
23
+ return input;
24
+ var prim = input[Symbol.toPrimitive];
25
+ if (prim !== void 0) {
26
+ var res = prim.call(input, hint || "default");
27
+ if (_typeof(res) !== "object")
28
+ return res;
29
+ throw new TypeError("@@toPrimitive must return a primitive value.");
30
+ }
31
+ return (hint === "string" ? String : Number)(input);
32
+ }
33
+
34
+ // ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
35
+ function _toPropertyKey(arg) {
36
+ var key = _toPrimitive(arg, "string");
37
+ return _typeof(key) === "symbol" ? key : String(key);
38
+ }
39
+
40
+ // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
41
+ function _defineProperty(obj, key, value) {
42
+ key = _toPropertyKey(key);
43
+ if (key in obj) {
44
+ Object.defineProperty(obj, key, {
45
+ value,
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true
49
+ });
50
+ } else {
51
+ obj[key] = value;
52
+ }
53
+ return obj;
54
+ }
55
+
10
56
  // ../worker-utils/src/lib/node/worker_threads-browser.ts
11
57
  var parentPort = null;
12
58
 
@@ -206,52 +252,6 @@
206
252
  return await parser(data, { ...options }, context, loader);
207
253
  }
208
254
 
209
- // ../../node_modules/@babel/runtime/helpers/esm/typeof.js
210
- function _typeof(obj) {
211
- "@babel/helpers - typeof";
212
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
213
- return typeof obj2;
214
- } : function(obj2) {
215
- return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
216
- }, _typeof(obj);
217
- }
218
-
219
- // ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
220
- function _toPrimitive(input, hint) {
221
- if (_typeof(input) !== "object" || input === null)
222
- return input;
223
- var prim = input[Symbol.toPrimitive];
224
- if (prim !== void 0) {
225
- var res = prim.call(input, hint || "default");
226
- if (_typeof(res) !== "object")
227
- return res;
228
- throw new TypeError("@@toPrimitive must return a primitive value.");
229
- }
230
- return (hint === "string" ? String : Number)(input);
231
- }
232
-
233
- // ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
234
- function _toPropertyKey(arg) {
235
- var key = _toPrimitive(arg, "string");
236
- return _typeof(key) === "symbol" ? key : String(key);
237
- }
238
-
239
- // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
240
- function _defineProperty(obj, key, value) {
241
- key = _toPropertyKey(key);
242
- if (key in obj) {
243
- Object.defineProperty(obj, key, {
244
- value,
245
- enumerable: true,
246
- configurable: true,
247
- writable: true
248
- });
249
- } else {
250
- obj[key] = value;
251
- }
252
- return obj;
253
- }
254
-
255
255
  // ../../node_modules/proj4/lib/global.js
256
256
  function global_default(defs2) {
257
257
  defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
@@ -8860,9 +8860,11 @@
8860
8860
  }
8861
8861
 
8862
8862
  // src/flatgeobuf-loader.ts
8863
- var VERSION = true ? "4.2.0-alpha.5" : "latest";
8863
+ var VERSION = true ? "4.2.0-alpha.6" : "latest";
8864
8864
  var FGB_MAGIC_NUMBER = [102, 103, 98, 3, 102, 103, 98, 1];
8865
8865
  var FlatGeobufWorkerLoader = {
8866
+ dataType: null,
8867
+ batchType: null,
8866
8868
  id: "flatgeobuf",
8867
8869
  name: "FlatGeobuf",
8868
8870
  module: "flatgeobuf",
package/dist/index.cjs CHANGED
@@ -1837,9 +1837,11 @@ async function* parseFlatGeobufInBatchesToGeoJSON(stream, options) {
1837
1837
  }
1838
1838
 
1839
1839
  // dist/flatgeobuf-loader.js
1840
- var VERSION = true ? "4.2.0-alpha.5" : "latest";
1840
+ var VERSION = true ? "4.2.0-alpha.6" : "latest";
1841
1841
  var FGB_MAGIC_NUMBER = [102, 103, 98, 3, 102, 103, 98, 1];
1842
1842
  var FlatGeobufWorkerLoader = {
1843
+ dataType: null,
1844
+ batchType: null,
1843
1845
  id: "flatgeobuf",
1844
1846
  name: "FlatGeobuf",
1845
1847
  module: "flatgeobuf",