@loaders.gl/tiles-3d 5.0.0-beta.4 → 5.0.0-beta.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/README.md +1 -1
- package/dist/3d-tiles/3d-tiles-archive-loader.js +1 -1
- package/dist/3d-tiles/dist.dev.js +941 -621
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +876 -947
- package/dist/3d-tiles/index.cjs.map +3 -3
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js +5 -1
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/3d-tiles/lib/utils/version.js +1 -1
- package/dist/3d-tiles-archive-writer.cjs +1 -1
- package/dist/cesium-ion-loader-with-parser.cjs +821 -942
- package/dist/cesium-ion-loader-with-parser.cjs.map +3 -3
- package/dist/copc/copc-source-loader.js +2 -2
- package/dist/copc/copc-source-loader.js.map +1 -1
- package/dist/copc/copc-writer.js +1 -1
- package/dist/copc/index.cjs +121 -181
- package/dist/copc/index.cjs.map +3 -3
- package/dist/dist.dev.js +323 -40
- package/dist/dist.min.js +10 -10
- package/dist/i3s/arcgis-webscene-loader.js +1 -1
- package/dist/i3s/dist.dev.js +3173 -712
- package/dist/i3s/dist.min.js +47 -47
- package/dist/i3s/i3s-attribute-loader.js +1 -1
- package/dist/i3s/i3s-building-scene-layer-loader.js +1 -1
- package/dist/i3s/i3s-content-loader.js +1 -1
- package/dist/i3s/i3s-lepcc-loader-types.js +1 -1
- package/dist/i3s/i3s-loader.js +1 -1
- package/dist/i3s/i3s-node-page-loader.js +1 -1
- package/dist/i3s/i3s-slpk-loader.js +1 -1
- package/dist/i3s/i3s-slpk-writer.js +1 -1
- package/dist/i3s/index.cjs +2097 -544
- package/dist/i3s/index.cjs.map +3 -3
- package/dist/i3s-content-worker-node.js +11 -11
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +768 -346
- package/dist/i3s-lepcc-worker-node.js +245 -12
- package/dist/i3s-lepcc-worker-node.js.map +4 -4
- package/dist/i3s-lepcc-worker.js +240 -12
- package/dist/i3s-mesh-writer.cjs +1749 -290
- package/dist/i3s-mesh-writer.cjs.map +3 -3
- package/dist/i3s-slpk-writer.cjs +1 -1
- package/dist/index.cjs +98 -4
- package/dist/index.cjs.map +2 -2
- package/dist/point-cloud-tile-source-loader-types.js +1 -1
- package/dist/point-cloud-tile-source-loader.cjs +46 -2
- package/dist/point-cloud-tile-source-loader.cjs.map +2 -2
- package/dist/point-cloud-tile-source.cjs +45 -1
- package/dist/point-cloud-tile-source.cjs.map +1 -1
- package/dist/potree/dist.dev.js +325 -91
- package/dist/potree/dist.min.js +30 -30
- package/dist/potree/index.cjs +115 -176
- package/dist/potree/index.cjs.map +3 -3
- package/dist/potree/potree-bin-loader.js +1 -1
- package/dist/potree/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/potree/potree-loader-types.js +1 -1
- package/dist/potree/potree-source-loader.js +1 -1
- package/dist/potree/potree-writer.js +1 -1
- package/dist/potree/potree2-source.d.ts.map +1 -1
- package/dist/potree/potree2-source.js +3 -13
- package/dist/potree/potree2-source.js.map +1 -1
- package/dist/potree-loader.cjs +1 -1
- package/package.json +13 -13
- package/src/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
- package/src/potree/potree2-source.ts +3 -14
package/dist/potree/dist.dev.js
CHANGED
|
@@ -26182,7 +26182,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26182
26182
|
if (options?.core) {
|
|
26183
26183
|
loadOptions.core = { ...options.core };
|
|
26184
26184
|
const parserCore = loadOptions.core;
|
|
26185
|
-
for (const key2 of ["type", "attributions", "loaders", "onError", "loadOptions"]) {
|
|
26185
|
+
for (const key2 of ["type", "name", "attributions", "loaders", "onError", "loadOptions"]) {
|
|
26186
26186
|
delete parserCore[key2];
|
|
26187
26187
|
}
|
|
26188
26188
|
if (Object.keys(parserCore).length === 0) {
|
|
@@ -26217,6 +26217,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26217
26217
|
);
|
|
26218
26218
|
};
|
|
26219
26219
|
}
|
|
26220
|
+
function getDataSourceName(data, options) {
|
|
26221
|
+
const explicitName = options.core?.name;
|
|
26222
|
+
if (explicitName !== void 0) {
|
|
26223
|
+
if (typeof explicitName !== "string" || !explicitName.trim())
|
|
26224
|
+
throw new Error("Data source name must be a non-empty string.");
|
|
26225
|
+
return explicitName;
|
|
26226
|
+
}
|
|
26227
|
+
if (data && typeof data === "object") {
|
|
26228
|
+
const named = data;
|
|
26229
|
+
if (typeof named.name === "string" && named.name.trim())
|
|
26230
|
+
return data instanceof Blob ? removeFileExtension(named.name) : named.name;
|
|
26231
|
+
const metadata = named.schema?.metadata;
|
|
26232
|
+
const embeddedName = metadata instanceof Map ? metadata.get("name") : metadata?.name;
|
|
26233
|
+
if (typeof embeddedName === "string" && embeddedName.trim()) return embeddedName;
|
|
26234
|
+
}
|
|
26235
|
+
if (typeof data === "string") {
|
|
26236
|
+
try {
|
|
26237
|
+
const url2 = new URL(data.replace(/\\/g, "/"), "https://source.invalid/");
|
|
26238
|
+
if (!["data:", "blob:"].includes(url2.protocol)) {
|
|
26239
|
+
let basename = url2.pathname.split("/").filter(Boolean).pop();
|
|
26240
|
+
if (basename) {
|
|
26241
|
+
try {
|
|
26242
|
+
basename = decodeURIComponent(basename);
|
|
26243
|
+
} catch {
|
|
26244
|
+
}
|
|
26245
|
+
return removeFileExtension(basename);
|
|
26246
|
+
}
|
|
26247
|
+
}
|
|
26248
|
+
} catch {
|
|
26249
|
+
}
|
|
26250
|
+
}
|
|
26251
|
+
return options.core?.type && options.core.type !== "auto" ? options.core.type : "source";
|
|
26252
|
+
}
|
|
26253
|
+
function removeFileExtension(name) {
|
|
26254
|
+
const extension = name.lastIndexOf(".");
|
|
26255
|
+
return extension > 0 ? name.slice(0, extension) : name;
|
|
26256
|
+
}
|
|
26220
26257
|
var UNAVAILABLE_CORE_API, DataSource;
|
|
26221
26258
|
var init_data_source = __esm({
|
|
26222
26259
|
"../core/src/loader-utils/lib/sources/data-source.ts"() {
|
|
@@ -26248,6 +26285,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26248
26285
|
options;
|
|
26249
26286
|
data;
|
|
26250
26287
|
url;
|
|
26288
|
+
/** Stable query-visible name, resolved without fetching source data. */
|
|
26289
|
+
name;
|
|
26251
26290
|
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
26252
26291
|
loadOptions;
|
|
26253
26292
|
/** A resolved fetch function extracted from the shared core options. */
|
|
@@ -26264,6 +26303,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26264
26303
|
);
|
|
26265
26304
|
this.data = data;
|
|
26266
26305
|
this.url = typeof data === "string" ? resolvePath(data) : "";
|
|
26306
|
+
this.name = getDataSourceName(data, this.options);
|
|
26267
26307
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(this.options));
|
|
26268
26308
|
this.loadOptions = loadOptions;
|
|
26269
26309
|
const fetch2 = getFetchFunction(loadOptions);
|
|
@@ -26272,6 +26312,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26272
26312
|
this.fetch = fetch2;
|
|
26273
26313
|
}
|
|
26274
26314
|
setProps(options) {
|
|
26315
|
+
if (options.core?.name !== void 0 && options.core.name !== this.name)
|
|
26316
|
+
throw new Error("Data source names are fixed at creation.");
|
|
26275
26317
|
const mergedOptions = mergeOptions(this.options, options);
|
|
26276
26318
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(mergedOptions));
|
|
26277
26319
|
this.options = mergedOptions;
|
|
@@ -30711,6 +30753,59 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30711
30753
|
}
|
|
30712
30754
|
});
|
|
30713
30755
|
|
|
30756
|
+
// ../core/src/loader-utils/lib/files/read-range-response.ts
|
|
30757
|
+
async function readRangeResponse(response, offset, length, signal) {
|
|
30758
|
+
if (typeof offset === "number" && (!Number.isSafeInteger(offset) || offset < 0) || typeof offset === "bigint" && offset < 0n || !Number.isSafeInteger(length) || length <= 0) {
|
|
30759
|
+
await response.body?.cancel().catch(() => {
|
|
30760
|
+
});
|
|
30761
|
+
throw new RangeError("Invalid HTTP byte range");
|
|
30762
|
+
}
|
|
30763
|
+
const start = BigInt(offset);
|
|
30764
|
+
const end = start + BigInt(length) - 1n;
|
|
30765
|
+
const value2 = response.headers.get("Content-Range");
|
|
30766
|
+
const match = value2 === null ? null : /^bytes (\d+)-(\d+)\/(\d+|\*)$/.exec(value2);
|
|
30767
|
+
if (response.status !== 206 || value2 !== null && (!match || BigInt(match[1]) !== start || BigInt(match[2]) !== end || match[3] !== "*" && BigInt(match[3]) <= end)) {
|
|
30768
|
+
await response.body?.cancel().catch(() => {
|
|
30769
|
+
});
|
|
30770
|
+
throw new Error("HTTP range requires 206 and matching Content-Range when visible");
|
|
30771
|
+
}
|
|
30772
|
+
const reader = response.body?.getReader();
|
|
30773
|
+
if (!reader) throw new Error("HTTP range response has no body");
|
|
30774
|
+
let received = 0;
|
|
30775
|
+
const abort = () => {
|
|
30776
|
+
void reader.cancel(signal?.reason).catch(() => {
|
|
30777
|
+
});
|
|
30778
|
+
};
|
|
30779
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
30780
|
+
try {
|
|
30781
|
+
signal?.throwIfAborted();
|
|
30782
|
+
const bytes = new Uint8Array(length);
|
|
30783
|
+
for (; ; ) {
|
|
30784
|
+
const chunk = await reader.read();
|
|
30785
|
+
signal?.throwIfAborted();
|
|
30786
|
+
if (chunk.done) break;
|
|
30787
|
+
if (received + chunk.value.byteLength > length)
|
|
30788
|
+
throw new Error("HTTP range body exceeds requested length");
|
|
30789
|
+
bytes.set(chunk.value, received);
|
|
30790
|
+
received += chunk.value.byteLength;
|
|
30791
|
+
}
|
|
30792
|
+
if (received !== length) throw new Error("HTTP range body has truncated length");
|
|
30793
|
+
return bytes;
|
|
30794
|
+
} catch (error62) {
|
|
30795
|
+
await reader.cancel(error62).catch(() => {
|
|
30796
|
+
});
|
|
30797
|
+
throw error62;
|
|
30798
|
+
} finally {
|
|
30799
|
+
signal?.removeEventListener("abort", abort);
|
|
30800
|
+
reader.releaseLock();
|
|
30801
|
+
}
|
|
30802
|
+
}
|
|
30803
|
+
var init_read_range_response = __esm({
|
|
30804
|
+
"../core/src/loader-utils/lib/files/read-range-response.ts"() {
|
|
30805
|
+
"use strict";
|
|
30806
|
+
}
|
|
30807
|
+
});
|
|
30808
|
+
|
|
30714
30809
|
// ../core/src/loader-utils/index.ts
|
|
30715
30810
|
var init_loader_utils = __esm({
|
|
30716
30811
|
"../core/src/loader-utils/index.ts"() {
|
|
@@ -30724,6 +30819,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30724
30819
|
init_columnar_predicate();
|
|
30725
30820
|
init_scan_query_metadata();
|
|
30726
30821
|
init_point_cloud_query();
|
|
30822
|
+
init_read_range_response();
|
|
30727
30823
|
}
|
|
30728
30824
|
});
|
|
30729
30825
|
|
|
@@ -48969,7 +49065,29 @@ return true;`);
|
|
|
48969
49065
|
}
|
|
48970
49066
|
});
|
|
48971
49067
|
|
|
48972
|
-
//
|
|
49068
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js
|
|
49069
|
+
function getArrowVariadicBuffers(data) {
|
|
49070
|
+
return data.variadicBuffers ?? [];
|
|
49071
|
+
}
|
|
49072
|
+
function createArrowData(type, offset, length, nullCount, buffers, children2, dictionary, variadicBuffers) {
|
|
49073
|
+
return Reflect.construct(Data, [
|
|
49074
|
+
type,
|
|
49075
|
+
offset,
|
|
49076
|
+
length,
|
|
49077
|
+
nullCount,
|
|
49078
|
+
buffers,
|
|
49079
|
+
children2,
|
|
49080
|
+
dictionary,
|
|
49081
|
+
variadicBuffers
|
|
49082
|
+
]);
|
|
49083
|
+
}
|
|
49084
|
+
var init_arrow_data = __esm({
|
|
49085
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js"() {
|
|
49086
|
+
init_Arrow_dom();
|
|
49087
|
+
}
|
|
49088
|
+
});
|
|
49089
|
+
|
|
49090
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js
|
|
48973
49091
|
function splitArrowBuffers(input2, options = {}) {
|
|
48974
49092
|
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
48975
49093
|
if (isArrowTable2(input2)) {
|
|
@@ -48992,17 +49110,12 @@ return true;`);
|
|
|
48992
49110
|
function isArrowVector2(input2) {
|
|
48993
49111
|
return "data" in input2 && Array.isArray(input2.data);
|
|
48994
49112
|
}
|
|
48995
|
-
function splitArrowTableBuffersInternal(
|
|
48996
|
-
const recordBatches =
|
|
48997
|
-
|
|
48998
|
-
);
|
|
48999
|
-
return new Table(table.schema, recordBatches);
|
|
49113
|
+
function splitArrowTableBuffersInternal(arrowTable, options) {
|
|
49114
|
+
const recordBatches = arrowTable.batches.map((recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options));
|
|
49115
|
+
return new Table(arrowTable.schema, recordBatches);
|
|
49000
49116
|
}
|
|
49001
49117
|
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
49002
|
-
return new RecordBatch3(
|
|
49003
|
-
recordBatch.schema,
|
|
49004
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
49005
|
-
);
|
|
49118
|
+
return new RecordBatch3(recordBatch.schema, splitArrowDataBuffers(recordBatch.data, options));
|
|
49006
49119
|
}
|
|
49007
49120
|
function splitArrowDataBuffers(data, options) {
|
|
49008
49121
|
const children2 = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
@@ -49013,7 +49126,7 @@ return true;`);
|
|
|
49013
49126
|
[BufferType.VALIDITY]: splitArrowBuffer(data.buffers[BufferType.VALIDITY], options),
|
|
49014
49127
|
[BufferType.TYPE]: splitArrowBuffer(data.buffers[BufferType.TYPE], options)
|
|
49015
49128
|
};
|
|
49016
|
-
return
|
|
49129
|
+
return createArrowData(
|
|
49017
49130
|
data.type,
|
|
49018
49131
|
data.offset,
|
|
49019
49132
|
data.length,
|
|
@@ -49021,7 +49134,8 @@ return true;`);
|
|
|
49021
49134
|
data._nullCount,
|
|
49022
49135
|
buffers,
|
|
49023
49136
|
children2,
|
|
49024
|
-
dictionary
|
|
49137
|
+
dictionary,
|
|
49138
|
+
getArrowVariadicBuffers(data).map((buffer) => splitArrowBuffer(buffer, options))
|
|
49025
49139
|
);
|
|
49026
49140
|
}
|
|
49027
49141
|
function splitArrowVectorBuffers(vector, options) {
|
|
@@ -49039,7 +49153,7 @@ return true;`);
|
|
|
49039
49153
|
}
|
|
49040
49154
|
let copy = options.copies.get(array3);
|
|
49041
49155
|
if (!copy) {
|
|
49042
|
-
copy = array3.slice();
|
|
49156
|
+
copy = array3 instanceof Uint8Array ? new Uint8Array(array3) : array3.slice();
|
|
49043
49157
|
options.copies.set(array3, copy);
|
|
49044
49158
|
}
|
|
49045
49159
|
return copy;
|
|
@@ -49048,29 +49162,106 @@ return true;`);
|
|
|
49048
49162
|
return ArrayBuffer.isView(value2) && !(value2 instanceof DataView);
|
|
49049
49163
|
}
|
|
49050
49164
|
var init_split_arrow_buffers = __esm({
|
|
49051
|
-
"
|
|
49052
|
-
"use strict";
|
|
49165
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js"() {
|
|
49053
49166
|
init_Arrow_dom();
|
|
49167
|
+
init_arrow_data();
|
|
49054
49168
|
}
|
|
49055
49169
|
});
|
|
49056
49170
|
|
|
49057
|
-
//
|
|
49058
|
-
|
|
49059
|
-
|
|
49171
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js
|
|
49172
|
+
var init_indexed_arrow_vector = __esm({
|
|
49173
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js"() {
|
|
49174
|
+
}
|
|
49175
|
+
});
|
|
49176
|
+
|
|
49177
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js
|
|
49178
|
+
var init_indexed_arrow_table = __esm({
|
|
49179
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js"() {
|
|
49180
|
+
}
|
|
49181
|
+
});
|
|
49182
|
+
|
|
49183
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js
|
|
49184
|
+
var init_mapped_arrow_table = __esm({
|
|
49185
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js"() {
|
|
49186
|
+
}
|
|
49187
|
+
});
|
|
49188
|
+
|
|
49189
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js
|
|
49190
|
+
var init_rename_arrow_columns = __esm({
|
|
49191
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js"() {
|
|
49192
|
+
}
|
|
49193
|
+
});
|
|
49194
|
+
|
|
49195
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js
|
|
49196
|
+
function dehydrateArrowTable(arrowTable, options) {
|
|
49197
|
+
const splitTable = splitArrowBuffers(arrowTable, options);
|
|
49060
49198
|
return {
|
|
49061
|
-
shape: "arrow-table",
|
|
49062
49199
|
transport: "arrow-js",
|
|
49063
|
-
|
|
49064
|
-
|
|
49200
|
+
version: 1,
|
|
49201
|
+
schema: tableToIPC(new Table(splitTable.schema, [])),
|
|
49202
|
+
metadataVersion: splitTable.schema.metadataVersion,
|
|
49203
|
+
batches: splitTable.batches.map((batch) => dehydrateArrowData(batch.data))
|
|
49065
49204
|
};
|
|
49066
49205
|
}
|
|
49067
49206
|
function hydrateArrowTable(table) {
|
|
49068
|
-
|
|
49069
|
-
|
|
49070
|
-
|
|
49071
|
-
);
|
|
49072
|
-
|
|
49207
|
+
if (table.transport !== "arrow-js" || table.version !== 1) {
|
|
49208
|
+
throw new Error("Unsupported Arrow column-buffer transport protocol.");
|
|
49209
|
+
}
|
|
49210
|
+
const decodedSchema = tableFromIPC(table.schema).schema;
|
|
49211
|
+
const schema = new Schema2(decodedSchema.fields, decodedSchema.metadata, decodedSchema.dictionaries, table.metadataVersion);
|
|
49212
|
+
const type = new Struct(schema.fields);
|
|
49213
|
+
const batches = table.batches.map((data) => new RecordBatch3(schema, hydrateArrowData(data, type)));
|
|
49214
|
+
return new Table(schema, batches);
|
|
49073
49215
|
}
|
|
49216
|
+
function dehydrateArrowData(data) {
|
|
49217
|
+
return {
|
|
49218
|
+
offset: data.offset,
|
|
49219
|
+
length: data.length,
|
|
49220
|
+
nullCount: data.nullCount,
|
|
49221
|
+
buffers: {
|
|
49222
|
+
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
49223
|
+
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
49224
|
+
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
49225
|
+
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
49226
|
+
},
|
|
49227
|
+
children: data.children.map((child2) => dehydrateArrowData(child2)),
|
|
49228
|
+
variadicBuffers: getArrowVariadicBuffers(data),
|
|
49229
|
+
dictionary: data.dictionary?.data.map((chunk) => dehydrateArrowData(chunk))
|
|
49230
|
+
};
|
|
49231
|
+
}
|
|
49232
|
+
function hydrateArrowData(data, type) {
|
|
49233
|
+
const children2 = data.children.map((child2, index) => hydrateArrowData(child2, type.children[index].type));
|
|
49234
|
+
const dictionary = data.dictionary && DataType.isDictionary(type) ? new Vector(data.dictionary.map((chunk) => hydrateArrowData(chunk, type.dictionary))) : void 0;
|
|
49235
|
+
return createArrowData(type, data.offset, data.length, data.nullCount, data.buffers, children2, dictionary, data.variadicBuffers);
|
|
49236
|
+
}
|
|
49237
|
+
var init_arrow_table_transport = __esm({
|
|
49238
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js"() {
|
|
49239
|
+
init_Arrow_dom();
|
|
49240
|
+
init_arrow_data();
|
|
49241
|
+
init_split_arrow_buffers();
|
|
49242
|
+
}
|
|
49243
|
+
});
|
|
49244
|
+
|
|
49245
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/index.js
|
|
49246
|
+
var init_arrow = __esm({
|
|
49247
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/index.js"() {
|
|
49248
|
+
init_indexed_arrow_table();
|
|
49249
|
+
init_indexed_arrow_vector();
|
|
49250
|
+
init_mapped_arrow_table();
|
|
49251
|
+
init_rename_arrow_columns();
|
|
49252
|
+
init_split_arrow_buffers();
|
|
49253
|
+
init_arrow_table_transport();
|
|
49254
|
+
}
|
|
49255
|
+
});
|
|
49256
|
+
|
|
49257
|
+
// ../../node_modules/@math.gl/arrow/dist/index.js
|
|
49258
|
+
var init_dist2 = __esm({
|
|
49259
|
+
"../../node_modules/@math.gl/arrow/dist/index.js"() {
|
|
49260
|
+
init_arrow();
|
|
49261
|
+
}
|
|
49262
|
+
});
|
|
49263
|
+
|
|
49264
|
+
// ../core/src/arrow-worker-transport.ts
|
|
49074
49265
|
function serializeArrowWorkerTable(result) {
|
|
49075
49266
|
if (!isArrowTableWrapper(result)) {
|
|
49076
49267
|
throw new Error("Workers require Arrow table output");
|
|
@@ -49099,60 +49290,10 @@ return true;`);
|
|
|
49099
49290
|
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
49100
49291
|
);
|
|
49101
49292
|
}
|
|
49102
|
-
|
|
49103
|
-
|
|
49104
|
-
}
|
|
49105
|
-
function dehydrateArrowData(data) {
|
|
49106
|
-
return {
|
|
49107
|
-
type: serializeArrowType(data.type),
|
|
49108
|
-
offset: data.offset,
|
|
49109
|
-
length: data.length,
|
|
49110
|
-
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
49111
|
-
nullCount: data._nullCount,
|
|
49112
|
-
buffers: {
|
|
49113
|
-
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
49114
|
-
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
49115
|
-
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
49116
|
-
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
49117
|
-
},
|
|
49118
|
-
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
49119
|
-
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
49120
|
-
};
|
|
49121
|
-
}
|
|
49122
|
-
function dehydrateArrowVector(vector) {
|
|
49123
|
-
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
49124
|
-
}
|
|
49125
|
-
function hydrateArrowData(data) {
|
|
49126
|
-
const children2 = data.children.map((childData) => hydrateArrowData(childData));
|
|
49127
|
-
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
49128
|
-
return new Data(
|
|
49129
|
-
deserializeArrowType(data.type),
|
|
49130
|
-
data.offset,
|
|
49131
|
-
data.length,
|
|
49132
|
-
data.nullCount,
|
|
49133
|
-
data.buffers,
|
|
49134
|
-
children2,
|
|
49135
|
-
dictionary
|
|
49136
|
-
);
|
|
49137
|
-
}
|
|
49138
|
-
function hydrateArrowVector(vector) {
|
|
49139
|
-
return new Vector(vector.data.map((data) => hydrateArrowData(data)));
|
|
49140
|
-
}
|
|
49141
|
-
var init_arrow_table_transport = __esm({
|
|
49142
|
-
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
49293
|
+
var init_arrow_worker_transport = __esm({
|
|
49294
|
+
"../core/src/arrow-worker-transport.ts"() {
|
|
49143
49295
|
"use strict";
|
|
49144
|
-
|
|
49145
|
-
init_convert_arrow_schema();
|
|
49146
|
-
init_split_arrow_buffers();
|
|
49147
|
-
}
|
|
49148
|
-
});
|
|
49149
|
-
|
|
49150
|
-
// ../core/src/schema-utils/arrow-transport.ts
|
|
49151
|
-
var init_arrow_transport = __esm({
|
|
49152
|
-
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
49153
|
-
"use strict";
|
|
49154
|
-
init_arrow_table_transport();
|
|
49155
|
-
init_split_arrow_buffers();
|
|
49296
|
+
init_dist2();
|
|
49156
49297
|
}
|
|
49157
49298
|
});
|
|
49158
49299
|
|
|
@@ -51999,7 +52140,7 @@ return true;`);
|
|
|
51999
52140
|
"use strict";
|
|
52000
52141
|
init_schema_utils();
|
|
52001
52142
|
init_las_loader_shared();
|
|
52002
|
-
|
|
52143
|
+
init_arrow_worker_transport();
|
|
52003
52144
|
init_parse_las();
|
|
52004
52145
|
LASLoaderWithParser = {
|
|
52005
52146
|
...LAS_LOADER_METADATA,
|
|
@@ -52239,14 +52380,8 @@ return true;`);
|
|
|
52239
52380
|
headers: { Range: `bytes=${offset}-${end}` }
|
|
52240
52381
|
});
|
|
52241
52382
|
this.signal.throwIfAborted();
|
|
52242
|
-
const
|
|
52243
|
-
const
|
|
52244
|
-
if (response.status !== 206 || !contentRange || total !== "*" && (!total || !/^[0-9]+$/.test(total) || BigInt(total) <= end) || !new RegExp(`^bytes ${offset}-${end}/(?:[0-9]+|\\*)$`).test(contentRange)) {
|
|
52245
|
-
await response.body?.cancel();
|
|
52246
|
-
throw new Error("Potree server must honor the requested byte range");
|
|
52247
|
-
}
|
|
52248
|
-
const data = await this.readResponse(response, Number(size));
|
|
52249
|
-
if (data.byteLength !== Number(size)) throw new Error("Truncated Potree byte range");
|
|
52383
|
+
const bytes = await readRangeResponse(response, offset, Number(size), this.signal);
|
|
52384
|
+
const data = bytes.buffer;
|
|
52250
52385
|
return data;
|
|
52251
52386
|
}
|
|
52252
52387
|
/** Collects an incrementally bounded response and cancels on overflow or cancellation. */
|
|
@@ -53328,6 +53463,55 @@ return true;`);
|
|
|
53328
53463
|
};
|
|
53329
53464
|
}
|
|
53330
53465
|
|
|
53466
|
+
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/transform-description.js
|
|
53467
|
+
function describeCRS(crs) {
|
|
53468
|
+
const ellipsoid = Object.freeze({ ...crs.ellipsoid });
|
|
53469
|
+
return Object.freeze({
|
|
53470
|
+
kind: crs.kind,
|
|
53471
|
+
projection: crs.projection,
|
|
53472
|
+
parameters: Object.freeze(Object.fromEntries(Object.entries(crs.parameters).map(([name, value2]) => [name, value2 ?? null]))),
|
|
53473
|
+
ellipsoid,
|
|
53474
|
+
datum: Object.freeze({
|
|
53475
|
+
ellipsoid: Object.freeze({ ...crs.datum.ellipsoid }),
|
|
53476
|
+
towgs84: crs.datum.towgs84 && Object.freeze([...crs.datum.towgs84]),
|
|
53477
|
+
grids: crs.datum.grids && Object.freeze(crs.datum.grids.map((reference) => Object.freeze({
|
|
53478
|
+
name: reference.name,
|
|
53479
|
+
optional: reference.optional,
|
|
53480
|
+
loaded: Boolean(reference.grid)
|
|
53481
|
+
})))
|
|
53482
|
+
}),
|
|
53483
|
+
angularUnit: crs.angularUnit,
|
|
53484
|
+
toMeter: crs.toMeter,
|
|
53485
|
+
verticalUnit: crs.verticalUnit,
|
|
53486
|
+
primeMeridian: crs.primeMeridian,
|
|
53487
|
+
axis: crs.axis,
|
|
53488
|
+
storedAxis: crs.storedAxis,
|
|
53489
|
+
longitudeWrap: crs.longitudeWrap,
|
|
53490
|
+
areaOfUse: crs.areaOfUse && Object.freeze([...crs.areaOfUse]),
|
|
53491
|
+
lossy: crs.lossy,
|
|
53492
|
+
algorithm: crs.algorithm && Object.freeze({ ...crs.algorithm })
|
|
53493
|
+
});
|
|
53494
|
+
}
|
|
53495
|
+
function describeTransform(source, target, forward33, inverse33) {
|
|
53496
|
+
const opaqueReasons = [];
|
|
53497
|
+
if (!source.algorithm)
|
|
53498
|
+
opaqueReasons.push("source-algorithm");
|
|
53499
|
+
if (!target.algorithm)
|
|
53500
|
+
opaqueReasons.push("target-algorithm");
|
|
53501
|
+
if (source.datum.grids || target.datum.grids || source.parameters["geoidgrids"] || target.parameters["geoidgrids"])
|
|
53502
|
+
opaqueReasons.push("grid-resource");
|
|
53503
|
+
return Object.freeze({
|
|
53504
|
+
version: 1,
|
|
53505
|
+
source,
|
|
53506
|
+
target,
|
|
53507
|
+
forward: forward33,
|
|
53508
|
+
inverse: inverse33,
|
|
53509
|
+
lossy: source.lossy || target.lossy,
|
|
53510
|
+
complete: opaqueReasons.length === 0,
|
|
53511
|
+
opaqueReasons: Object.freeze(opaqueReasons)
|
|
53512
|
+
});
|
|
53513
|
+
}
|
|
53514
|
+
|
|
53331
53515
|
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/typescript-projection.js
|
|
53332
53516
|
var ProjectionTransform = class _ProjectionTransform {
|
|
53333
53517
|
/** Resolve required descriptors once, then return an ordinary synchronous instance. */
|
|
@@ -53342,6 +53526,10 @@ return true;`);
|
|
|
53342
53526
|
getTargetRenderingProfile(coverage) {
|
|
53343
53527
|
return this.targetRenderingProfile && resolveRenderingProfile(this.targetRenderingProfile, coverage);
|
|
53344
53528
|
}
|
|
53529
|
+
/** Deferred transforms expose metadata only once their implementations are prepared. */
|
|
53530
|
+
get description() {
|
|
53531
|
+
return this.deferred?.implementation?.description ?? this.resolvedDescription;
|
|
53532
|
+
}
|
|
53345
53533
|
constructor(options = {}) {
|
|
53346
53534
|
this.coordinateScratch = new ProjectionScratch();
|
|
53347
53535
|
this.targetLongitudeOrigin = 0;
|
|
@@ -53367,6 +53555,7 @@ return true;`);
|
|
|
53367
53555
|
unsupportedStage("Horizontal extraction cannot be combined with vertical grids");
|
|
53368
53556
|
this.forwardTransform = compileTransform(from, to, Boolean(options.enforceAxis));
|
|
53369
53557
|
this.inverseTransform = compileTransform(to, from, Boolean(options.enforceAxis));
|
|
53558
|
+
this.resolvedDescription = describeTransform(describeCRS(from), describeCRS(to), this.forwardTransform.description, this.inverseTransform.description);
|
|
53370
53559
|
}
|
|
53371
53560
|
this.project = this.project.bind(this);
|
|
53372
53561
|
this.unproject = this.unproject.bind(this);
|
|
@@ -53544,7 +53733,8 @@ return true;`);
|
|
|
53544
53733
|
const verticalGrid = compileVerticalGrid(crs.parameters["geoidgrids"], options.verticalGrids);
|
|
53545
53734
|
if (verticalGrid && (crs.kind === "geocentric" || crs.kind === "identity" || crs.lossy))
|
|
53546
53735
|
unsupportedStage("Vertical grids require a non-lossy geographic or projected CRS");
|
|
53547
|
-
|
|
53736
|
+
const algorithm = plugin ? plugin.semantics : { id: "@math.gl/geospatial/" + crs.kind, version: 1 };
|
|
53737
|
+
return { ...crs, datum, implementation, verticalGrid, algorithm };
|
|
53548
53738
|
}
|
|
53549
53739
|
function finite(point) {
|
|
53550
53740
|
return Number.isFinite(point.x) && Number.isFinite(point.y) && Number.isFinite(point.z);
|
|
@@ -53587,9 +53777,51 @@ return true;`);
|
|
|
53587
53777
|
if (from.kind === "projected" && to.kind === "geographic")
|
|
53588
53778
|
flat = from.implementation?.createInverseFlat?.(context);
|
|
53589
53779
|
}
|
|
53780
|
+
const requiresInputZ = Boolean(from.verticalGrid || to.verticalGrid) || from.kind === "geocentric" || /[ud]/.test(fromAxis.slice(0, 2)) || /[ud]/.test(toAxis.slice(0, 2));
|
|
53781
|
+
const stages = [];
|
|
53782
|
+
if (inputAxis)
|
|
53783
|
+
stages.push("input-axis");
|
|
53784
|
+
if (horizontalOnly)
|
|
53785
|
+
stages.push("discard-height");
|
|
53786
|
+
if (inputScale !== 1)
|
|
53787
|
+
stages.push("input-scale");
|
|
53788
|
+
if (source)
|
|
53789
|
+
stages.push("source-inverse");
|
|
53790
|
+
if (inputVerticalScale !== 1)
|
|
53791
|
+
stages.push("input-height-scale");
|
|
53792
|
+
stages.push("geographic-domain-check");
|
|
53793
|
+
if (fromPrime)
|
|
53794
|
+
stages.push("source-prime-meridian");
|
|
53795
|
+
if (from.verticalGrid)
|
|
53796
|
+
stages.push("source-vertical-grid");
|
|
53797
|
+
if (datum)
|
|
53798
|
+
stages.push("datum");
|
|
53799
|
+
if (to.verticalGrid)
|
|
53800
|
+
stages.push("target-vertical-grid");
|
|
53801
|
+
if (toPrime)
|
|
53802
|
+
stages.push("target-prime-meridian");
|
|
53803
|
+
if (longitudeWrap !== void 0)
|
|
53804
|
+
stages.push("longitude-wrap");
|
|
53805
|
+
if (target)
|
|
53806
|
+
stages.push("target-forward");
|
|
53807
|
+
if (outputScale !== 1)
|
|
53808
|
+
stages.push("output-scale");
|
|
53809
|
+
if (outputVerticalScale !== 1)
|
|
53810
|
+
stages.push("output-height-scale");
|
|
53811
|
+
if (horizontalOnly)
|
|
53812
|
+
stages.push("restore-height");
|
|
53813
|
+
if (outputAxis)
|
|
53814
|
+
stages.push("output-axis");
|
|
53590
53815
|
return {
|
|
53816
|
+
description: Object.freeze({
|
|
53817
|
+
inputAxis: fromAxis,
|
|
53818
|
+
outputAxis: toAxis,
|
|
53819
|
+
requiresInputZ,
|
|
53820
|
+
geocentricOutput: to.kind === "geocentric",
|
|
53821
|
+
stages: Object.freeze(stages)
|
|
53822
|
+
}),
|
|
53591
53823
|
flat,
|
|
53592
|
-
requiresInputZ
|
|
53824
|
+
requiresInputZ,
|
|
53593
53825
|
geocentricOutput: to.kind === "geocentric",
|
|
53594
53826
|
run(point) {
|
|
53595
53827
|
if (!finite(point))
|
|
@@ -54039,6 +54271,7 @@ return true;`);
|
|
|
54039
54271
|
init_rendering_bounds();
|
|
54040
54272
|
var mercator = {
|
|
54041
54273
|
name: "merc",
|
|
54274
|
+
semantics: { id: "@math.gl/geospatial/merc", version: 1 },
|
|
54042
54275
|
aliases: [
|
|
54043
54276
|
"Mercator",
|
|
54044
54277
|
"Popular Visualisation Pseudo Mercator",
|
|
@@ -54127,6 +54360,7 @@ return true;`);
|
|
|
54127
54360
|
init_rendering_bounds();
|
|
54128
54361
|
var equidistantCylindrical = {
|
|
54129
54362
|
name: "eqc",
|
|
54363
|
+
semantics: { id: "@math.gl/geospatial/eqc", version: 1 },
|
|
54130
54364
|
aliases: ["Equirectangular", "Equidistant_Cylindrical", "Equidistant_Cylindrical_Spherical"],
|
|
54131
54365
|
parameters: ["lon_0", "lat_0", "lat_ts", "x_0", "y_0"],
|
|
54132
54366
|
create({ semiMajorAxis: a, parameters, primeMeridian: primeMeridian2 = 0 }) {
|