@loaders.gl/flatgeobuf 4.2.0-alpha.4 → 4.2.0-alpha.6

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 (135) hide show
  1. package/dist/dist.dev.js +264 -218
  2. package/dist/dist.min.js +30 -0
  3. package/dist/flatgeobuf/3.27.2/column-meta.d.ts +1 -1
  4. package/dist/flatgeobuf/3.27.2/column-meta.d.ts.map +1 -1
  5. package/dist/flatgeobuf/3.27.2/column-meta.js +1 -2
  6. package/dist/flatgeobuf/3.27.2/config.js +13 -13
  7. package/dist/flatgeobuf/3.27.2/constants.js +3 -2
  8. package/dist/flatgeobuf/3.27.2/crs-meta.js +1 -2
  9. package/dist/flatgeobuf/3.27.2/dumptree.js +28 -23
  10. package/dist/flatgeobuf/3.27.2/feature.d.ts +1 -1
  11. package/dist/flatgeobuf/3.27.2/feature.d.ts.map +1 -1
  12. package/dist/flatgeobuf/3.27.2/feature.js +2 -3
  13. package/dist/flatgeobuf/3.27.2/flat-geobuf/column-type.js +19 -19
  14. package/dist/flatgeobuf/3.27.2/flat-geobuf/column.d.ts +1 -1
  15. package/dist/flatgeobuf/3.27.2/flat-geobuf/column.d.ts.map +1 -1
  16. package/dist/flatgeobuf/3.27.2/flat-geobuf/column.js +115 -117
  17. package/dist/flatgeobuf/3.27.2/flat-geobuf/crs.js +74 -76
  18. package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.d.ts +2 -2
  19. package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.d.ts.map +1 -1
  20. package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.js +94 -90
  21. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry-type.js +22 -22
  22. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.d.ts +1 -1
  23. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.d.ts.map +1 -1
  24. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.js +222 -210
  25. package/dist/flatgeobuf/3.27.2/flat-geobuf/header.d.ts +3 -3
  26. package/dist/flatgeobuf/3.27.2/flat-geobuf/header.d.ts.map +1 -1
  27. package/dist/flatgeobuf/3.27.2/flat-geobuf/header.js +164 -160
  28. package/dist/flatgeobuf/3.27.2/flat-geobuf.d.ts +5 -5
  29. package/dist/flatgeobuf/3.27.2/flat-geobuf.d.ts.map +1 -1
  30. package/dist/flatgeobuf/3.27.2/flat-geobuf.js +1 -1
  31. package/dist/flatgeobuf/3.27.2/generic/feature.d.ts +4 -4
  32. package/dist/flatgeobuf/3.27.2/generic/feature.d.ts.map +1 -1
  33. package/dist/flatgeobuf/3.27.2/generic/feature.js +195 -205
  34. package/dist/flatgeobuf/3.27.2/generic/featurecollection.d.ts +6 -6
  35. package/dist/flatgeobuf/3.27.2/generic/featurecollection.d.ts.map +1 -1
  36. package/dist/flatgeobuf/3.27.2/generic/featurecollection.js +150 -128
  37. package/dist/flatgeobuf/3.27.2/generic/geometry.d.ts +2 -2
  38. package/dist/flatgeobuf/3.27.2/generic/geometry.d.ts.map +1 -1
  39. package/dist/flatgeobuf/3.27.2/generic/geometry.js +78 -66
  40. package/dist/flatgeobuf/3.27.2/generic/header.d.ts +3 -3
  41. package/dist/flatgeobuf/3.27.2/generic/header.d.ts.map +1 -1
  42. package/dist/flatgeobuf/3.27.2/generic/header.js +18 -18
  43. package/dist/flatgeobuf/3.27.2/generic/index.d.ts +4 -4
  44. package/dist/flatgeobuf/3.27.2/generic/index.d.ts.map +1 -1
  45. package/dist/flatgeobuf/3.27.2/generic/index.js +2 -1
  46. package/dist/flatgeobuf/3.27.2/generic.d.ts +7 -7
  47. package/dist/flatgeobuf/3.27.2/generic.d.ts.map +1 -1
  48. package/dist/flatgeobuf/3.27.2/generic.js +11 -3
  49. package/dist/flatgeobuf/3.27.2/geojson/feature.d.ts +3 -3
  50. package/dist/flatgeobuf/3.27.2/geojson/feature.d.ts.map +1 -1
  51. package/dist/flatgeobuf/3.27.2/geojson/feature.js +8 -9
  52. package/dist/flatgeobuf/3.27.2/geojson/featurecollection.d.ts +2 -2
  53. package/dist/flatgeobuf/3.27.2/geojson/featurecollection.d.ts.map +1 -1
  54. package/dist/flatgeobuf/3.27.2/geojson/featurecollection.js +40 -38
  55. package/dist/flatgeobuf/3.27.2/geojson/geometry.d.ts +3 -3
  56. package/dist/flatgeobuf/3.27.2/geojson/geometry.d.ts.map +1 -1
  57. package/dist/flatgeobuf/3.27.2/geojson/geometry.js +107 -103
  58. package/dist/flatgeobuf/3.27.2/geojson/index.d.ts +3 -3
  59. package/dist/flatgeobuf/3.27.2/geojson/index.d.ts.map +1 -1
  60. package/dist/flatgeobuf/3.27.2/geojson/index.js +2 -1
  61. package/dist/flatgeobuf/3.27.2/geojson.d.ts +3 -3
  62. package/dist/flatgeobuf/3.27.2/geojson.d.ts.map +1 -1
  63. package/dist/flatgeobuf/3.27.2/geojson.js +17 -5
  64. package/dist/flatgeobuf/3.27.2/header-meta.d.ts +3 -3
  65. package/dist/flatgeobuf/3.27.2/header-meta.d.ts.map +1 -1
  66. package/dist/flatgeobuf/3.27.2/header-meta.js +46 -43
  67. package/dist/flatgeobuf/3.27.2/header.d.ts +1 -1
  68. package/dist/flatgeobuf/3.27.2/header.d.ts.map +1 -1
  69. package/dist/flatgeobuf/3.27.2/header.js +2 -3
  70. package/dist/flatgeobuf/3.27.2/http-reader.d.ts +3 -3
  71. package/dist/flatgeobuf/3.27.2/http-reader.d.ts.map +1 -1
  72. package/dist/flatgeobuf/3.27.2/http-reader.js +241 -171
  73. package/dist/flatgeobuf/3.27.2/index.d.ts +13 -13
  74. package/dist/flatgeobuf/3.27.2/index.d.ts.map +1 -1
  75. package/dist/flatgeobuf/3.27.2/index.js +5 -13
  76. package/dist/flatgeobuf/3.27.2/logger.js +36 -56
  77. package/dist/flatgeobuf/3.27.2/packedrtree.js +176 -123
  78. package/dist/flatgeobuf/3.27.2/streams/utils.js +59 -58
  79. package/dist/flatgeobuf-loader.js +29 -23
  80. package/dist/flatgeobuf-worker.js +40 -35
  81. package/dist/index.cjs +191 -213
  82. package/dist/index.cjs.map +7 -0
  83. package/dist/index.d.ts +2 -2
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +3 -1
  86. package/dist/lib/binary-geometries.js +115 -117
  87. package/dist/lib/get-schema-from-fgb-header.js +110 -85
  88. package/dist/lib/parse-flatgeobuf.d.ts +1 -1
  89. package/dist/lib/parse-flatgeobuf.d.ts.map +1 -1
  90. package/dist/lib/parse-flatgeobuf.js +125 -109
  91. package/dist/workers/flatgeobuf-worker.js +3 -1
  92. package/package.json +11 -6
  93. package/dist/LICENSE +0 -9
  94. package/dist/flatgeobuf/3.27.2/LICENSE +0 -29
  95. package/dist/flatgeobuf/3.27.2/README.md +0 -45
  96. package/dist/flatgeobuf/3.27.2/column-meta.js.map +0 -1
  97. package/dist/flatgeobuf/3.27.2/config.js.map +0 -1
  98. package/dist/flatgeobuf/3.27.2/constants.js.map +0 -1
  99. package/dist/flatgeobuf/3.27.2/crs-meta.js.map +0 -1
  100. package/dist/flatgeobuf/3.27.2/dumptree.js.map +0 -1
  101. package/dist/flatgeobuf/3.27.2/feature.js.map +0 -1
  102. package/dist/flatgeobuf/3.27.2/flat-geobuf/column-type.js.map +0 -1
  103. package/dist/flatgeobuf/3.27.2/flat-geobuf/column.js.map +0 -1
  104. package/dist/flatgeobuf/3.27.2/flat-geobuf/crs.js.map +0 -1
  105. package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.js.map +0 -1
  106. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry-type.js.map +0 -1
  107. package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.js.map +0 -1
  108. package/dist/flatgeobuf/3.27.2/flat-geobuf/header.js.map +0 -1
  109. package/dist/flatgeobuf/3.27.2/flat-geobuf.js.map +0 -1
  110. package/dist/flatgeobuf/3.27.2/generic/feature.js.map +0 -1
  111. package/dist/flatgeobuf/3.27.2/generic/featurecollection.js.map +0 -1
  112. package/dist/flatgeobuf/3.27.2/generic/geometry.js.map +0 -1
  113. package/dist/flatgeobuf/3.27.2/generic/header.js.map +0 -1
  114. package/dist/flatgeobuf/3.27.2/generic/index.js.map +0 -1
  115. package/dist/flatgeobuf/3.27.2/generic.js.map +0 -1
  116. package/dist/flatgeobuf/3.27.2/geojson/feature.js.map +0 -1
  117. package/dist/flatgeobuf/3.27.2/geojson/featurecollection.js.map +0 -1
  118. package/dist/flatgeobuf/3.27.2/geojson/geometry.js.map +0 -1
  119. package/dist/flatgeobuf/3.27.2/geojson/index.js.map +0 -1
  120. package/dist/flatgeobuf/3.27.2/geojson.js.map +0 -1
  121. package/dist/flatgeobuf/3.27.2/header-meta.js.map +0 -1
  122. package/dist/flatgeobuf/3.27.2/header.js.map +0 -1
  123. package/dist/flatgeobuf/3.27.2/http-reader.js.map +0 -1
  124. package/dist/flatgeobuf/3.27.2/index.js.map +0 -1
  125. package/dist/flatgeobuf/3.27.2/logger.js.map +0 -1
  126. package/dist/flatgeobuf/3.27.2/packedrtree.js.map +0 -1
  127. package/dist/flatgeobuf/3.27.2/streams/utils.js.map +0 -1
  128. package/dist/flatgeobuf/3.27.2/types/jsts.d.ts +0 -23
  129. package/dist/flatgeobuf/3.27.2/types/slice.d.ts +0 -16
  130. package/dist/flatgeobuf-loader.js.map +0 -1
  131. package/dist/index.js.map +0 -1
  132. package/dist/lib/binary-geometries.js.map +0 -1
  133. package/dist/lib/get-schema-from-fgb-header.js.map +0 -1
  134. package/dist/lib/parse-flatgeobuf.js.map +0 -1
  135. package/dist/workers/flatgeobuf-worker.js.map +0 -1
