@loaders.gl/geospatial 5.0.0-alpha.13 → 5.0.0-alpha.14
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/LICENSE +52 -0
- package/dist/dbf-worker.js +59 -15
- package/dist/flatgeobuf/flatgeobuf-loader-types.js +2 -2
- package/dist/flatgeobuf/flatgeobuf-loader-types.js.map +1 -1
- package/dist/flatgeobuf/flatgeobuf-source-loader.js +1 -1
- package/dist/flatgeobuf/index.cjs +16 -25
- package/dist/flatgeobuf/index.cjs.map +2 -2
- package/dist/flatgeobuf-worker.js +2032 -508
- package/dist/flatgeobuf.d.ts +1 -2
- package/dist/flatgeobuf.d.ts.map +1 -1
- package/dist/flatgeobuf.js +1 -1
- package/dist/flatgeobuf.js.map +1 -1
- package/dist/geopackage/geopackage-loader-types.d.ts.map +1 -1
- package/dist/geopackage/geopackage-loader-types.js +1 -1
- package/dist/geopackage/geopackage-loader-types.js.map +1 -1
- package/dist/geopackage/geopackage-source-loader.js +1 -1
- package/dist/geopackage/index.cjs +14 -24
- package/dist/geopackage/index.cjs.map +2 -2
- package/dist/geopackage.d.ts +1 -2
- package/dist/geopackage.d.ts.map +1 -1
- package/dist/geopackage.js +1 -1
- package/dist/geopackage.js.map +1 -1
- package/dist/index.cjs +66 -96
- package/dist/index.cjs.map +3 -3
- package/dist/kml/gpx-loader-types.js +1 -1
- package/dist/kml/index.cjs +53 -62
- package/dist/kml/index.cjs.map +3 -3
- package/dist/kml/kml-loader-types.d.ts +2 -2
- package/dist/kml/kml-loader-types.js +2 -2
- package/dist/kml/kml-loader-types.js.map +1 -1
- package/dist/kml/kml-writer.js +2 -2
- package/dist/kml/kml-writer.js.map +1 -1
- package/dist/kml/kmz-archive.js +1 -1
- package/dist/kml/kmz-archive.js.map +1 -1
- package/dist/kml/kmz-loader-types.js +1 -1
- package/dist/kml/kmz-source.js +1 -1
- package/dist/kml/tcx-loader-types.js +1 -1
- package/dist/kml.d.ts +1 -2
- package/dist/kml.d.ts.map +1 -1
- package/dist/kml.js +1 -1
- package/dist/kml.js.map +1 -1
- package/dist/shapefile/dbf-loader-types.js +1 -1
- package/dist/shapefile/dbf-loader.d.ts +1 -0
- package/dist/shapefile/dbf-loader.d.ts.map +1 -1
- package/dist/shapefile/index.cjs +9 -17
- package/dist/shapefile/index.cjs.map +2 -2
- package/dist/shapefile/shapefile-loader-types.d.ts +2 -2
- package/dist/shapefile/shapefile-loader-types.d.ts.map +1 -1
- package/dist/shapefile/shapefile-loader-types.js +2 -2
- package/dist/shapefile/shapefile-loader-types.js.map +1 -1
- package/dist/shapefile/shp-loader-types.js +1 -1
- package/dist/shapefile/shp-loader.d.ts +1 -0
- package/dist/shapefile/shp-loader.d.ts.map +1 -1
- package/dist/shapefile.d.ts +1 -2
- package/dist/shapefile.d.ts.map +1 -1
- package/dist/shapefile.js +1 -1
- package/dist/shapefile.js.map +1 -1
- package/dist/shp-worker.js +66 -17
- package/package.json +19 -14
- package/src/flatgeobuf/flatgeobuf-loader-types.ts +1 -1
- package/src/flatgeobuf.ts +1 -2
- package/src/geopackage/geopackage-loader-types.ts +3 -1
- package/src/geopackage.ts +1 -2
- package/src/kml/kml-loader-types.ts +1 -1
- package/src/kml/kml-writer.ts +1 -1
- package/src/kml/kmz-archive.ts +1 -1
- package/src/kml.ts +1 -2
- package/src/shapefile/shapefile-loader-types.ts +3 -1
- package/src/shapefile.ts +1 -2
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { ShapefileFormat } from "./shp-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-alpha.
|
|
7
|
+
const VERSION = typeof "5.0.0-alpha.14" !== 'undefined' ? "5.0.0-alpha.14" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing Shapefile loader implementation. */
|
|
9
9
|
async function preloadShapefileLoader() {
|
|
10
|
-
const { ShapefileLoaderWithParser } = await import('@loaders.gl/geospatial/shapefile');
|
|
10
|
+
const { ShapefileLoaderWithParser } = await import('@loaders.gl/geospatial/shapefile/shapefile-loader');
|
|
11
11
|
return ShapefileLoaderWithParser;
|
|
12
12
|
}
|
|
13
13
|
/** Metadata-only Shapefile loader. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapefile-loader-types.js","sourceRoot":"","sources":["../../src/shapefile/shapefile-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAkBpC,OAAO,EAAC,eAAe,EAAC,wBAAqB;AAE7C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,uBAAkB,KAAK,WAAW,CAAC,CAAC,kBAAa,CAAC,CAAC,QAAQ,CAAC;AAkB5E,mEAAmE;AACnE,KAAK,UAAU,sBAAsB;IACnC,MAAM,EAAC,yBAAyB,EAAC,GAAG,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"shapefile-loader-types.js","sourceRoot":"","sources":["../../src/shapefile/shapefile-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAkBpC,OAAO,EAAC,eAAe,EAAC,wBAAqB;AAE7C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,uBAAkB,KAAK,WAAW,CAAC,CAAC,kBAAa,CAAC,CAAC,QAAQ,CAAC;AAkB5E,mEAAmE;AACnE,KAAK,UAAU,sBAAsB;IACnC,MAAM,EAAC,yBAAyB,EAAC,GAAG,MAAM,MAAM,CAC9C,mDAAmD,CACpD,CAAC;IACF,OAAO,yBAAyB,CAAC;AACnC,CAAC;AAED,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,IAA8D;IACxE,SAAS,EAAE,IAA4D;IACvE,GAAG,eAAe;IAClB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE;QACP,SAAS,EAAE;YACT,KAAK,EAAE,aAAa;SACrB;QACD,GAAG,EAAE;YACH,cAAc,EAAE,CAAC;SAClB;KACF;IACD,OAAO,EAAE,sBAAsB;CAKhC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { SHPFormat } from "./shp-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-alpha.
|
|
7
|
+
const VERSION = typeof "5.0.0-alpha.14" !== 'undefined' ? "5.0.0-alpha.14" : 'latest';
|
|
8
8
|
export const SHP_MAGIC_NUMBER = [0x00, 0x00, 0x27, 0x0a];
|
|
9
9
|
/** Preloads the parser-bearing SHP loader implementation. */
|
|
10
10
|
async function preloadSHPLoader() {
|
|
@@ -37,6 +37,7 @@ export declare const SHPWorkerLoaderWithParser: {
|
|
|
37
37
|
readonly deprecatedOptions?: Record<string, string | Record<string, string>>;
|
|
38
38
|
readonly version: string;
|
|
39
39
|
readonly worker?: string | boolean;
|
|
40
|
+
readonly workerInBatches?: boolean;
|
|
40
41
|
readonly workerFile?: string;
|
|
41
42
|
readonly workerNode?: string;
|
|
42
43
|
readonly workerSourceNode?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shp-loader.d.ts","sourceRoot":"","sources":["../../src/shapefile/shp-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AACjG,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAC,SAAS,EAAC,mCAAgC;AAEvD,OAAO,KAAK,EAAC,SAAS,EAAC,0CAAuC;AAC9D,OAAO,KAAK,EAAC,mBAAmB,EAAC,+BAA4B;AAc7D,eAAO,MAAM,gBAAgB,UAA2B,CAAC;AAEzD,0BAA0B;AAC1B,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG;IACnD,GAAG,CAAC,EAAE;QACJ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC;QAC9B,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;QACvC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"shp-loader.d.ts","sourceRoot":"","sources":["../../src/shapefile/shp-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AACjG,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAC,SAAS,EAAC,mCAAgC;AAEvD,OAAO,KAAK,EAAC,SAAS,EAAC,0CAAuC;AAC9D,OAAO,KAAK,EAAC,mBAAmB,EAAC,+BAA4B;AAc7D,eAAO,MAAM,gBAAgB,UAA2B,CAAC;AAEzD,0BAA0B;AAC1B,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG;IACnD,GAAG,CAAC,EAAE;QACJ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC;QAC9B,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;QACvC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEiB,CAAC;AAExD,sBAAsB;AACtB,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAChD,SAAS,GAAG,UAAU,EACtB,SAAS,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,eAAe,EACnD,gBAAgB,CA0BjB,CAAC"}
|
package/dist/shapefile.d.ts
CHANGED
package/dist/shapefile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapefile.d.ts","sourceRoot":"","sources":["../src/shapefile.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"shapefile.d.ts","sourceRoot":"","sources":["../src/shapefile.ts"],"names":[],"mappings":"AAIA,qCAAkC"}
|
package/dist/shapefile.js
CHANGED
package/dist/shapefile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapefile.js","sourceRoot":"","sources":["../src/shapefile.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,
|
|
1
|
+
{"version":3,"file":"shapefile.js","sourceRoot":"","sources":["../src/shapefile.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,qCAAkC"}
|
package/dist/shp-worker.js
CHANGED
|
@@ -243,6 +243,8 @@
|
|
|
243
243
|
process: processOnMainThread
|
|
244
244
|
};
|
|
245
245
|
WorkerBody.onmessage = async (type, payload) => {
|
|
246
|
+
const reporter = type === "process" || type === "process-in-batches" ? createProgressReporter() : void 0;
|
|
247
|
+
const jobContext = { ...context, reportProgress: reporter?.report };
|
|
246
248
|
try {
|
|
247
249
|
switch (type) {
|
|
248
250
|
case "preload":
|
|
@@ -255,9 +257,10 @@
|
|
|
255
257
|
const result = await process(
|
|
256
258
|
payload.input,
|
|
257
259
|
payload.options || {},
|
|
258
|
-
|
|
260
|
+
jobContext,
|
|
259
261
|
payload.context || {}
|
|
260
262
|
);
|
|
263
|
+
reporter?.finish();
|
|
261
264
|
WorkerBody.postMessage("done", { result });
|
|
262
265
|
break;
|
|
263
266
|
case "process-in-batches":
|
|
@@ -272,13 +275,14 @@
|
|
|
272
275
|
const resultIterator = processInBatches(
|
|
273
276
|
createDemandDrivenIterator(inputBatches),
|
|
274
277
|
payload.options || {},
|
|
275
|
-
|
|
278
|
+
jobContext,
|
|
276
279
|
payload.context || {}
|
|
277
280
|
);
|
|
278
281
|
for await (const batch of resultIterator) {
|
|
279
282
|
await WorkerBody.postMessage("output-batch", { result: batch });
|
|
280
283
|
await outputAcknowledgements.next();
|
|
281
284
|
}
|
|
285
|
+
reporter?.finish();
|
|
282
286
|
await WorkerBody.postMessage("done", {});
|
|
283
287
|
} finally {
|
|
284
288
|
activeInputBatches = null;
|
|
@@ -306,6 +310,7 @@
|
|
|
306
310
|
default:
|
|
307
311
|
}
|
|
308
312
|
} catch (error) {
|
|
313
|
+
reporter?.finish();
|
|
309
314
|
const message = error instanceof Error ? error.message : "";
|
|
310
315
|
WorkerBody.postMessage("error", { error: message });
|
|
311
316
|
}
|
|
@@ -345,6 +350,35 @@
|
|
|
345
350
|
WorkerBody.postMessage("process", payload);
|
|
346
351
|
});
|
|
347
352
|
}
|
|
353
|
+
function createProgressReporter() {
|
|
354
|
+
let pending;
|
|
355
|
+
let finished = false;
|
|
356
|
+
let scheduled = false;
|
|
357
|
+
const flush = () => {
|
|
358
|
+
scheduled = false;
|
|
359
|
+
if (pending) {
|
|
360
|
+
WorkerBody.postMessage("progress", { progress: pending });
|
|
361
|
+
pending = void 0;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
return {
|
|
365
|
+
/** Records progress while retaining phase transitions. */
|
|
366
|
+
report(progress) {
|
|
367
|
+
if (finished) return;
|
|
368
|
+
if (pending && pending.phase !== progress.phase) flush();
|
|
369
|
+
pending = { ...progress };
|
|
370
|
+
if (!scheduled) {
|
|
371
|
+
scheduled = true;
|
|
372
|
+
setTimeout(flush, 0);
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
/** Flushes final progress and suppresses reports from stale callbacks. */
|
|
376
|
+
finish() {
|
|
377
|
+
flush();
|
|
378
|
+
finished = true;
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}
|
|
348
382
|
var requestId, activeInputBatches, activeOutputAcknowledgements;
|
|
349
383
|
var init_create_worker = __esm({
|
|
350
384
|
"../core/src/worker-utils/lib/worker-api/create-worker.ts"() {
|
|
@@ -391,6 +425,7 @@
|
|
|
391
425
|
options,
|
|
392
426
|
context: {
|
|
393
427
|
...loaderContext,
|
|
428
|
+
reportProgress: workerContext?.reportProgress,
|
|
394
429
|
coreApi: createWorkerCoreApi(),
|
|
395
430
|
_parse: createParseOnMainThread(workerContext?.process)
|
|
396
431
|
}
|
|
@@ -401,8 +436,10 @@
|
|
|
401
436
|
if (!loader.parseInBatches) {
|
|
402
437
|
throw new Error(`${loader.id} loader does not support batched parsing`);
|
|
403
438
|
}
|
|
404
|
-
const
|
|
439
|
+
const parserOptions = getWorkerLoaderOptions(loader, options);
|
|
440
|
+
const resultIterator = loader.parseInBatches(inputIterator, parserOptions, {
|
|
405
441
|
...loaderContext,
|
|
442
|
+
reportProgress: workerContext?.reportProgress,
|
|
406
443
|
coreApi: createWorkerCoreApi(),
|
|
407
444
|
_parse: createParseOnMainThread(workerContext?.process)
|
|
408
445
|
});
|
|
@@ -458,7 +495,17 @@
|
|
|
458
495
|
if (!context) {
|
|
459
496
|
return void 0;
|
|
460
497
|
}
|
|
461
|
-
const {
|
|
498
|
+
const {
|
|
499
|
+
fetch: fetch2,
|
|
500
|
+
loaders,
|
|
501
|
+
coreApi,
|
|
502
|
+
signal,
|
|
503
|
+
reportProgress,
|
|
504
|
+
_parse,
|
|
505
|
+
_parseSync,
|
|
506
|
+
_parseInBatches,
|
|
507
|
+
...serializableContext
|
|
508
|
+
} = context;
|
|
462
509
|
return JSON.parse(JSON.stringify(serializableContext));
|
|
463
510
|
}
|
|
464
511
|
async function parseData({
|
|
@@ -479,18 +526,15 @@
|
|
|
479
526
|
} else {
|
|
480
527
|
throw new Error(`Could not load data with ${loader.name} loader`);
|
|
481
528
|
}
|
|
482
|
-
options =
|
|
529
|
+
options = getWorkerLoaderOptions(loader, options);
|
|
530
|
+
return await parser(data, { ...options }, context, loader);
|
|
531
|
+
}
|
|
532
|
+
function getWorkerLoaderOptions(loader, options) {
|
|
533
|
+
return {
|
|
483
534
|
...options,
|
|
484
|
-
modules: {
|
|
485
|
-
|
|
486
|
-
...options.modules || {}
|
|
487
|
-
},
|
|
488
|
-
core: {
|
|
489
|
-
...options.core,
|
|
490
|
-
worker: false
|
|
491
|
-
}
|
|
535
|
+
modules: { ...loader.options?.modules, ...options.modules },
|
|
536
|
+
core: { ...options.core, worker: false }
|
|
492
537
|
};
|
|
493
|
-
return await parser(data, { ...options }, context, loader);
|
|
494
538
|
}
|
|
495
539
|
var init_create_loader_worker = __esm({
|
|
496
540
|
"../core/src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts"() {
|
|
@@ -16686,7 +16730,7 @@ return true;`);
|
|
|
16686
16730
|
|
|
16687
16731
|
// ../../node_modules/@math.gl/geospatial/dist/wkb/wkb-builder.js
|
|
16688
16732
|
function measureGeometry(geometryWriter, options) {
|
|
16689
|
-
const builder = new WKBBuilder({ mode: "measure"
|
|
16733
|
+
const builder = new WKBBuilder({ ...options, mode: "measure" });
|
|
16690
16734
|
geometryWriter(builder);
|
|
16691
16735
|
return builder.finishGeometry();
|
|
16692
16736
|
}
|
|
@@ -16876,6 +16920,11 @@ return true;`);
|
|
|
16876
16920
|
if (valueOffsets.length !== geometryWriters.length + 1) {
|
|
16877
16921
|
throw new Error("WKB valueOffsets length must equal geometry count plus one");
|
|
16878
16922
|
}
|
|
16923
|
+
for (let i = 0; i < valueOffsets.length; i++) {
|
|
16924
|
+
if (!Number.isInteger(valueOffsets[i]) || valueOffsets[i] < 0 || i > 0 && valueOffsets[i] < valueOffsets[i - 1]) {
|
|
16925
|
+
throw new Error("WKB valueOffsets must be nonnegative and nondecreasing");
|
|
16926
|
+
}
|
|
16927
|
+
}
|
|
16879
16928
|
if (valueOffsets[valueOffsets.length - 1] > values.byteLength) {
|
|
16880
16929
|
throw new Error("WKB values buffer is smaller than its final offset");
|
|
16881
16930
|
}
|
|
@@ -16884,10 +16933,10 @@ return true;`);
|
|
|
16884
16933
|
if (!geometryWriter)
|
|
16885
16934
|
continue;
|
|
16886
16935
|
const builder = new _WKBBuilder({
|
|
16936
|
+
...options,
|
|
16887
16937
|
mode: "write",
|
|
16888
16938
|
target: values,
|
|
16889
16939
|
byteOffset: valueOffsets[geometryIndex],
|
|
16890
|
-
...options,
|
|
16891
16940
|
dimension: options.dimensionResolver?.(geometryIndex) ?? options.dimension
|
|
16892
16941
|
});
|
|
16893
16942
|
geometryWriter(builder);
|
|
@@ -19931,7 +19980,7 @@ return true;`);
|
|
|
19931
19980
|
"src/shapefile/shp-loader-types.ts"() {
|
|
19932
19981
|
"use strict";
|
|
19933
19982
|
init_shp_format();
|
|
19934
|
-
VERSION = true ? "5.0.0-alpha.
|
|
19983
|
+
VERSION = true ? "5.0.0-alpha.14" : "latest";
|
|
19935
19984
|
SHPLoader = {
|
|
19936
19985
|
dataType: null,
|
|
19937
19986
|
batchType: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/geospatial",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.14",
|
|
4
4
|
"description": "Grouped geospatial loaders (package consolidation proof of concept)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -145,8 +145,9 @@
|
|
|
145
145
|
"import": "./dist/dbf-worker.js"
|
|
146
146
|
},
|
|
147
147
|
"./kml": {
|
|
148
|
-
"types": "./dist/kml.d.ts",
|
|
149
|
-
"import": "./dist/kml.js"
|
|
148
|
+
"types": "./dist/kml/index.d.ts",
|
|
149
|
+
"import": "./dist/kml/index.js",
|
|
150
|
+
"require": "./dist/kml/index.cjs"
|
|
150
151
|
},
|
|
151
152
|
"./gpx": {
|
|
152
153
|
"types": "./dist/gpx.d.ts",
|
|
@@ -161,8 +162,9 @@
|
|
|
161
162
|
"import": "./dist/kmz.js"
|
|
162
163
|
},
|
|
163
164
|
"./shapefile": {
|
|
164
|
-
"types": "./dist/shapefile.d.ts",
|
|
165
|
-
"import": "./dist/shapefile.js"
|
|
165
|
+
"types": "./dist/shapefile/index.d.ts",
|
|
166
|
+
"import": "./dist/shapefile/index.js",
|
|
167
|
+
"require": "./dist/shapefile/index.cjs"
|
|
166
168
|
},
|
|
167
169
|
"./shp": {
|
|
168
170
|
"types": "./dist/shp.d.ts",
|
|
@@ -206,8 +208,9 @@
|
|
|
206
208
|
"import": "./dist/flatgeobuf/flatgeobuf-format.js"
|
|
207
209
|
},
|
|
208
210
|
"./flatgeobuf": {
|
|
209
|
-
"types": "./dist/flatgeobuf.d.ts",
|
|
210
|
-
"import": "./dist/flatgeobuf.js"
|
|
211
|
+
"types": "./dist/flatgeobuf/index.d.ts",
|
|
212
|
+
"import": "./dist/flatgeobuf/index.js",
|
|
213
|
+
"require": "./dist/flatgeobuf/index.cjs"
|
|
211
214
|
},
|
|
212
215
|
"./flatgeobuf-worker.js": {
|
|
213
216
|
"import": "./dist/flatgeobuf-worker.js"
|
|
@@ -242,8 +245,9 @@
|
|
|
242
245
|
"import": "./dist/geopackage/geopackage-loader-types.js"
|
|
243
246
|
},
|
|
244
247
|
"./geopackage": {
|
|
245
|
-
"types": "./dist/geopackage.d.ts",
|
|
246
|
-
"import": "./dist/geopackage.js"
|
|
248
|
+
"types": "./dist/geopackage/index.d.ts",
|
|
249
|
+
"import": "./dist/geopackage/index.js",
|
|
250
|
+
"require": "./dist/geopackage/index.cjs"
|
|
247
251
|
},
|
|
248
252
|
"./geopackage/geopackage-loader-options": {
|
|
249
253
|
"types": "./dist/geopackage/geopackage-loader-options.d.ts",
|
|
@@ -263,10 +267,10 @@
|
|
|
263
267
|
"build-worker-flatgeobuf": "node ../../scripts/build-codec-worker.mjs src/workers/flatgeobuf-worker.ts --bundle --outfile=dist/flatgeobuf-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
264
268
|
},
|
|
265
269
|
"dependencies": {
|
|
266
|
-
"@loaders.gl/
|
|
267
|
-
"@loaders.gl/
|
|
268
|
-
"@loaders.gl/
|
|
269
|
-
"@math.gl/geospatial": "5.0.0-alpha.
|
|
270
|
+
"@loaders.gl/archives": "5.0.0-alpha.14",
|
|
271
|
+
"@loaders.gl/arrow-geometry": "5.0.0-alpha.14",
|
|
272
|
+
"@loaders.gl/xml": "5.0.0-alpha.14",
|
|
273
|
+
"@math.gl/geospatial": "5.0.0-alpha.20",
|
|
270
274
|
"@types/sql.js": "^1.4.5",
|
|
271
275
|
"apache-arrow": ">= 17.0.0"
|
|
272
276
|
},
|
|
@@ -284,5 +288,6 @@
|
|
|
284
288
|
},
|
|
285
289
|
"devDependencies": {
|
|
286
290
|
"sql.js": "1.14.1"
|
|
287
|
-
}
|
|
291
|
+
},
|
|
292
|
+
"gitHead": "226b7bca7ecb3684b7386487ee76565ca240d7d9"
|
|
288
293
|
}
|
|
@@ -37,7 +37,7 @@ export type FlatGeobufLoaderOptions = LoaderOptions & {
|
|
|
37
37
|
|
|
38
38
|
/** Preloads the parser-bearing FlatGeobuf loader implementation. */
|
|
39
39
|
async function preload() {
|
|
40
|
-
const {FlatGeobufLoaderWithParser} = await import('@loaders.gl/geospatial/flatgeobuf');
|
|
40
|
+
const {FlatGeobufLoaderWithParser} = await import('@loaders.gl/geospatial/flatgeobuf/flatgeobuf-loader');
|
|
41
41
|
return FlatGeobufLoaderWithParser;
|
|
42
42
|
}
|
|
43
43
|
|
package/src/flatgeobuf.ts
CHANGED
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
export type {FlatGeobufLoaderOptions} from './flatgeobuf/flatgeobuf-loader-types';
|
|
5
|
+
export * from './flatgeobuf/index';
|
|
@@ -35,7 +35,9 @@ export type GeoPackageLoaderOptions = LoaderOptions & {
|
|
|
35
35
|
|
|
36
36
|
/** Preloads the parser-bearing GeoPackage loader implementation. */
|
|
37
37
|
async function preload() {
|
|
38
|
-
const {GeoPackageLoaderWithParser} = await import(
|
|
38
|
+
const {GeoPackageLoaderWithParser} = await import(
|
|
39
|
+
'@loaders.gl/geospatial/geopackage/geopackage-loader'
|
|
40
|
+
);
|
|
39
41
|
return GeoPackageLoaderWithParser;
|
|
40
42
|
}
|
|
41
43
|
|
package/src/geopackage.ts
CHANGED
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
export type {GeoPackageLoaderOptions} from './geopackage/geopackage-loader-types';
|
|
5
|
+
export * from './geopackage/index';
|
|
@@ -27,7 +27,7 @@ export type KMLLoaderOptions = LoaderOptions & {
|
|
|
27
27
|
|
|
28
28
|
/** Preloads the parser-bearing KML loader implementation. */
|
|
29
29
|
async function preloadKMLLoader() {
|
|
30
|
-
const {KMLLoaderWithParser} = await import('@loaders.gl/geospatial/kml');
|
|
30
|
+
const {KMLLoaderWithParser} = await import('@loaders.gl/geospatial/kml/kml-loader');
|
|
31
31
|
return KMLLoaderWithParser;
|
|
32
32
|
}
|
|
33
33
|
|
package/src/kml/kml-writer.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
Position
|
|
13
13
|
} from '@loaders.gl/core/schema';
|
|
14
14
|
import {KMLFormat, KMZFormat} from './kml-format';
|
|
15
|
-
import {ZipWriter} from '@loaders.gl/zip';
|
|
15
|
+
import {ZipWriter} from '@loaders.gl/archives/zip';
|
|
16
16
|
|
|
17
17
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
18
18
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
package/src/kml/kmz-archive.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {HttpFile} from '@loaders.gl/core/loader-utils';
|
|
6
|
-
import {ZipFileSystem} from '@loaders.gl/zip';
|
|
6
|
+
import {ZipFileSystem} from '@loaders.gl/archives/zip';
|
|
7
7
|
import type {KMLDocument} from './kml-parser';
|
|
8
8
|
import {parseKMLDocument} from './kml-parser';
|
|
9
9
|
|
package/src/kml.ts
CHANGED
|
@@ -42,7 +42,9 @@ export type ShapefileLoaderOptions = StrictLoaderOptions &
|
|
|
42
42
|
|
|
43
43
|
/** Preloads the parser-bearing Shapefile loader implementation. */
|
|
44
44
|
async function preloadShapefileLoader() {
|
|
45
|
-
const {ShapefileLoaderWithParser} = await import(
|
|
45
|
+
const {ShapefileLoaderWithParser} = await import(
|
|
46
|
+
'@loaders.gl/geospatial/shapefile/shapefile-loader'
|
|
47
|
+
);
|
|
46
48
|
return ShapefileLoaderWithParser;
|
|
47
49
|
}
|
|
48
50
|
|
package/src/shapefile.ts
CHANGED