@loaders.gl/geospatial 5.0.0-beta.7 → 5.0.0-beta.8
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/dbf-loader-types.cjs +1 -1
- package/dist/dbf-worker.js +37 -1
- package/dist/flatgeobuf/flatgeobuf-loader-types.cjs +1 -1
- package/dist/flatgeobuf/flatgeobuf-loader-types.js +1 -1
- package/dist/flatgeobuf/flatgeobuf-source-loader.cjs +2 -2
- package/dist/flatgeobuf/flatgeobuf-source-loader.cjs.map +2 -2
- package/dist/flatgeobuf/flatgeobuf-source-loader.d.ts +1 -1
- package/dist/flatgeobuf/flatgeobuf-source-loader.d.ts.map +1 -1
- package/dist/flatgeobuf/flatgeobuf-source-loader.js +2 -2
- package/dist/flatgeobuf/flatgeobuf-source-loader.js.map +1 -1
- package/dist/flatgeobuf-loader-types.cjs +1 -1
- package/dist/flatgeobuf-source-loader.cjs +2 -2
- package/dist/flatgeobuf-source-loader.cjs.map +2 -2
- package/dist/flatgeobuf-worker.js +11 -1
- package/dist/geopackage/geopackage-source-loader.cjs +2 -2
- package/dist/geopackage/geopackage-source-loader.cjs.map +2 -2
- package/dist/geopackage/geopackage-source-loader.d.ts +1 -1
- package/dist/geopackage/geopackage-source-loader.d.ts.map +1 -1
- package/dist/geopackage/geopackage-source-loader.js +2 -2
- package/dist/geopackage/geopackage-source-loader.js.map +1 -1
- package/dist/geopackage-source-loader.cjs +2 -2
- package/dist/geopackage-source-loader.cjs.map +2 -2
- package/dist/gpx-loader-types.cjs +1 -1
- package/dist/kml/gpx-loader-types.cjs +1 -1
- package/dist/kml/gpx-loader-types.js +1 -1
- package/dist/kml/kml-loader-types.cjs +1 -1
- package/dist/kml/kml-loader-types.js +1 -1
- package/dist/kml/kml-writer.cjs +1 -1
- package/dist/kml/kml-writer.js +1 -1
- package/dist/kml/kmz-loader-types.cjs +1 -1
- package/dist/kml/kmz-loader-types.js +1 -1
- package/dist/kml/kmz-source.cjs +2 -2
- package/dist/kml/kmz-source.cjs.map +2 -2
- package/dist/kml/kmz-source.d.ts +1 -1
- package/dist/kml/kmz-source.d.ts.map +1 -1
- package/dist/kml/kmz-source.js +2 -2
- package/dist/kml/kmz-source.js.map +1 -1
- package/dist/kml/tcx-loader-types.cjs +1 -1
- package/dist/kml/tcx-loader-types.js +1 -1
- package/dist/kml-loader-types.cjs +1 -1
- package/dist/kml-writer.cjs +1 -1
- package/dist/kmz-loader-types.cjs +1 -1
- package/dist/kmz-source.cjs +2 -2
- package/dist/kmz-source.cjs.map +2 -2
- package/dist/shapefile/dbf-loader-types.cjs +1 -1
- package/dist/shapefile/dbf-loader-types.js +1 -1
- package/dist/shapefile/dbf-loader.d.ts +62 -0
- package/dist/shapefile/dbf-loader.d.ts.map +1 -1
- package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.cjs +1 -1
- package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.cjs.map +2 -2
- package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.js +1 -1
- package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.js.map +1 -1
- package/dist/shapefile/lib/parsers/parse-shp-header.cjs +4 -3
- package/dist/shapefile/lib/parsers/parse-shp-header.cjs.map +2 -2
- package/dist/shapefile/lib/parsers/parse-shp-header.d.ts +2 -1
- package/dist/shapefile/lib/parsers/parse-shp-header.d.ts.map +1 -1
- package/dist/shapefile/lib/parsers/parse-shp-header.js +4 -5
- package/dist/shapefile/lib/parsers/parse-shp-header.js.map +1 -1
- package/dist/shapefile/lib/parsers/parse-shp-to-arrow.cjs +1 -1
- package/dist/shapefile/lib/parsers/parse-shp-to-arrow.cjs.map +2 -2
- package/dist/shapefile/lib/parsers/parse-shp-to-arrow.js +1 -1
- package/dist/shapefile/lib/parsers/parse-shp-to-arrow.js.map +1 -1
- package/dist/shapefile/lib/parsers/parse-shp.cjs +1 -1
- package/dist/shapefile/lib/parsers/parse-shp.cjs.map +2 -2
- package/dist/shapefile/lib/parsers/parse-shp.js +1 -1
- package/dist/shapefile/lib/parsers/parse-shp.js.map +1 -1
- package/dist/shapefile/shapefile-loader-types.cjs +1 -1
- package/dist/shapefile/shapefile-loader-types.js +1 -1
- package/dist/shapefile/shp-loader-types.cjs +1 -1
- package/dist/shapefile/shp-loader-types.js +1 -1
- package/dist/shapefile/shp-loader.d.ts +69 -0
- package/dist/shapefile/shp-loader.d.ts.map +1 -1
- package/dist/shapefile-loader-types.cjs +1 -1
- package/dist/shapefile-worker.js +806 -35
- package/dist/shp-loader-types.cjs +1 -1
- package/dist/shp-worker.js +800 -29
- package/dist/tcx-loader-types.cjs +1 -1
- package/dist/wkt/lib/version.cjs +1 -1
- package/dist/wkt/lib/version.js +1 -1
- package/dist/wkt-worker.js +10 -1
- package/package.json +6 -6
- package/src/flatgeobuf/flatgeobuf-source-loader.ts +1 -1
- package/src/geopackage/geopackage-source-loader.ts +1 -1
- package/src/kml/kmz-source.ts +1 -1
- package/src/shapefile/lib/parsers/build-geoarrow-geometry-arrow.ts +1 -1
- package/src/shapefile/lib/parsers/parse-shp-header.ts +4 -5
- package/src/shapefile/lib/parsers/parse-shp-to-arrow.ts +1 -1
- package/src/shapefile/lib/parsers/parse-shp.ts +1 -1
package/dist/shapefile-worker.js
CHANGED
|
@@ -31,6 +31,738 @@
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
// ../../node_modules/probe.gl/dist/env/lib/globals.js
|
|
35
|
+
var window_, document_, process_, console_, navigator_;
|
|
36
|
+
var init_globals = __esm({
|
|
37
|
+
"../../node_modules/probe.gl/dist/env/lib/globals.js"() {
|
|
38
|
+
window_ = globalThis;
|
|
39
|
+
document_ = globalThis.document || {};
|
|
40
|
+
process_ = globalThis.process || {};
|
|
41
|
+
console_ = globalThis.console;
|
|
42
|
+
navigator_ = globalThis.navigator || {};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-electron.js
|
|
47
|
+
function isElectron(mockUserAgent) {
|
|
48
|
+
if (typeof window !== "undefined" && window.process?.type === "renderer") {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
55
|
+
const userAgent = mockUserAgent || realUserAgent;
|
|
56
|
+
return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
|
|
57
|
+
}
|
|
58
|
+
var init_is_electron = __esm({
|
|
59
|
+
"../../node_modules/probe.gl/dist/env/lib/is-electron.js"() {
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-browser.js
|
|
64
|
+
function isBrowser() {
|
|
65
|
+
const isNode = (
|
|
66
|
+
// @ts-expect-error
|
|
67
|
+
typeof process === "object" && String(process) === "[object process]" && !process?.browser
|
|
68
|
+
);
|
|
69
|
+
return !isNode || isElectron();
|
|
70
|
+
}
|
|
71
|
+
var init_is_browser = __esm({
|
|
72
|
+
"../../node_modules/probe.gl/dist/env/lib/is-browser.js"() {
|
|
73
|
+
init_is_electron();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// ../../node_modules/probe.gl/dist/env/lib/get-browser.js
|
|
78
|
+
var init_get_browser = __esm({
|
|
79
|
+
"../../node_modules/probe.gl/dist/env/lib/get-browser.js"() {
|
|
80
|
+
init_is_browser();
|
|
81
|
+
init_is_electron();
|
|
82
|
+
init_globals();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// ../../node_modules/probe.gl/dist/env/utils/assert.js
|
|
87
|
+
var init_assert = __esm({
|
|
88
|
+
"../../node_modules/probe.gl/dist/env/utils/assert.js"() {
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// ../../node_modules/probe.gl/dist/env/index.js
|
|
93
|
+
var VERSION;
|
|
94
|
+
var init_env = __esm({
|
|
95
|
+
"../../node_modules/probe.gl/dist/env/index.js"() {
|
|
96
|
+
init_globals();
|
|
97
|
+
init_is_browser();
|
|
98
|
+
init_get_browser();
|
|
99
|
+
init_is_electron();
|
|
100
|
+
init_assert();
|
|
101
|
+
VERSION = true ? "5.0.0" : "untranspiled source";
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// ../../node_modules/probe.gl/dist/log/utils/assert.js
|
|
106
|
+
function assert2(condition, message) {
|
|
107
|
+
if (!condition) {
|
|
108
|
+
throw new Error(message || "Assertion failed");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
var init_assert2 = __esm({
|
|
112
|
+
"../../node_modules/probe.gl/dist/log/utils/assert.js"() {
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// ../../node_modules/probe.gl/dist/log/loggers/log-utils.js
|
|
117
|
+
function normalizeLogLevel(logLevel) {
|
|
118
|
+
if (!logLevel) {
|
|
119
|
+
return 0;
|
|
120
|
+
}
|
|
121
|
+
let resolvedLevel;
|
|
122
|
+
switch (typeof logLevel) {
|
|
123
|
+
case "number":
|
|
124
|
+
resolvedLevel = logLevel;
|
|
125
|
+
break;
|
|
126
|
+
case "object":
|
|
127
|
+
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
assert2(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
133
|
+
return resolvedLevel;
|
|
134
|
+
}
|
|
135
|
+
function normalizeArguments(opts) {
|
|
136
|
+
const { logLevel, message } = opts;
|
|
137
|
+
opts.logLevel = normalizeLogLevel(logLevel);
|
|
138
|
+
const args = opts.args ? Array.from(opts.args) : [];
|
|
139
|
+
while (args.length && args.shift() !== message) {
|
|
140
|
+
}
|
|
141
|
+
switch (typeof logLevel) {
|
|
142
|
+
case "string":
|
|
143
|
+
case "function":
|
|
144
|
+
if (message !== void 0) {
|
|
145
|
+
args.unshift(message);
|
|
146
|
+
}
|
|
147
|
+
opts.message = logLevel;
|
|
148
|
+
break;
|
|
149
|
+
case "object":
|
|
150
|
+
Object.assign(opts, logLevel);
|
|
151
|
+
break;
|
|
152
|
+
default:
|
|
153
|
+
}
|
|
154
|
+
if (typeof opts.message === "function") {
|
|
155
|
+
opts.message = opts.message();
|
|
156
|
+
}
|
|
157
|
+
const messageType = typeof opts.message;
|
|
158
|
+
assert2(messageType === "string" || messageType === "object");
|
|
159
|
+
return Object.assign(opts, { args }, opts.opts);
|
|
160
|
+
}
|
|
161
|
+
var init_log_utils = __esm({
|
|
162
|
+
"../../node_modules/probe.gl/dist/log/loggers/log-utils.js"() {
|
|
163
|
+
init_assert2();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// ../../node_modules/probe.gl/dist/log/loggers/base-log.js
|
|
168
|
+
var noop, BaseLog;
|
|
169
|
+
var init_base_log = __esm({
|
|
170
|
+
"../../node_modules/probe.gl/dist/log/loggers/base-log.js"() {
|
|
171
|
+
init_log_utils();
|
|
172
|
+
noop = () => {
|
|
173
|
+
};
|
|
174
|
+
BaseLog = class {
|
|
175
|
+
constructor({ level = 0 } = {}) {
|
|
176
|
+
this.userData = {};
|
|
177
|
+
this._onceCache = /* @__PURE__ */ new Set();
|
|
178
|
+
this._level = level;
|
|
179
|
+
}
|
|
180
|
+
set level(newLevel) {
|
|
181
|
+
this.setLevel(newLevel);
|
|
182
|
+
}
|
|
183
|
+
get level() {
|
|
184
|
+
return this.getLevel();
|
|
185
|
+
}
|
|
186
|
+
setLevel(level) {
|
|
187
|
+
this._level = level;
|
|
188
|
+
return this;
|
|
189
|
+
}
|
|
190
|
+
getLevel() {
|
|
191
|
+
return this._level;
|
|
192
|
+
}
|
|
193
|
+
// Unconditional logging
|
|
194
|
+
warn(message, ...args) {
|
|
195
|
+
return this._log("warn", 0, message, args, { once: true });
|
|
196
|
+
}
|
|
197
|
+
error(message, ...args) {
|
|
198
|
+
return this._log("error", 0, message, args);
|
|
199
|
+
}
|
|
200
|
+
// Conditional logging
|
|
201
|
+
log(logLevel, message, ...args) {
|
|
202
|
+
return this._log("log", logLevel, message, args);
|
|
203
|
+
}
|
|
204
|
+
info(logLevel, message, ...args) {
|
|
205
|
+
return this._log("info", logLevel, message, args);
|
|
206
|
+
}
|
|
207
|
+
once(logLevel, message, ...args) {
|
|
208
|
+
return this._log("once", logLevel, message, args, { once: true });
|
|
209
|
+
}
|
|
210
|
+
_log(type, logLevel, message, args, options = {}) {
|
|
211
|
+
const normalized = normalizeArguments({
|
|
212
|
+
logLevel,
|
|
213
|
+
message,
|
|
214
|
+
args: this._buildArgs(logLevel, message, args),
|
|
215
|
+
opts: options
|
|
216
|
+
});
|
|
217
|
+
return this._createLogFunction(type, normalized, options);
|
|
218
|
+
}
|
|
219
|
+
_buildArgs(logLevel, message, args) {
|
|
220
|
+
return [logLevel, message, ...args];
|
|
221
|
+
}
|
|
222
|
+
_createLogFunction(type, normalized, options) {
|
|
223
|
+
if (!this._shouldLog(normalized.logLevel)) {
|
|
224
|
+
return noop;
|
|
225
|
+
}
|
|
226
|
+
const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
|
|
227
|
+
if ((options.once || normalized.once) && tag !== void 0) {
|
|
228
|
+
if (this._onceCache.has(tag)) {
|
|
229
|
+
return noop;
|
|
230
|
+
}
|
|
231
|
+
this._onceCache.add(tag);
|
|
232
|
+
}
|
|
233
|
+
return this._emit(type, normalized);
|
|
234
|
+
}
|
|
235
|
+
_shouldLog(logLevel) {
|
|
236
|
+
return this.getLevel() >= normalizeLogLevel(logLevel);
|
|
237
|
+
}
|
|
238
|
+
_getOnceTag(tag) {
|
|
239
|
+
if (tag === void 0) {
|
|
240
|
+
return void 0;
|
|
241
|
+
}
|
|
242
|
+
try {
|
|
243
|
+
return typeof tag === "string" ? tag : String(tag);
|
|
244
|
+
} catch {
|
|
245
|
+
return void 0;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// ../../node_modules/probe.gl/dist/log/utils/local-storage.js
|
|
253
|
+
function getStorage(type) {
|
|
254
|
+
try {
|
|
255
|
+
const storage = window[type];
|
|
256
|
+
const x = "__storage_test__";
|
|
257
|
+
storage.setItem(x, x);
|
|
258
|
+
storage.removeItem(x);
|
|
259
|
+
return storage;
|
|
260
|
+
} catch (e) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
var LocalStorage;
|
|
265
|
+
var init_local_storage = __esm({
|
|
266
|
+
"../../node_modules/probe.gl/dist/log/utils/local-storage.js"() {
|
|
267
|
+
LocalStorage = class {
|
|
268
|
+
constructor(id, defaultConfig, type = "sessionStorage") {
|
|
269
|
+
this.storage = getStorage(type);
|
|
270
|
+
this.id = id;
|
|
271
|
+
this.config = defaultConfig;
|
|
272
|
+
this._loadConfiguration();
|
|
273
|
+
}
|
|
274
|
+
getConfiguration() {
|
|
275
|
+
return this.config;
|
|
276
|
+
}
|
|
277
|
+
setConfiguration(configuration) {
|
|
278
|
+
Object.assign(this.config, configuration);
|
|
279
|
+
if (this.storage) {
|
|
280
|
+
const serialized = JSON.stringify(this.config);
|
|
281
|
+
this.storage.setItem(this.id, serialized);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
// Get config from persistent store, if available
|
|
285
|
+
_loadConfiguration() {
|
|
286
|
+
let configuration = {};
|
|
287
|
+
if (this.storage) {
|
|
288
|
+
const serializedConfiguration = this.storage.getItem(this.id);
|
|
289
|
+
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
290
|
+
}
|
|
291
|
+
Object.assign(this.config, configuration);
|
|
292
|
+
return this;
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// ../../node_modules/probe.gl/dist/log/utils/formatters.js
|
|
299
|
+
function formatTime(ms) {
|
|
300
|
+
let formatted;
|
|
301
|
+
if (ms < 10) {
|
|
302
|
+
formatted = `${ms.toFixed(2)}ms`;
|
|
303
|
+
} else if (ms < 100) {
|
|
304
|
+
formatted = `${ms.toFixed(1)}ms`;
|
|
305
|
+
} else if (ms < 1e3) {
|
|
306
|
+
formatted = `${ms.toFixed(0)}ms`;
|
|
307
|
+
} else {
|
|
308
|
+
formatted = `${(ms / 1e3).toFixed(2)}s`;
|
|
309
|
+
}
|
|
310
|
+
return formatted;
|
|
311
|
+
}
|
|
312
|
+
function leftPad(string, length = 8) {
|
|
313
|
+
const padLength = Math.max(length - string.length, 0);
|
|
314
|
+
return `${" ".repeat(padLength)}${string}`;
|
|
315
|
+
}
|
|
316
|
+
var init_formatters = __esm({
|
|
317
|
+
"../../node_modules/probe.gl/dist/log/utils/formatters.js"() {
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// ../../node_modules/probe.gl/dist/log/utils/color.js
|
|
322
|
+
function getColor(color) {
|
|
323
|
+
if (typeof color !== "string") {
|
|
324
|
+
return color;
|
|
325
|
+
}
|
|
326
|
+
color = color.toUpperCase();
|
|
327
|
+
return COLOR[color] || COLOR.WHITE;
|
|
328
|
+
}
|
|
329
|
+
function addColor(string, color, background) {
|
|
330
|
+
if (!isBrowser && typeof string === "string") {
|
|
331
|
+
if (color) {
|
|
332
|
+
const colorCode = getColor(color);
|
|
333
|
+
string = `\x1B[${colorCode}m${string}\x1B[39m`;
|
|
334
|
+
}
|
|
335
|
+
if (background) {
|
|
336
|
+
const colorCode = getColor(background);
|
|
337
|
+
string = `\x1B[${colorCode + BACKGROUND_INCREMENT}m${string}\x1B[49m`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return string;
|
|
341
|
+
}
|
|
342
|
+
var COLOR, BACKGROUND_INCREMENT;
|
|
343
|
+
var init_color = __esm({
|
|
344
|
+
"../../node_modules/probe.gl/dist/log/utils/color.js"() {
|
|
345
|
+
init_env();
|
|
346
|
+
(function(COLOR2) {
|
|
347
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
348
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
349
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
350
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
351
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
352
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
353
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
354
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
355
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
356
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
357
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
358
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
359
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
360
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
361
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
362
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
363
|
+
})(COLOR || (COLOR = {}));
|
|
364
|
+
BACKGROUND_INCREMENT = 10;
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
// ../../node_modules/probe.gl/dist/log/utils/autobind.js
|
|
369
|
+
function autobind(obj, predefined = ["constructor"]) {
|
|
370
|
+
const proto = Object.getPrototypeOf(obj);
|
|
371
|
+
const propNames = Object.getOwnPropertyNames(proto);
|
|
372
|
+
const object2 = obj;
|
|
373
|
+
for (const key2 of propNames) {
|
|
374
|
+
const value2 = object2[key2];
|
|
375
|
+
if (typeof value2 === "function") {
|
|
376
|
+
if (!predefined.find((name) => key2 === name)) {
|
|
377
|
+
object2[key2] = value2.bind(obj);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
var init_autobind = __esm({
|
|
383
|
+
"../../node_modules/probe.gl/dist/log/utils/autobind.js"() {
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// ../../node_modules/probe.gl/dist/log/probe.js
|
|
388
|
+
var Probe, probe;
|
|
389
|
+
var init_probe = __esm({
|
|
390
|
+
"../../node_modules/probe.gl/dist/log/probe.js"() {
|
|
391
|
+
init_env();
|
|
392
|
+
Probe = class {
|
|
393
|
+
getHighResolutionTimer() {
|
|
394
|
+
let timestamp;
|
|
395
|
+
if (isBrowser() && window_.performance) {
|
|
396
|
+
timestamp = window_?.performance?.now?.();
|
|
397
|
+
} else if ("hrtime" in process_) {
|
|
398
|
+
const timeParts = process_?.hrtime?.();
|
|
399
|
+
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
400
|
+
} else {
|
|
401
|
+
timestamp = Date.now();
|
|
402
|
+
}
|
|
403
|
+
return timestamp;
|
|
404
|
+
}
|
|
405
|
+
getMemoryUsageMB() {
|
|
406
|
+
const performance2 = window_?.performance;
|
|
407
|
+
const usedJSHeapSize = performance2?.memory?.usedJSHeapSize;
|
|
408
|
+
if (usedJSHeapSize === void 0 || usedJSHeapSize === null) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
return Math.trunc(usedJSHeapSize / 1024 / 1024);
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
probe = new Probe();
|
|
415
|
+
globalThis.Probe = Probe;
|
|
416
|
+
globalThis.probe = probe;
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
// ../../node_modules/probe.gl/dist/log/loggers/probe-log.js
|
|
421
|
+
function decorateMessage(id, message, opts) {
|
|
422
|
+
if (typeof message === "string") {
|
|
423
|
+
const time = opts.time ? leftPad(formatTime(opts.total)) : "";
|
|
424
|
+
message = opts.time ? `${id}: ${time} ${message}` : `${id}: ${message}`;
|
|
425
|
+
message = addColor(message, opts.color, opts.background);
|
|
426
|
+
}
|
|
427
|
+
return message;
|
|
428
|
+
}
|
|
429
|
+
function getTableHeader(table) {
|
|
430
|
+
for (const key2 in table) {
|
|
431
|
+
for (const title in table[key2]) {
|
|
432
|
+
return title || "untitled";
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return "empty";
|
|
436
|
+
}
|
|
437
|
+
var originalConsole, DEFAULT_LOG_CONFIGURATION, ProbeLog;
|
|
438
|
+
var init_probe_log = __esm({
|
|
439
|
+
"../../node_modules/probe.gl/dist/log/loggers/probe-log.js"() {
|
|
440
|
+
init_env();
|
|
441
|
+
init_base_log();
|
|
442
|
+
init_local_storage();
|
|
443
|
+
init_formatters();
|
|
444
|
+
init_color();
|
|
445
|
+
init_autobind();
|
|
446
|
+
init_assert2();
|
|
447
|
+
init_probe();
|
|
448
|
+
init_log_utils();
|
|
449
|
+
init_log_utils();
|
|
450
|
+
originalConsole = {
|
|
451
|
+
debug: isBrowser() ? console.debug || console.log : console.log,
|
|
452
|
+
log: console.log,
|
|
453
|
+
info: console.info,
|
|
454
|
+
warn: console.warn,
|
|
455
|
+
error: console.error
|
|
456
|
+
};
|
|
457
|
+
DEFAULT_LOG_CONFIGURATION = {
|
|
458
|
+
enabled: true,
|
|
459
|
+
level: 0
|
|
460
|
+
};
|
|
461
|
+
ProbeLog = class extends BaseLog {
|
|
462
|
+
constructor({ id } = { id: "" }) {
|
|
463
|
+
super({ level: 0 });
|
|
464
|
+
this.VERSION = VERSION;
|
|
465
|
+
this._startTs = probe.getHighResolutionTimer();
|
|
466
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
467
|
+
this.userData = {};
|
|
468
|
+
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
469
|
+
this.id = id;
|
|
470
|
+
this.userData = {};
|
|
471
|
+
this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
|
|
472
|
+
this.timeStamp(`${this.id} started`);
|
|
473
|
+
autobind(this);
|
|
474
|
+
Object.seal(this);
|
|
475
|
+
}
|
|
476
|
+
isEnabled() {
|
|
477
|
+
return this._getConfiguration().enabled;
|
|
478
|
+
}
|
|
479
|
+
getLevel() {
|
|
480
|
+
return this._getConfiguration().level;
|
|
481
|
+
}
|
|
482
|
+
/** @return milliseconds, with fractions */
|
|
483
|
+
getTotal() {
|
|
484
|
+
return Number((probe.getHighResolutionTimer() - this._startTs).toPrecision(10));
|
|
485
|
+
}
|
|
486
|
+
/** @return milliseconds, with fractions */
|
|
487
|
+
getDelta() {
|
|
488
|
+
return Number((probe.getHighResolutionTimer() - this._deltaTs).toPrecision(10));
|
|
489
|
+
}
|
|
490
|
+
/** @deprecated use logLevel */
|
|
491
|
+
set priority(newPriority) {
|
|
492
|
+
this.level = newPriority;
|
|
493
|
+
}
|
|
494
|
+
/** @deprecated use logLevel */
|
|
495
|
+
get priority() {
|
|
496
|
+
return this.level;
|
|
497
|
+
}
|
|
498
|
+
/** @deprecated use logLevel */
|
|
499
|
+
getPriority() {
|
|
500
|
+
return this.level;
|
|
501
|
+
}
|
|
502
|
+
// Configure
|
|
503
|
+
enable(enabled = true) {
|
|
504
|
+
this._updateConfiguration({ enabled });
|
|
505
|
+
return this;
|
|
506
|
+
}
|
|
507
|
+
setLevel(level) {
|
|
508
|
+
this._updateConfiguration({ level });
|
|
509
|
+
return this;
|
|
510
|
+
}
|
|
511
|
+
/** return the current status of the setting */
|
|
512
|
+
get(setting) {
|
|
513
|
+
return this._getConfiguration()[setting];
|
|
514
|
+
}
|
|
515
|
+
// update the status of the setting
|
|
516
|
+
set(setting, value2) {
|
|
517
|
+
this._updateConfiguration({ [setting]: value2 });
|
|
518
|
+
}
|
|
519
|
+
/** Logs the current settings as a table */
|
|
520
|
+
settings() {
|
|
521
|
+
if (console.table) {
|
|
522
|
+
console.table(this._storage.config);
|
|
523
|
+
} else {
|
|
524
|
+
console.log(this._storage.config);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
// Unconditional logging
|
|
528
|
+
assert(condition, message) {
|
|
529
|
+
if (!condition) {
|
|
530
|
+
throw new Error(message || "Assertion failed");
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
warn(message, ...args) {
|
|
534
|
+
return this._log("warn", 0, message, args, {
|
|
535
|
+
method: originalConsole.warn,
|
|
536
|
+
once: true
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
error(message, ...args) {
|
|
540
|
+
return this._log("error", 0, message, args, {
|
|
541
|
+
method: originalConsole.error
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
/** Print a deprecation warning */
|
|
545
|
+
deprecated(oldUsage, newUsage) {
|
|
546
|
+
return this.warn(`\`${oldUsage}\` is deprecated and will be removed in a later version. Use \`${newUsage}\` instead`);
|
|
547
|
+
}
|
|
548
|
+
/** Print a removal warning */
|
|
549
|
+
removed(oldUsage, newUsage) {
|
|
550
|
+
return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
|
|
551
|
+
}
|
|
552
|
+
probe(logLevel, message, ...args) {
|
|
553
|
+
const memoryUsageMB = probe.getMemoryUsageMB();
|
|
554
|
+
if (memoryUsageMB !== null) {
|
|
555
|
+
const memoryUsagePrefix = `${memoryUsageMB}MB `;
|
|
556
|
+
if (typeof message === "function") {
|
|
557
|
+
message = () => `${memoryUsagePrefix}${message()}`;
|
|
558
|
+
} else if (typeof message === "string") {
|
|
559
|
+
message = `${memoryUsagePrefix}${message}`;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return this._log("log", logLevel, message, args, {
|
|
563
|
+
method: originalConsole.log,
|
|
564
|
+
time: true,
|
|
565
|
+
once: true
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
log(logLevel, message, ...args) {
|
|
569
|
+
return this._log("log", logLevel, message, args, {
|
|
570
|
+
method: originalConsole.debug
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
info(logLevel, message, ...args) {
|
|
574
|
+
return this._log("info", logLevel, message, args, { method: console.info });
|
|
575
|
+
}
|
|
576
|
+
once(logLevel, message, ...args) {
|
|
577
|
+
return this._log("once", logLevel, message, args, {
|
|
578
|
+
method: originalConsole.debug || originalConsole.info,
|
|
579
|
+
once: true
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
/** Logs an object as a table */
|
|
583
|
+
table(logLevel, table, columns) {
|
|
584
|
+
if (table) {
|
|
585
|
+
return this._log("table", logLevel, table, columns && [columns] || [], {
|
|
586
|
+
method: console.table || noop,
|
|
587
|
+
tag: getTableHeader(table)
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
return noop;
|
|
591
|
+
}
|
|
592
|
+
time(logLevel, message) {
|
|
593
|
+
return this._log("time", logLevel, message, [], {
|
|
594
|
+
method: console.time ? console.time : console.info
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
timeEnd(logLevel, message) {
|
|
598
|
+
return this._log("time", logLevel, message, [], {
|
|
599
|
+
method: console.timeEnd ? console.timeEnd : console.info
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
timeStamp(logLevel, message) {
|
|
603
|
+
return this._log("time", logLevel, message, [], {
|
|
604
|
+
method: console.timeStamp || noop
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
group(logLevel, message, opts = { collapsed: false }) {
|
|
608
|
+
const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
609
|
+
return this._log("group", logLevel, message, [], { method });
|
|
610
|
+
}
|
|
611
|
+
groupCollapsed(logLevel, message, opts = {}) {
|
|
612
|
+
return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
|
|
613
|
+
}
|
|
614
|
+
groupEnd(logLevel) {
|
|
615
|
+
return this._log("groupEnd", logLevel, "", [], {
|
|
616
|
+
method: console.groupEnd || noop
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
// EXPERIMENTAL
|
|
620
|
+
withGroup(logLevel, message, func) {
|
|
621
|
+
this.group(logLevel, message)();
|
|
622
|
+
try {
|
|
623
|
+
func();
|
|
624
|
+
} finally {
|
|
625
|
+
this.groupEnd(logLevel)();
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
trace() {
|
|
629
|
+
if (console.trace) {
|
|
630
|
+
console.trace();
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
_shouldLog(logLevel) {
|
|
634
|
+
return this.isEnabled() && super._shouldLog(logLevel);
|
|
635
|
+
}
|
|
636
|
+
_emit(_type, normalized) {
|
|
637
|
+
const method = normalized.method;
|
|
638
|
+
assert2(method);
|
|
639
|
+
normalized.total = this.getTotal();
|
|
640
|
+
normalized.delta = this.getDelta();
|
|
641
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
642
|
+
const message = decorateMessage(this.id, normalized.message, normalized);
|
|
643
|
+
return method.bind(console, message, ...normalized.args);
|
|
644
|
+
}
|
|
645
|
+
_getConfiguration() {
|
|
646
|
+
if (!this._storage.config[this.id]) {
|
|
647
|
+
this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
|
|
648
|
+
}
|
|
649
|
+
return this._storage.config[this.id];
|
|
650
|
+
}
|
|
651
|
+
_updateConfiguration(configuration) {
|
|
652
|
+
const currentConfiguration = this._storage.config[this.id] || {
|
|
653
|
+
...DEFAULT_LOG_CONFIGURATION
|
|
654
|
+
};
|
|
655
|
+
this._storage.setConfiguration({
|
|
656
|
+
[this.id]: { ...currentConfiguration, ...configuration }
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
ProbeLog.VERSION = VERSION;
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
// ../../node_modules/probe.gl/dist/log/loggers/console-log.js
|
|
665
|
+
var init_console_log = __esm({
|
|
666
|
+
"../../node_modules/probe.gl/dist/log/loggers/console-log.js"() {
|
|
667
|
+
init_base_log();
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
// ../../node_modules/probe.gl/dist/log/loggers/memory-log.js
|
|
672
|
+
var init_memory_log = __esm({
|
|
673
|
+
"../../node_modules/probe.gl/dist/log/loggers/memory-log.js"() {
|
|
674
|
+
init_base_log();
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
// ../../node_modules/probe.gl/dist/log/deprecated/hi-res-timestamp.js
|
|
679
|
+
var init_hi_res_timestamp = __esm({
|
|
680
|
+
"../../node_modules/probe.gl/dist/log/deprecated/hi-res-timestamp.js"() {
|
|
681
|
+
init_probe();
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
// ../../node_modules/probe.gl/dist/log/init.js
|
|
686
|
+
var init_init = __esm({
|
|
687
|
+
"../../node_modules/probe.gl/dist/log/init.js"() {
|
|
688
|
+
init_probe();
|
|
689
|
+
if (!globalThis.probe) {
|
|
690
|
+
globalThis.probe = probe;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
// ../../node_modules/probe.gl/dist/log/index.js
|
|
696
|
+
var log;
|
|
697
|
+
var init_log = __esm({
|
|
698
|
+
"../../node_modules/probe.gl/dist/log/index.js"() {
|
|
699
|
+
init_probe_log();
|
|
700
|
+
init_probe();
|
|
701
|
+
init_probe_log();
|
|
702
|
+
init_console_log();
|
|
703
|
+
init_base_log();
|
|
704
|
+
init_memory_log();
|
|
705
|
+
init_color();
|
|
706
|
+
init_color();
|
|
707
|
+
init_formatters();
|
|
708
|
+
init_autobind();
|
|
709
|
+
init_local_storage();
|
|
710
|
+
init_hi_res_timestamp();
|
|
711
|
+
init_init();
|
|
712
|
+
log = new ProbeLog({ id: "@probe.gl/log" });
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
// ../core/src/loader-utils/lib/log-utils/log.ts
|
|
717
|
+
function createLog() {
|
|
718
|
+
const log3 = new ProbeLog({ id: "loaders.gl" });
|
|
719
|
+
globalThis.loaders ||= {};
|
|
720
|
+
globalThis.loaders.log = log3;
|
|
721
|
+
globalThis.loaders.version = version;
|
|
722
|
+
globalThis.probe ||= {};
|
|
723
|
+
globalThis.probe.loaders = log3;
|
|
724
|
+
return log3;
|
|
725
|
+
}
|
|
726
|
+
function ignoreMessage() {
|
|
727
|
+
}
|
|
728
|
+
function getLoaderLog(options) {
|
|
729
|
+
const logger = options?.core?.log !== void 0 ? options.core.log : options?.log;
|
|
730
|
+
return logger === null ? nullLog : logger || log2;
|
|
731
|
+
}
|
|
732
|
+
var VERSION2, version, log2, NullLog, nullLog;
|
|
733
|
+
var init_log2 = __esm({
|
|
734
|
+
"../core/src/loader-utils/lib/log-utils/log.ts"() {
|
|
735
|
+
"use strict";
|
|
736
|
+
init_log();
|
|
737
|
+
VERSION2 = true ? "5.0.0-beta.8" : "latest";
|
|
738
|
+
version = VERSION2[0] >= "0" && VERSION2[0] <= "9" ? `v${VERSION2}` : "";
|
|
739
|
+
log2 = createLog();
|
|
740
|
+
NullLog = class {
|
|
741
|
+
/** Discards debug messages. */
|
|
742
|
+
log() {
|
|
743
|
+
return ignoreMessage;
|
|
744
|
+
}
|
|
745
|
+
/** Discards informational messages. */
|
|
746
|
+
info() {
|
|
747
|
+
return ignoreMessage;
|
|
748
|
+
}
|
|
749
|
+
/** Discards messages marked to be emitted once. */
|
|
750
|
+
once() {
|
|
751
|
+
return ignoreMessage;
|
|
752
|
+
}
|
|
753
|
+
/** Discards warnings. */
|
|
754
|
+
warn() {
|
|
755
|
+
return ignoreMessage;
|
|
756
|
+
}
|
|
757
|
+
/** Discards errors. */
|
|
758
|
+
error() {
|
|
759
|
+
return ignoreMessage;
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
nullLog = new NullLog();
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
|
|
34
766
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads-browser.js
|
|
35
767
|
var parentPort;
|
|
36
768
|
var init_worker_threads_browser = __esm({
|
|
@@ -5859,6 +6591,7 @@
|
|
|
5859
6591
|
"../core/src/loader-utils/index.ts"() {
|
|
5860
6592
|
"use strict";
|
|
5861
6593
|
init_loader_types();
|
|
6594
|
+
init_log2();
|
|
5862
6595
|
init_create_loader_worker();
|
|
5863
6596
|
init_binary_chunk_reader();
|
|
5864
6597
|
init_async_iteration();
|
|
@@ -6616,6 +7349,7 @@
|
|
|
6616
7349
|
// ../../node_modules/@math.gl/arrow/dist/wkb/index.js
|
|
6617
7350
|
var init_wkb2 = __esm({
|
|
6618
7351
|
"../../node_modules/@math.gl/arrow/dist/wkb/index.js"() {
|
|
7352
|
+
init_types();
|
|
6619
7353
|
init_wkb();
|
|
6620
7354
|
init_wkb_reader();
|
|
6621
7355
|
init_wkb_builder();
|
|
@@ -15881,7 +16615,7 @@
|
|
|
15881
16615
|
});
|
|
15882
16616
|
|
|
15883
16617
|
// src/shapefile/lib/parsers/parse-shp-header.ts
|
|
15884
|
-
function parseSHPHeader(headerView) {
|
|
16618
|
+
function parseSHPHeader(headerView, options) {
|
|
15885
16619
|
const header = {
|
|
15886
16620
|
magic: headerView.getInt32(0, BIG_ENDIAN),
|
|
15887
16621
|
// Length is stored as # of 2-byte words; multiply by 2 to get # of bytes
|
|
@@ -15900,10 +16634,10 @@
|
|
|
15900
16634
|
}
|
|
15901
16635
|
};
|
|
15902
16636
|
if (header.magic !== SHP_MAGIC_NUMBER) {
|
|
15903
|
-
|
|
16637
|
+
getLoaderLog(options).error(`SHP file: bad magic number ${header.magic}`)();
|
|
15904
16638
|
}
|
|
15905
16639
|
if (header.version !== 1e3) {
|
|
15906
|
-
|
|
16640
|
+
getLoaderLog(options).error(`SHP file: bad version ${header.version}`)();
|
|
15907
16641
|
}
|
|
15908
16642
|
return header;
|
|
15909
16643
|
}
|
|
@@ -15911,6 +16645,7 @@
|
|
|
15911
16645
|
var init_parse_shp_header = __esm({
|
|
15912
16646
|
"src/shapefile/lib/parsers/parse-shp-header.ts"() {
|
|
15913
16647
|
"use strict";
|
|
16648
|
+
init_loader_utils();
|
|
15914
16649
|
LITTLE_ENDIAN = true;
|
|
15915
16650
|
BIG_ENDIAN = false;
|
|
15916
16651
|
SHP_MAGIC_NUMBER = 9994;
|
|
@@ -23804,8 +24539,8 @@ return true;`);
|
|
|
23804
24539
|
static startFooter(builder) {
|
|
23805
24540
|
builder.startObject(5);
|
|
23806
24541
|
}
|
|
23807
|
-
static addVersion(builder,
|
|
23808
|
-
builder.addFieldInt16(0,
|
|
24542
|
+
static addVersion(builder, version2) {
|
|
24543
|
+
builder.addFieldInt16(0, version2, MetadataVersion.V1);
|
|
23809
24544
|
}
|
|
23810
24545
|
static addSchema(builder, schemaOffset) {
|
|
23811
24546
|
builder.addFieldOffset(1, schemaOffset, 0);
|
|
@@ -24051,9 +24786,9 @@ return true;`);
|
|
|
24051
24786
|
get numDictionaries() {
|
|
24052
24787
|
return this._dictionaryBatches.length;
|
|
24053
24788
|
}
|
|
24054
|
-
constructor(schema,
|
|
24789
|
+
constructor(schema, version2 = MetadataVersion.V5, recordBatches, dictionaryBatches) {
|
|
24055
24790
|
this.schema = schema;
|
|
24056
|
-
this.version =
|
|
24791
|
+
this.version = version2;
|
|
24057
24792
|
recordBatches && (this._recordBatches = recordBatches);
|
|
24058
24793
|
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
24059
24794
|
}
|
|
@@ -24181,8 +24916,8 @@ return true;`);
|
|
|
24181
24916
|
static startMessage(builder) {
|
|
24182
24917
|
builder.startObject(5);
|
|
24183
24918
|
}
|
|
24184
|
-
static addVersion(builder,
|
|
24185
|
-
builder.addFieldInt16(0,
|
|
24919
|
+
static addVersion(builder, version2) {
|
|
24920
|
+
builder.addFieldInt16(0, version2, MetadataVersion.V1);
|
|
24186
24921
|
}
|
|
24187
24922
|
static addHeaderType(builder, headerType) {
|
|
24188
24923
|
builder.addFieldInt8(1, headerType, MessageHeader.NONE);
|
|
@@ -24216,9 +24951,9 @@ return true;`);
|
|
|
24216
24951
|
static finishSizePrefixedMessageBuffer(builder, offset) {
|
|
24217
24952
|
builder.finish(offset, void 0, true);
|
|
24218
24953
|
}
|
|
24219
|
-
static createMessage(builder,
|
|
24954
|
+
static createMessage(builder, version2, headerType, headerOffset, bodyLength, customMetadataOffset) {
|
|
24220
24955
|
_Message.startMessage(builder);
|
|
24221
|
-
_Message.addVersion(builder,
|
|
24956
|
+
_Message.addVersion(builder, version2);
|
|
24222
24957
|
_Message.addHeaderType(builder, headerType);
|
|
24223
24958
|
_Message.addHeader(builder, headerOffset);
|
|
24224
24959
|
_Message.addBodyLength(builder, bodyLength);
|
|
@@ -24590,16 +25325,16 @@ return true;`);
|
|
|
24590
25325
|
throw new Error(`Unrecognized Message type: { name: ${MessageHeader[type]}, type: ${type} }`);
|
|
24591
25326
|
});
|
|
24592
25327
|
}
|
|
24593
|
-
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(),
|
|
25328
|
+
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(), version2 = MetadataVersion.V5) {
|
|
24594
25329
|
const fields = decodeSchemaFields(_schema, dictionaries);
|
|
24595
|
-
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries,
|
|
25330
|
+
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries, version2);
|
|
24596
25331
|
}
|
|
24597
|
-
function decodeRecordBatch(batch,
|
|
24598
|
-
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch,
|
|
25332
|
+
function decodeRecordBatch(batch, version2 = MetadataVersion.V5) {
|
|
25333
|
+
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version2), decodeBodyCompression(batch.compression()), decodeVariadicBufferCounts(batch));
|
|
24599
25334
|
return recordBatch;
|
|
24600
25335
|
}
|
|
24601
|
-
function decodeDictionaryBatch(batch,
|
|
24602
|
-
return new DictionaryBatch2(RecordBatch2.decode(batch.data(),
|
|
25336
|
+
function decodeDictionaryBatch(batch, version2 = MetadataVersion.V5) {
|
|
25337
|
+
return new DictionaryBatch2(RecordBatch2.decode(batch.data(), version2), batch.id(), batch.isDelta());
|
|
24603
25338
|
}
|
|
24604
25339
|
function decodeBufferRegion(b) {
|
|
24605
25340
|
return new BufferRegion(b.offset(), b.length());
|
|
@@ -24616,11 +25351,11 @@ return true;`);
|
|
|
24616
25351
|
}
|
|
24617
25352
|
return nodes;
|
|
24618
25353
|
}
|
|
24619
|
-
function decodeBuffers(batch,
|
|
25354
|
+
function decodeBuffers(batch, version2) {
|
|
24620
25355
|
const bufferRegions = [];
|
|
24621
25356
|
for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n; ) {
|
|
24622
25357
|
if (b = batch.buffers(i)) {
|
|
24623
|
-
if (
|
|
25358
|
+
if (version2 < MetadataVersion.V4) {
|
|
24624
25359
|
b.bb_pos += 8 * (i + 1);
|
|
24625
25360
|
}
|
|
24626
25361
|
bufferRegions[++j] = BufferRegion.decode(b);
|
|
@@ -24945,10 +25680,10 @@ return true;`);
|
|
|
24945
25680
|
buf = new ByteBuffer3(toUint8Array(buf));
|
|
24946
25681
|
const _message = Message.getRootAsMessage(buf);
|
|
24947
25682
|
const bodyLength = _message.bodyLength();
|
|
24948
|
-
const
|
|
25683
|
+
const version2 = _message.version();
|
|
24949
25684
|
const headerType = _message.headerType();
|
|
24950
25685
|
const metadata = decodeMessageCustomMetadata(_message);
|
|
24951
|
-
const message = new _Message(bodyLength,
|
|
25686
|
+
const message = new _Message(bodyLength, version2, headerType, void 0, metadata);
|
|
24952
25687
|
message._createHeader = decodeMessageHeader(_message, headerType);
|
|
24953
25688
|
return message;
|
|
24954
25689
|
}
|
|
@@ -25025,8 +25760,8 @@ return true;`);
|
|
|
25025
25760
|
isDictionaryBatch() {
|
|
25026
25761
|
return this.headerType === MessageHeader.DictionaryBatch;
|
|
25027
25762
|
}
|
|
25028
|
-
constructor(bodyLength,
|
|
25029
|
-
this._version =
|
|
25763
|
+
constructor(bodyLength, version2, headerType, header, metadata) {
|
|
25764
|
+
this._version = version2;
|
|
25030
25765
|
this._headerType = headerType;
|
|
25031
25766
|
this.body = new Uint8Array(0);
|
|
25032
25767
|
this._compression = header === null || header === void 0 ? void 0 : header.compression;
|
|
@@ -31997,7 +32732,7 @@ return true;`);
|
|
|
31997
32732
|
if (!dataView) {
|
|
31998
32733
|
return state;
|
|
31999
32734
|
}
|
|
32000
|
-
result.header = parseSHPHeader(dataView);
|
|
32735
|
+
result.header = parseSHPHeader(dataView, options);
|
|
32001
32736
|
result.progress = {
|
|
32002
32737
|
bytesUsed: 0,
|
|
32003
32738
|
bytesTotal: result.header.length,
|
|
@@ -33885,7 +34620,7 @@ return true;`);
|
|
|
33885
34620
|
|
|
33886
34621
|
// src/shapefile/lib/parsers/build-geoarrow-geometry-arrow.ts
|
|
33887
34622
|
function makeSHPGeoArrowGeometryTable(arrayBuffer, options, geoArrowOptions) {
|
|
33888
|
-
const header = parseSHPHeader(new DataView(arrayBuffer, 0, SHP_HEADER_SIZE3));
|
|
34623
|
+
const header = parseSHPHeader(new DataView(arrayBuffer, 0, SHP_HEADER_SIZE3), options);
|
|
33889
34624
|
const encoding = getDefaultGeoArrowEncoding(header);
|
|
33890
34625
|
const builderOptions = {
|
|
33891
34626
|
encoding,
|
|
@@ -34030,7 +34765,7 @@ return true;`);
|
|
|
34030
34765
|
)) {
|
|
34031
34766
|
return makeSHPGeoArrowGeometryTable(arrayBuffer, options);
|
|
34032
34767
|
}
|
|
34033
|
-
const header = parseSHPHeader(new DataView(arrayBuffer, 0, SHP_HEADER_SIZE4));
|
|
34768
|
+
const header = parseSHPHeader(new DataView(arrayBuffer, 0, SHP_HEADER_SIZE4), options);
|
|
34034
34769
|
const schema = buildOutputSchema(header);
|
|
34035
34770
|
return makeSHPWKBGeometryArrowTable(arrayBuffer, schema, options);
|
|
34036
34771
|
}
|
|
@@ -34202,17 +34937,17 @@ return true;`);
|
|
|
34202
34937
|
const { SHPLoaderWithParser: SHPLoaderWithParser2 } = await Promise.resolve().then(() => (init_shp(), shp_exports));
|
|
34203
34938
|
return SHPLoaderWithParser2;
|
|
34204
34939
|
}
|
|
34205
|
-
var
|
|
34940
|
+
var VERSION3, SHPLoader;
|
|
34206
34941
|
var init_shp_loader_types = __esm({
|
|
34207
34942
|
"src/shapefile/shp-loader-types.ts"() {
|
|
34208
34943
|
"use strict";
|
|
34209
34944
|
init_shp_format();
|
|
34210
|
-
|
|
34945
|
+
VERSION3 = true ? "5.0.0-beta.8" : "latest";
|
|
34211
34946
|
SHPLoader = {
|
|
34212
34947
|
dataType: null,
|
|
34213
34948
|
batchType: null,
|
|
34214
34949
|
...SHPFormat,
|
|
34215
|
-
version:
|
|
34950
|
+
version: VERSION3,
|
|
34216
34951
|
worker: true,
|
|
34217
34952
|
workerInBatches: true,
|
|
34218
34953
|
options: {
|
|
@@ -34226,6 +34961,18 @@ return true;`);
|
|
|
34226
34961
|
}
|
|
34227
34962
|
});
|
|
34228
34963
|
|
|
34964
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-helpers.js
|
|
34965
|
+
var init_indexed_arrow_helpers = __esm({
|
|
34966
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-helpers.js"() {
|
|
34967
|
+
}
|
|
34968
|
+
});
|
|
34969
|
+
|
|
34970
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-schema-utils.js
|
|
34971
|
+
var init_arrow_schema_utils = __esm({
|
|
34972
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-schema-utils.js"() {
|
|
34973
|
+
}
|
|
34974
|
+
});
|
|
34975
|
+
|
|
34229
34976
|
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js
|
|
34230
34977
|
function getArrowVariadicBuffers(data) {
|
|
34231
34978
|
return data.variadicBuffers ?? [];
|
|
@@ -34329,27 +35076,43 @@ return true;`);
|
|
|
34329
35076
|
}
|
|
34330
35077
|
});
|
|
34331
35078
|
|
|
35079
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/take-arrow-rows.js
|
|
35080
|
+
var init_take_arrow_rows = __esm({
|
|
35081
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/take-arrow-rows.js"() {
|
|
35082
|
+
init_arrow_data();
|
|
35083
|
+
init_split_arrow_buffers();
|
|
35084
|
+
}
|
|
35085
|
+
});
|
|
35086
|
+
|
|
34332
35087
|
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js
|
|
34333
35088
|
var init_indexed_arrow_vector = __esm({
|
|
34334
35089
|
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js"() {
|
|
35090
|
+
init_indexed_arrow_helpers();
|
|
34335
35091
|
}
|
|
34336
35092
|
});
|
|
34337
35093
|
|
|
34338
35094
|
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js
|
|
34339
35095
|
var init_indexed_arrow_table = __esm({
|
|
34340
35096
|
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js"() {
|
|
35097
|
+
init_indexed_arrow_helpers();
|
|
35098
|
+
init_arrow_schema_utils();
|
|
35099
|
+
init_take_arrow_rows();
|
|
35100
|
+
init_indexed_arrow_vector();
|
|
34341
35101
|
}
|
|
34342
35102
|
});
|
|
34343
35103
|
|
|
34344
35104
|
// ../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js
|
|
34345
35105
|
var init_mapped_arrow_table = __esm({
|
|
34346
35106
|
"../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js"() {
|
|
35107
|
+
init_indexed_arrow_helpers();
|
|
35108
|
+
init_indexed_arrow_table();
|
|
34347
35109
|
}
|
|
34348
35110
|
});
|
|
34349
35111
|
|
|
34350
35112
|
// ../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js
|
|
34351
35113
|
var init_rename_arrow_columns = __esm({
|
|
34352
35114
|
"../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js"() {
|
|
35115
|
+
init_arrow_schema_utils();
|
|
34353
35116
|
}
|
|
34354
35117
|
});
|
|
34355
35118
|
|
|
@@ -34403,15 +35166,23 @@ return true;`);
|
|
|
34403
35166
|
}
|
|
34404
35167
|
});
|
|
34405
35168
|
|
|
35169
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-column-utils.js
|
|
35170
|
+
var init_arrow_column_utils = __esm({
|
|
35171
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-column-utils.js"() {
|
|
35172
|
+
}
|
|
35173
|
+
});
|
|
35174
|
+
|
|
34406
35175
|
// ../../node_modules/@math.gl/arrow/dist/arrow/index.js
|
|
34407
35176
|
var init_arrow = __esm({
|
|
34408
35177
|
"../../node_modules/@math.gl/arrow/dist/arrow/index.js"() {
|
|
34409
35178
|
init_indexed_arrow_table();
|
|
34410
35179
|
init_indexed_arrow_vector();
|
|
34411
35180
|
init_mapped_arrow_table();
|
|
35181
|
+
init_arrow_schema_utils();
|
|
34412
35182
|
init_rename_arrow_columns();
|
|
34413
35183
|
init_split_arrow_buffers();
|
|
34414
35184
|
init_arrow_table_transport();
|
|
35185
|
+
init_arrow_column_utils();
|
|
34415
35186
|
}
|
|
34416
35187
|
});
|
|
34417
35188
|
|
|
@@ -35092,18 +35863,18 @@ return true;`);
|
|
|
35092
35863
|
const { DBFLoaderWithParser: DBFLoaderWithParser2 } = await Promise.resolve().then(() => (init_dbf(), dbf_exports));
|
|
35093
35864
|
return DBFLoaderWithParser2;
|
|
35094
35865
|
}
|
|
35095
|
-
var
|
|
35866
|
+
var VERSION4, DBFLoader;
|
|
35096
35867
|
var init_dbf_loader_types = __esm({
|
|
35097
35868
|
"src/shapefile/dbf-loader-types.ts"() {
|
|
35098
35869
|
"use strict";
|
|
35099
|
-
|
|
35870
|
+
VERSION4 = true ? "5.0.0-beta.8" : "latest";
|
|
35100
35871
|
DBFLoader = {
|
|
35101
35872
|
name: "DBF",
|
|
35102
35873
|
dataType: null,
|
|
35103
35874
|
batchType: null,
|
|
35104
35875
|
id: "dbf",
|
|
35105
35876
|
module: "geospatial",
|
|
35106
|
-
version:
|
|
35877
|
+
version: VERSION4,
|
|
35107
35878
|
worker: true,
|
|
35108
35879
|
workerInBatches: true,
|
|
35109
35880
|
category: "table",
|
|
@@ -35772,17 +36543,17 @@ return true;`);
|
|
|
35772
36543
|
const { ShapefileLoaderWithParser: ShapefileLoaderWithParser2 } = await Promise.resolve().then(() => (init_shapefile_loader(), shapefile_loader_exports));
|
|
35773
36544
|
return ShapefileLoaderWithParser2;
|
|
35774
36545
|
}
|
|
35775
|
-
var
|
|
36546
|
+
var VERSION5, ShapefileLoader;
|
|
35776
36547
|
var init_shapefile_loader_types = __esm({
|
|
35777
36548
|
"src/shapefile/shapefile-loader-types.ts"() {
|
|
35778
36549
|
"use strict";
|
|
35779
36550
|
init_shp_format();
|
|
35780
|
-
|
|
36551
|
+
VERSION5 = true ? "5.0.0-beta.8" : "latest";
|
|
35781
36552
|
ShapefileLoader = {
|
|
35782
36553
|
dataType: null,
|
|
35783
36554
|
batchType: null,
|
|
35784
36555
|
...ShapefileFormat,
|
|
35785
|
-
version:
|
|
36556
|
+
version: VERSION5,
|
|
35786
36557
|
worker: true,
|
|
35787
36558
|
workerInBatches: true,
|
|
35788
36559
|
options: {
|