@@ -1,5 +1,12 @@
1
1
  "use strict";
2
2
  (() => {
3
+ var __defProp = Object.defineProperty;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __publicField = (obj, key, value) => {
6
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ return value;
8
+ };
9
+
3
10
  // ../worker-utils/src/lib/node/worker_threads-browser.ts
4
11
  var parentPort = null;
5
12
 
@@ -59,7 +66,9 @@
59
66
  }
60
67
  getParentPort().then((parentPort2) => {
61
68
  if (parentPort2) {
62
- parentPort2.on("message", handleMessage);
69
+ parentPort2.on("message", (message) => {
70
+ handleMessage(message);
71
+ });
63
72
  parentPort2.on("exit", () => console.debug("Node worker closing"));
64
73
  } else {
65
74
  globalThis.onmessage = handleMessage;
@@ -6080,10 +6089,8 @@
6080
6089
 
6081
6090
  // src/flatgeobuf/3.27.2/flat-geobuf/geometry.ts
6082
6091
  var Geometry = class {
6083
- constructor() {
6084
- this.bb = null;
6085
- this.bb_pos = 0;
6086
- }
6092
+ bb = null;
6093
+ bb_pos = 0;
6087
6094
  __init(i, bb) {
6088
6095
  this.bb_pos = i;
6089
6096
  this.bb = bb;
@@ -6392,10 +6399,8 @@
6392
6399
 
6393
6400
  // src/flatgeobuf/3.27.2/flat-geobuf/column.ts
6394
6401
  var Column = class {
6395
- constructor() {
6396
- this.bb = null;
6397
- this.bb_pos = 0;
6398
- }
6402
+ bb = null;
6403
+ bb_pos = 0;
6399
6404
  __init(i, bb) {
6400
6405
  this.bb_pos = i;
6401
6406
  this.bb = bb;
@@ -6512,10 +6517,8 @@
6512
6517
 
6513
6518
  // src/flatgeobuf/3.27.2/flat-geobuf/feature.ts
6514
6519
  var Feature = class {
6515
- constructor() {
6516
- this.bb = null;
6517
- this.bb_pos = 0;
6518
- }
6520
+ bb = null;
6521
+ bb_pos = 0;
6519
6522
  __init(i, bb) {
6520
6523
  this.bb_pos = i;
6521
6524
  this.bb = bb;
@@ -6794,10 +6797,8 @@
6794
6797
 
6795
6798
  // src/flatgeobuf/3.27.2/flat-geobuf/crs.ts
6796
6799
  var Crs = class {
6797
- constructor() {
6798
- this.bb = null;
6799
- this.bb_pos = 0;
6800
- }
6800
+ bb = null;
6801
+ bb_pos = 0;
6801
6802
  __init(i, bb) {
6802
6803
  this.bb_pos = i;
6803
6804
  this.bb = bb;
@@ -6873,10 +6874,8 @@
6873
6874
 
6874
6875
  // src/flatgeobuf/3.27.2/flat-geobuf/header.ts
6875
6876
  var Header = class {
6876
- constructor() {
6877
- this.bb = null;
6878
- this.bb_pos = 0;
6879
- }
6877
+ bb = null;
6878
+ bb_pos = 0;
6880
6879
  __init(i, bb) {
6881
6880
  this.bb_pos = i;
6882
6881
  this.bb = bb;
@@ -8200,9 +8199,7 @@
8200
8199
 
8201
8200
  // src/flatgeobuf/3.27.2/config.ts
8202
8201
  var _Config = class {
8203
- constructor() {
8204
- this._extraRequestThreshold = 256 * 1024;
8205
- }
8202
+ _extraRequestThreshold = 256 * 1024;
8206
8203
  /**
8207
8204
  * Fetch up to this many extra bytes if it will eliminate an extra request
8208
8205
  */
@@ -8217,7 +8214,7 @@
8217
8214
  }
8218
8215
  };
8219
8216
  var Config = _Config;
8220
- Config.global = new _Config();
8217
+ __publicField(Config, "global", new _Config());
8221
8218
 
8222
8219
  // src/flatgeobuf/3.27.2/logger.ts
8223
8220
  var Logger = class {
@@ -8257,7 +8254,7 @@
8257
8254
  }
8258
8255
  }
8259
8256
  };
8260
- Logger.logLevel = 2 /* Warn */;
8257
+ __publicField(Logger, "logLevel", 2 /* Warn */);
8261
8258
 
8262
8259
  // src/flatgeobuf/3.27.2/packedrtree.ts
8263
8260
  var NODE_ITEM_BYTE_LEN = 8 * 4 + 8;
@@ -8298,6 +8295,8 @@
8298
8295
  }
8299
8296
  async function* streamSearch(numItems, nodeSize, rect, readNode) {
8300
8297
  class NodeRange {
8298
+ _level;
8299
+ nodes;
8301
8300
  constructor(nodes, level) {
8302
8301
  this._level = level;
8303
8302
  this.nodes = nodes;
@@ -8421,6 +8420,10 @@
8421
8420
 
8422
8421
  // src/flatgeobuf/3.27.2/http-reader.ts
8423
8422
  var HttpReader = class {
8423
+ headerClient;
8424
+ header;
8425
+ headerLength;
8426
+ indexLength;
8424
8427
  constructor(headerClient, header, headerLength, indexLength) {
8425
8428
  this.headerClient = headerClient;
8426
8429
  this.header = header;
@@ -8571,13 +8574,14 @@
8571
8574
  }
8572
8575
  };
8573
8576
  var BufferedHttpRangeClient = class {
8577
+ httpClient;
8578
+ bytesEverUsed = 0;
8579
+ bytesEverFetched = 0;
8580
+ buffer = new ArrayBuffer(0);
8581
+ // Byte offset of `buffer` with respect to the beginning of the file being
8582
+ // buffered
8583
+ head = 0;
8574
8584
  constructor(source) {
8575
- this.bytesEverUsed = 0;
8576
- this.bytesEverFetched = 0;
8577
- this.buffer = new ArrayBuffer(0);
8578
- // Byte offset of `buffer` with respect to the beginning of the file being
8579
- // buffered
8580
- this.head = 0;
8581
8585
  if (typeof source === "string") {
8582
8586
  this.httpClient = new HttpRangeClient(source);
8583
8587
  } else if (source instanceof HttpRangeClient) {
@@ -8609,9 +8613,10 @@
8609
8613
  }
8610
8614
  };
8611
8615
  var HttpRangeClient = class {
8616
+ url;
8617
+ requestsEverMade = 0;
8618
+ bytesEverRequested = 0;
8612
8619
  constructor(url) {
8613
- this.requestsEverMade = 0;
8614
- this.bytesEverRequested = 0;
8615
8620
  this.url = url;
8616
8621
  }
8617
8622
  async getRange(begin, length, purpose) {
@@ -8855,7 +8860,7 @@
8855
8860
  }
8856
8861
 
8857
8862
  // src/flatgeobuf-loader.ts
8858
- var VERSION = true ? "4.2.0-alpha.4" : "latest";
8863
+ var VERSION = true ? "4.2.0-alpha.5" : "latest";
8859
8864
  var FGB_MAGIC_NUMBER = [102, 103, 98, 3, 102, 103, 98, 1];
8860
8865
  var FlatGeobufWorkerLoader = {
8861
8866
  id: "flatgeobuf",