@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.
- package/dist/dist.dev.js +264 -218
- package/dist/dist.min.js +30 -0
- package/dist/flatgeobuf/3.27.2/column-meta.d.ts +1 -1
- package/dist/flatgeobuf/3.27.2/column-meta.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/column-meta.js +1 -2
- package/dist/flatgeobuf/3.27.2/config.js +13 -13
- package/dist/flatgeobuf/3.27.2/constants.js +3 -2
- package/dist/flatgeobuf/3.27.2/crs-meta.js +1 -2
- package/dist/flatgeobuf/3.27.2/dumptree.js +28 -23
- package/dist/flatgeobuf/3.27.2/feature.d.ts +1 -1
- package/dist/flatgeobuf/3.27.2/feature.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/feature.js +2 -3
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column-type.js +19 -19
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column.d.ts +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column.js +115 -117
- package/dist/flatgeobuf/3.27.2/flat-geobuf/crs.js +74 -76
- package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.d.ts +2 -2
- package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.js +94 -90
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry-type.js +22 -22
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.d.ts +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.js +222 -210
- package/dist/flatgeobuf/3.27.2/flat-geobuf/header.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/flat-geobuf/header.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/header.js +164 -160
- package/dist/flatgeobuf/3.27.2/flat-geobuf.d.ts +5 -5
- package/dist/flatgeobuf/3.27.2/flat-geobuf.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf.js +1 -1
- package/dist/flatgeobuf/3.27.2/generic/feature.d.ts +4 -4
- package/dist/flatgeobuf/3.27.2/generic/feature.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic/feature.js +195 -205
- package/dist/flatgeobuf/3.27.2/generic/featurecollection.d.ts +6 -6
- package/dist/flatgeobuf/3.27.2/generic/featurecollection.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic/featurecollection.js +150 -128
- package/dist/flatgeobuf/3.27.2/generic/geometry.d.ts +2 -2
- package/dist/flatgeobuf/3.27.2/generic/geometry.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic/geometry.js +78 -66
- package/dist/flatgeobuf/3.27.2/generic/header.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/generic/header.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic/header.js +18 -18
- package/dist/flatgeobuf/3.27.2/generic/index.d.ts +4 -4
- package/dist/flatgeobuf/3.27.2/generic/index.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic/index.js +2 -1
- package/dist/flatgeobuf/3.27.2/generic.d.ts +7 -7
- package/dist/flatgeobuf/3.27.2/generic.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/generic.js +11 -3
- package/dist/flatgeobuf/3.27.2/geojson/feature.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/geojson/feature.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/geojson/feature.js +8 -9
- package/dist/flatgeobuf/3.27.2/geojson/featurecollection.d.ts +2 -2
- package/dist/flatgeobuf/3.27.2/geojson/featurecollection.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/geojson/featurecollection.js +40 -38
- package/dist/flatgeobuf/3.27.2/geojson/geometry.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/geojson/geometry.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/geojson/geometry.js +107 -103
- package/dist/flatgeobuf/3.27.2/geojson/index.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/geojson/index.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/geojson/index.js +2 -1
- package/dist/flatgeobuf/3.27.2/geojson.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/geojson.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/geojson.js +17 -5
- package/dist/flatgeobuf/3.27.2/header-meta.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/header-meta.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/header-meta.js +46 -43
- package/dist/flatgeobuf/3.27.2/header.d.ts +1 -1
- package/dist/flatgeobuf/3.27.2/header.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/header.js +2 -3
- package/dist/flatgeobuf/3.27.2/http-reader.d.ts +3 -3
- package/dist/flatgeobuf/3.27.2/http-reader.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/http-reader.js +241 -171
- package/dist/flatgeobuf/3.27.2/index.d.ts +13 -13
- package/dist/flatgeobuf/3.27.2/index.d.ts.map +1 -1
- package/dist/flatgeobuf/3.27.2/index.js +5 -13
- package/dist/flatgeobuf/3.27.2/logger.js +36 -56
- package/dist/flatgeobuf/3.27.2/packedrtree.js +176 -123
- package/dist/flatgeobuf/3.27.2/streams/utils.js +59 -58
- package/dist/flatgeobuf-loader.js +29 -23
- package/dist/flatgeobuf-worker.js +40 -35
- package/dist/index.cjs +191 -213
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/binary-geometries.js +115 -117
- package/dist/lib/get-schema-from-fgb-header.js +110 -85
- package/dist/lib/parse-flatgeobuf.d.ts +1 -1
- package/dist/lib/parse-flatgeobuf.d.ts.map +1 -1
- package/dist/lib/parse-flatgeobuf.js +125 -109
- package/dist/workers/flatgeobuf-worker.js +3 -1
- package/package.json +11 -6
- package/dist/LICENSE +0 -9
- package/dist/flatgeobuf/3.27.2/LICENSE +0 -29
- package/dist/flatgeobuf/3.27.2/README.md +0 -45
- package/dist/flatgeobuf/3.27.2/column-meta.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/config.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/constants.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/crs-meta.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/dumptree.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/feature.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column-type.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/column.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/crs.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/feature.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry-type.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/geometry.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf/header.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/flat-geobuf.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic/feature.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic/featurecollection.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic/geometry.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic/header.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic/index.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/generic.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/geojson/feature.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/geojson/featurecollection.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/geojson/geometry.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/geojson/index.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/geojson.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/header-meta.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/header.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/http-reader.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/index.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/logger.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/packedrtree.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/streams/utils.js.map +0 -1
- package/dist/flatgeobuf/3.27.2/types/jsts.d.ts +0 -23
- package/dist/flatgeobuf/3.27.2/types/slice.d.ts +0 -16
- package/dist/flatgeobuf-loader.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/binary-geometries.js.map +0 -1
- package/dist/lib/get-schema-from-fgb-header.js.map +0 -1
- package/dist/lib/parse-flatgeobuf.js.map +0 -1
- 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",
|
|
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
|
-
|
|
6084
|
-
|
|
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
|
-
|
|
6396
|
-
|
|
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
|
-
|
|
6516
|
-
|
|
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
|
-
|
|
6798
|
-
|
|
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
|
-
|
|
6877
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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.
|
|
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",
|