@loaders.gl/arcgis 5.0.0-beta.4 → 5.0.0-beta.5

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/index.cjs CHANGED
@@ -427,12 +427,10 @@ var init_library_utils = __esm({
427
427
  });
428
428
 
429
429
  // ../core/src/worker-utils/index.ts
430
- var import_tasks;
431
430
  var init_worker_utils = __esm({
432
431
  "../core/src/worker-utils/index.ts"() {
433
432
  "use strict";
434
433
  init_globals2();
435
- import_tasks = require("@math.gl/core/tasks");
436
434
  init_library_utils();
437
435
  }
438
436
  });
@@ -3820,7 +3818,7 @@ function convertGeometryToWKT(geometry, options) {
3820
3818
  if (geometry.geometries.length === 0) return "GEOMETRYCOLLECTION EMPTY";
3821
3819
  return `GEOMETRYCOLLECTION (${geometry.geometries.map((child) => convertGeometryToWKT(child)).join(", ")})`;
3822
3820
  }
3823
- return (0, import_geospatial2.formatWKT)(normalizeGeometryDimension(geometry, dimension), dimension);
3821
+ return (0, import_wkb.formatWKT)(normalizeGeometryDimension(geometry, dimension), dimension);
3824
3822
  }
3825
3823
  function normalizeGeometryDimension(geometry, dimension) {
3826
3824
  if (geometry.type === "GeometryCollection") {
@@ -3879,11 +3877,11 @@ function getFirstCoordinate(geometry) {
3879
3877
  function getDimensionSize(dimension) {
3880
3878
  return dimension === "xy" ? 2 : dimension === "xyzm" ? 4 : 3;
3881
3879
  }
3882
- var import_geospatial2;
3880
+ var import_wkb;
3883
3881
  var init_geometry_to_wkt = __esm({
3884
3882
  "../core/src/arrow-geometry/geometry-to-wkt.ts"() {
3885
3883
  "use strict";
3886
- import_geospatial2 = require("@math.gl/geospatial");
3884
+ import_wkb = require("@math.gl/arrow/wkb");
3887
3885
  }
3888
3886
  });
3889
3887
 
@@ -3897,7 +3895,7 @@ function convertGeometryToWKB(input, options = {}) {
3897
3895
  }
3898
3896
  function encodeGeometry(geometry, dimension) {
3899
3897
  if (geometry.type !== "GeometryCollection") {
3900
- return (0, import_geospatial3.writeWKB)(geometry, dimension);
3898
+ return (0, import_wkb2.writeWKB)(geometry, dimension);
3901
3899
  }
3902
3900
  const children = geometry.geometries.map(
3903
3901
  (child) => encodeGeometry(
@@ -3905,13 +3903,13 @@ function encodeGeometry(geometry, dimension) {
3905
3903
  child.__geoarrowDimension ?? dimension
3906
3904
  )
3907
3905
  );
3908
- const headerBuilder = new import_geospatial3.WKBBuilder({ mode: "measure", dimension });
3906
+ const headerBuilder = new import_wkb2.WKBBuilder({ mode: "measure", dimension });
3909
3907
  headerBuilder.beginGeometry("GeometryCollection", children.length);
3910
3908
  const headerLength = headerBuilder.finishGeometry();
3911
3909
  const bytes = new Uint8Array(
3912
3910
  headerLength + children.reduce((total, child) => total + child.length, 0)
3913
3911
  );
3914
- const writer = new import_geospatial3.WKBBuilder({ mode: "write", target: bytes, dimension });
3912
+ const writer = new import_wkb2.WKBBuilder({ mode: "write", target: bytes, dimension });
3915
3913
  writer.beginGeometry("GeometryCollection", children.length);
3916
3914
  let byteOffset = writer.finishGeometry();
3917
3915
  for (const child of children) {
@@ -3920,11 +3918,11 @@ function encodeGeometry(geometry, dimension) {
3920
3918
  }
3921
3919
  return bytes;
3922
3920
  }
3923
- var import_geospatial3;
3921
+ var import_wkb2;
3924
3922
  var init_geometry_codecs = __esm({
3925
3923
  "../core/src/arrow-geometry/geometry-codecs.ts"() {
3926
3924
  "use strict";
3927
- import_geospatial3 = require("@math.gl/geospatial");
3925
+ import_wkb2 = require("@math.gl/arrow/wkb");
3928
3926
  init_geometry_to_wkt();
3929
3927
  }
3930
3928
  });
@@ -9856,109 +9854,7 @@ var init_usd = __esm({
9856
9854
  }
9857
9855
  });
9858
9856
 
9859
- // ../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts
9860
- function splitArrowBuffers(input, options = {}) {
9861
- const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
9862
- if (isArrowTable(input)) {
9863
- return splitArrowTableBuffersInternal(input, context);
9864
- }
9865
- if (isArrowRecordBatch(input)) {
9866
- return splitArrowRecordBatchBuffers(input, context);
9867
- }
9868
- if (isArrowVector(input)) {
9869
- return splitArrowVectorBuffers(input, context);
9870
- }
9871
- return splitArrowDataBuffers(input, context);
9872
- }
9873
- function isArrowTable(input) {
9874
- return "batches" in input;
9875
- }
9876
- function isArrowRecordBatch(input) {
9877
- return "schema" in input && "data" in input && !Array.isArray(input.data);
9878
- }
9879
- function isArrowVector(input) {
9880
- return "data" in input && Array.isArray(input.data);
9881
- }
9882
- function splitArrowTableBuffersInternal(table, options) {
9883
- const recordBatches = table.batches.map(
9884
- (recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
9885
- );
9886
- return new arrow8.Table(table.schema, recordBatches);
9887
- }
9888
- function splitArrowRecordBatchBuffers(recordBatch, options) {
9889
- return new arrow8.RecordBatch(
9890
- recordBatch.schema,
9891
- splitArrowDataBuffers(recordBatch.data, options)
9892
- );
9893
- }
9894
- function splitArrowDataBuffers(data, options) {
9895
- const children = data.children.map((childData) => splitArrowDataBuffers(childData, options));
9896
- const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
9897
- const buffers = {
9898
- [arrow8.BufferType.OFFSET]: splitArrowBuffer(data.buffers[arrow8.BufferType.OFFSET], options),
9899
- [arrow8.BufferType.DATA]: splitArrowBuffer(data.buffers[arrow8.BufferType.DATA], options),
9900
- [arrow8.BufferType.VALIDITY]: splitArrowBuffer(data.buffers[arrow8.BufferType.VALIDITY], options),
9901
- [arrow8.BufferType.TYPE]: splitArrowBuffer(data.buffers[arrow8.BufferType.TYPE], options)
9902
- };
9903
- return new arrow8.Data(
9904
- data.type,
9905
- data.offset,
9906
- data.length,
9907
- // @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
9908
- data._nullCount,
9909
- buffers,
9910
- children,
9911
- dictionary
9912
- );
9913
- }
9914
- function splitArrowVectorBuffers(vector, options) {
9915
- return new arrow8.Vector(vector.data.map((data) => splitArrowDataBuffers(data, options)));
9916
- }
9917
- function splitArrowBuffer(array, options) {
9918
- if (!isArrowTypedArray(array)) {
9919
- return array;
9920
- }
9921
- if (options.copy === "none") {
9922
- return array;
9923
- }
9924
- if (options.copy !== "all" && array.byteOffset === 0 && array.byteLength === array.buffer.byteLength) {
9925
- return array;
9926
- }
9927
- let copy = options.copies.get(array);
9928
- if (!copy) {
9929
- copy = array.slice();
9930
- options.copies.set(array, copy);
9931
- }
9932
- return copy;
9933
- }
9934
- function isArrowTypedArray(value) {
9935
- return ArrayBuffer.isView(value) && !(value instanceof DataView);
9936
- }
9937
- var arrow8;
9938
- var init_split_arrow_buffers = __esm({
9939
- "../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts"() {
9940
- "use strict";
9941
- arrow8 = __toESM(require("apache-arrow"), 1);
9942
- }
9943
- });
9944
-
9945
- // ../core/src/schema-utils/lib/arrow/arrow-table-transport.ts
9946
- function dehydrateArrowTable(table, options) {
9947
- const splitTable = splitArrowBuffers(table, options);
9948
- return {
9949
- shape: "arrow-table",
9950
- transport: "arrow-js",
9951
- schema: serializeArrowSchema(splitTable.schema),
9952
- batches: splitTable.batches.map((recordBatch) => dehydrateArrowRecordBatch(recordBatch))
9953
- };
9954
- }
9955
- function hydrateArrowTable(table) {
9956
- const schema = deserializeArrowSchema(table.schema);
9957
- const recordBatches = table.batches.map(
9958
- (recordBatch) => new arrow9.RecordBatch(schema, hydrateArrowData(recordBatch.data))
9959
- );
9960
- return new arrow9.Table(schema, recordBatches);
9961
- }
9857
+ // ../core/src/arrow-worker-transport.ts
9962
9858
  function serializeArrowWorkerResult(result, options) {
9963
9859
  var _a2;
9964
9860
  if (!isArrowTableWrapper(result)) {
@@ -9968,14 +9864,14 @@ function serializeArrowWorkerResult(result, options) {
9968
9864
  const bufferCopyMode = ((_a2 = workerOptions == null ? void 0 : workerOptions.core) == null ? void 0 : _a2.workerTransferBufferCopy) ?? (workerOptions == null ? void 0 : workerOptions.workerTransferBufferCopy);
9969
9865
  return {
9970
9866
  ...result,
9971
- data: dehydrateArrowTable(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
9867
+ data: (0, import_arrow.dehydrateArrowTable)(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
9972
9868
  };
9973
9869
  }
9974
9870
  function deserializeArrowWorkerResult(result) {
9975
9871
  if (!isDehydratedArrowTableWrapper(result)) {
9976
9872
  return result;
9977
9873
  }
9978
- return { ...result, data: hydrateArrowTable(result.data) };
9874
+ return { ...result, data: (0, import_arrow.hydrateArrowTable)(result.data) };
9979
9875
  }
9980
9876
  function isArrowTableWrapper(value) {
9981
9877
  const table = value;
@@ -9989,61 +9885,11 @@ function isDehydratedArrowTableWrapper(value) {
9989
9885
  table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
9990
9886
  );
9991
9887
  }
9992
- function dehydrateArrowRecordBatch(recordBatch) {
9993
- return { data: dehydrateArrowData(recordBatch.data) };
9994
- }
9995
- function dehydrateArrowData(data) {
9996
- return {
9997
- type: serializeArrowType(data.type),
9998
- offset: data.offset,
9999
- length: data.length,
10000
- // @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
10001
- nullCount: data._nullCount,
10002
- buffers: {
10003
- [arrow9.BufferType.OFFSET]: data.buffers[arrow9.BufferType.OFFSET],
10004
- [arrow9.BufferType.DATA]: data.buffers[arrow9.BufferType.DATA],
10005
- [arrow9.BufferType.VALIDITY]: data.buffers[arrow9.BufferType.VALIDITY],
10006
- [arrow9.BufferType.TYPE]: data.buffers[arrow9.BufferType.TYPE]
10007
- },
10008
- children: data.children.map((childData) => dehydrateArrowData(childData)),
10009
- dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
10010
- };
10011
- }
10012
- function dehydrateArrowVector(vector) {
10013
- return { data: vector.data.map((data) => dehydrateArrowData(data)) };
10014
- }
10015
- function hydrateArrowData(data) {
10016
- const children = data.children.map((childData) => hydrateArrowData(childData));
10017
- const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
10018
- return new arrow9.Data(
10019
- deserializeArrowType(data.type),
10020
- data.offset,
10021
- data.length,
10022
- data.nullCount,
10023
- data.buffers,
10024
- children,
10025
- dictionary
10026
- );
10027
- }
10028
- function hydrateArrowVector(vector) {
10029
- return new arrow9.Vector(vector.data.map((data) => hydrateArrowData(data)));
10030
- }
10031
- var arrow9;
10032
- var init_arrow_table_transport = __esm({
10033
- "../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
9888
+ var import_arrow;
9889
+ var init_arrow_worker_transport = __esm({
9890
+ "../core/src/arrow-worker-transport.ts"() {
10034
9891
  "use strict";
10035
- arrow9 = __toESM(require("apache-arrow"), 1);
10036
- init_convert_arrow_schema();
10037
- init_split_arrow_buffers();
10038
- }
10039
- });
10040
-
10041
- // ../core/src/schema-utils/arrow-transport.ts
10042
- var init_arrow_transport = __esm({
10043
- "../core/src/schema-utils/arrow-transport.ts"() {
10044
- "use strict";
10045
- init_arrow_table_transport();
10046
- init_split_arrow_buffers();
9892
+ import_arrow = require("@math.gl/arrow");
10047
9893
  }
10048
9894
  });
10049
9895
 
@@ -11143,7 +10989,7 @@ var DracoLoader;
11143
10989
  var init_draco_loader_types = __esm({
11144
10990
  "../scene/src/draco/draco-loader-types.ts"() {
11145
10991
  "use strict";
11146
- init_arrow_transport();
10992
+ init_arrow_worker_transport();
11147
10993
  init_version3();
11148
10994
  init_draco_format();
11149
10995
  init_draco_loader_options();
@@ -11690,7 +11536,7 @@ function createBoundingVolume(boundingVolumeHeader, transform, result, initialTr
11690
11536
  return createBox(boundingVolumeHeader.box, boxTransform, result);
11691
11537
  }
11692
11538
  if (boundingVolumeHeader.region) {
11693
- const boundingVolume = (0, import_geospatial4.makeOBBFromRegion)(boundingVolumeHeader.region);
11539
+ const boundingVolume = (0, import_geospatial2.makeOBBFromRegion)(boundingVolumeHeader.region);
11694
11540
  const regionTransform = transform.equals(initialTransform) ? identityTransform : transform.clone().multiplyRight(initialTransform.clone().invert());
11695
11541
  return createBox(
11696
11542
  [...boundingVolume.center, ...boundingVolume.halfAxes],
@@ -11799,10 +11645,10 @@ function orientedBoundingBoxToCartographicBounds(boundingVolume) {
11799
11645
  function boundingSphereToCartographicBounds(boundingVolume) {
11800
11646
  const result = emptyCartographicBounds();
11801
11647
  const { center, radius } = boundingVolume;
11802
- const point = import_geospatial4.Ellipsoid.WGS84.scaleToGeodeticSurface(center, scratchPoint);
11648
+ const point = import_geospatial2.Ellipsoid.WGS84.scaleToGeodeticSurface(center, scratchPoint);
11803
11649
  let zAxis;
11804
11650
  if (point) {
11805
- zAxis = import_geospatial4.Ellipsoid.WGS84.geodeticSurfaceNormal(point);
11651
+ zAxis = import_geospatial2.Ellipsoid.WGS84.geodeticSurfaceNormal(point);
11806
11652
  } else {
11807
11653
  zAxis = new import_core5.Vector3(0, 0, 1);
11808
11654
  }
@@ -11831,7 +11677,7 @@ function emptyCartographicBounds() {
11831
11677
  ];
11832
11678
  }
11833
11679
  function addToCartographicBounds(target, cartesian) {
11834
- import_geospatial4.Ellipsoid.WGS84.cartesianToCartographic(cartesian, scratchPoint);
11680
+ import_geospatial2.Ellipsoid.WGS84.cartesianToCartographic(cartesian, scratchPoint);
11835
11681
  target[0][0] = Math.min(target[0][0], scratchPoint[0]);
11836
11682
  target[0][1] = Math.min(target[0][1], scratchPoint[1]);
11837
11683
  target[0][2] = Math.min(target[0][2], scratchPoint[2]);
@@ -11839,13 +11685,13 @@ function addToCartographicBounds(target, cartesian) {
11839
11685
  target[1][1] = Math.max(target[1][1], scratchPoint[1]);
11840
11686
  target[1][2] = Math.max(target[1][2], scratchPoint[2]);
11841
11687
  }
11842
- var import_core5, import_culling2, import_geospatial4, scratchPoint, scratchScale, identityTransform;
11688
+ var import_core5, import_culling2, import_geospatial2, scratchPoint, scratchScale, identityTransform;
11843
11689
  var init_bounding_volume = __esm({
11844
11690
  "../tiles-3d/src/tileset-3d/helpers/bounding-volume.ts"() {
11845
11691
  "use strict";
11846
11692
  import_core5 = require("@math.gl/core");
11847
11693
  import_culling2 = require("@math.gl/geometry/culling");
11848
- import_geospatial4 = require("@math.gl/geospatial");
11694
+ import_geospatial2 = require("@math.gl/geospatial");
11849
11695
  init_loader_utils();
11850
11696
  scratchPoint = new import_core5.Vector3();
11851
11697
  scratchScale = new import_core5.Vector3();
@@ -11890,9 +11736,9 @@ function getProjectedRadius(tile, frameState) {
11890
11736
  const mbsR = mbs[3];
11891
11737
  const mbsCenterCartesian = [...tile.boundingVolume.center];
11892
11738
  const cameraPositionCartographic = viewport.unprojectPosition(viewport.cameraPosition);
11893
- import_geospatial5.Ellipsoid.WGS84.cartographicToCartesian(cameraPositionCartographic, cameraPositionCartesian);
11739
+ import_geospatial3.Ellipsoid.WGS84.cartographicToCartesian(cameraPositionCartographic, cameraPositionCartesian);
11894
11740
  toEye.copy(cameraPositionCartesian).subtract(mbsCenterCartesian).normalize();
11895
- (0, import_geospatial6.eastNorthUpToFixedFrame)(import_geospatial5.Ellipsoid.WGS84, mbsCenterCartesian, enuToCartesianMatrix);
11741
+ (0, import_geospatial4.eastNorthUpToFixedFrame)(import_geospatial3.Ellipsoid.WGS84, mbsCenterCartesian, enuToCartesianMatrix);
11896
11742
  cartesianToEnuMatrix.copy(enuToCartesianMatrix).invert();
11897
11743
  cameraPositionEnu.copy(cameraPositionCartesian).transform(cartesianToEnuMatrix);
11898
11744
  const projection = Math.sqrt(
@@ -11904,7 +11750,7 @@ function getProjectedRadius(tile, frameState) {
11904
11750
  const extraVectorCartesian = extraVertexCartesian.subtract(mbsCenterCartesian).normalize();
11905
11751
  const radiusVector = toEye.cross(extraVectorCartesian).normalize().scale(mbsR);
11906
11752
  const sphereMbsBorderVertexCartesian = radiusVector.add(mbsCenterCartesian);
11907
- const sphereMbsBorderVertexCartographic = import_geospatial5.Ellipsoid.WGS84.cartesianToCartographic(
11753
+ const sphereMbsBorderVertexCartographic = import_geospatial3.Ellipsoid.WGS84.cartesianToCartographic(
11908
11754
  sphereMbsBorderVertexCartesian
11909
11755
  );
11910
11756
  const projectedOrigin = viewport.project([mbsLon, mbsLat, mbsZ]);
@@ -11914,13 +11760,13 @@ function getProjectedRadius(tile, frameState) {
11914
11760
  const projectedRadius = projectedOriginVector.copy(projectedOrigin).subtract(projectedMbsBorderVertex).magnitude();
11915
11761
  return projectedRadius;
11916
11762
  }
11917
- var import_core6, import_geospatial5, import_geospatial6, cameraPositionCartesian, toEye, cameraPositionEnu, extraVertexEnu, projectedOriginVector, enuToCartesianMatrix, cartesianToEnuMatrix;
11763
+ var import_core6, import_geospatial3, import_geospatial4, cameraPositionCartesian, toEye, cameraPositionEnu, extraVertexEnu, projectedOriginVector, enuToCartesianMatrix, cartesianToEnuMatrix;
11918
11764
  var init_i3s_lod = __esm({
11919
11765
  "../tiles-3d/src/tileset-3d/helpers/i3s-lod.ts"() {
11920
11766
  "use strict";
11921
11767
  import_core6 = require("@math.gl/core");
11922
- import_geospatial5 = require("@math.gl/geospatial");
11923
- import_geospatial6 = require("@math.gl/geospatial");
11768
+ import_geospatial3 = require("@math.gl/geospatial");
11769
+ import_geospatial4 = require("@math.gl/geospatial");
11924
11770
  cameraPositionCartesian = new import_core6.Vector3();
11925
11771
  toEye = new import_core6.Vector3();
11926
11772
  cameraPositionEnu = new import_core6.Vector3();
@@ -13380,7 +13226,7 @@ var init_tile_3d = __esm({
13380
13226
 
13381
13227
  // ../tiles-3d/src/tileset-3d/helpers/zoom.ts
13382
13228
  function getZoomFromFullExtent(fullExtent, cartorgraphicCenter, cartesianCenter) {
13383
- import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(
13229
+ import_geospatial5.Ellipsoid.WGS84.cartographicToCartesian(
13384
13230
  [fullExtent.xmax, fullExtent.ymax, fullExtent.zmax],
13385
13231
  scratchVector2
13386
13232
  );
@@ -13397,13 +13243,13 @@ function getZoomFromExtent(extent, cartorgraphicCenter, cartesianCenter) {
13397
13243
  cartesianCenter
13398
13244
  );
13399
13245
  }
13400
- var import_core8, import_culling4, import_geospatial7, WGS84_RADIUS_Z, scratchVector2;
13246
+ var import_core8, import_culling4, import_geospatial5, WGS84_RADIUS_Z, scratchVector2;
13401
13247
  var init_zoom = __esm({
13402
13248
  "../tiles-3d/src/tileset-3d/helpers/zoom.ts"() {
13403
13249
  "use strict";
13404
13250
  import_core8 = require("@math.gl/core");
13405
13251
  import_culling4 = require("@math.gl/geometry/culling");
13406
- import_geospatial7 = require("@math.gl/geospatial");
13252
+ import_geospatial5 = require("@math.gl/geospatial");
13407
13253
  WGS84_RADIUS_Z = 6356752314245179e-9;
13408
13254
  scratchVector2 = new import_core8.Vector3();
13409
13255
  }
@@ -13699,12 +13545,12 @@ function transformHeight(height, geoidUndulation, source, target) {
13699
13545
  }
13700
13546
  throw new Error(`Unsupported height conversion from ${source} to ${target}`);
13701
13547
  }
13702
- var import_core9, import_geospatial8, import_bulk, SpatialCoordinateTransformer;
13548
+ var import_core9, import_geospatial6, import_bulk, SpatialCoordinateTransformer;
13703
13549
  var init_spatial_coordinate_transformer = __esm({
13704
13550
  "../tiles-3d/src/spatial/spatial-coordinate-transformer.ts"() {
13705
13551
  "use strict";
13706
13552
  import_core9 = require("@math.gl/core");
13707
- import_geospatial8 = require("@math.gl/geospatial");
13553
+ import_geospatial6 = require("@math.gl/geospatial");
13708
13554
  import_bulk = require("@math.gl/geospatial/projection/bulk");
13709
13555
  init_spatial_resource_registry();
13710
13556
  init_normalize_crs_identifier();
@@ -13882,7 +13728,7 @@ var init_spatial_coordinate_transformer = __esm({
13882
13728
  /** Convert one source coordinate to conventional WGS84 longitude, latitude, and height. */
13883
13729
  toGeographic(coordinate) {
13884
13730
  if (this.sourceIsGeocentric) {
13885
- return Array.from(import_geospatial8.Ellipsoid.WGS84.cartesianToCartographic(new import_core9.Vector3(coordinate)));
13731
+ return Array.from(import_geospatial6.Ellipsoid.WGS84.cartesianToCartographic(new import_core9.Vector3(coordinate)));
13886
13732
  }
13887
13733
  if (this.sourceIsGeographic) {
13888
13734
  return coordinate.slice(0, 3);
@@ -13892,7 +13738,7 @@ var init_spatial_coordinate_transformer = __esm({
13892
13738
  /** Convert one conventional WGS84 geographic coordinate to the selected output CRS. */
13893
13739
  fromGeographic(coordinate) {
13894
13740
  if (this.outputIsGeocentric) {
13895
- return Array.from(import_geospatial8.Ellipsoid.WGS84.cartographicToCartesian(new import_core9.Vector3(coordinate)));
13741
+ return Array.from(import_geospatial6.Ellipsoid.WGS84.cartographicToCartesian(new import_core9.Vector3(coordinate)));
13896
13742
  }
13897
13743
  if (this.outputIsGeographic) {
13898
13744
  return coordinate.slice(0, 3);
@@ -14158,7 +14004,7 @@ function getGeographicBoundingSphere(geographicSamples) {
14158
14004
  throw new Error("I3S spatial transformation requires at least one bound sample");
14159
14005
  }
14160
14006
  const cartesianSamples = geographicSamples.map(
14161
- (position) => import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position))
14007
+ (position) => import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position))
14162
14008
  );
14163
14009
  const cartesianCenter = new import_core10.Vector3();
14164
14010
  for (const sample of cartesianSamples) {
@@ -14169,7 +14015,7 @@ function getGeographicBoundingSphere(geographicSamples) {
14169
14015
  for (const sample of cartesianSamples) {
14170
14016
  radius = Math.max(radius, new import_core10.Vector3(sample).subtract(cartesianCenter).magnitude());
14171
14017
  }
14172
- const geographicCenter = import_geospatial9.Ellipsoid.WGS84.cartesianToCartographic(cartesianCenter);
14018
+ const geographicCenter = import_geospatial7.Ellipsoid.WGS84.cartesianToCartographic(cartesianCenter);
14173
14019
  return [geographicCenter[0], geographicCenter[1], geographicCenter[2], radius];
14174
14020
  }
14175
14021
  function getSourceBoundSamples(bounds, sourceFrame, sourceToGeographicTransformer, sourceVerticalUnitScale) {
@@ -14186,7 +14032,7 @@ function getSourceBoundSamples(bounds, sourceFrame, sourceToGeographicTransforme
14186
14032
  ];
14187
14033
  if (sourceFrame === "geographic") {
14188
14034
  const geographicCenter = sourceToGeographicTransformer.transformPosition(center2);
14189
- const cartesianCenter = import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(
14035
+ const cartesianCenter = import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(
14190
14036
  new import_core10.Vector3(geographicCenter)
14191
14037
  );
14192
14038
  const cartesianAxes = bounds.normalReferenceFrame === "vertex-reference-frame" ? axes.map((axis) => localEnuVectorToEcef(axis, geographicCenter)) : axes;
@@ -14195,7 +14041,7 @@ function getSourceBoundSamples(bounds, sourceFrame, sourceToGeographicTransforme
14195
14041
  for (let axisIndex = 0; axisIndex < 3; axisIndex++) {
14196
14042
  corner.add(new import_core10.Vector3(cartesianAxes[axisIndex]).scale(signs[axisIndex]));
14197
14043
  }
14198
- return Array.from(import_geospatial9.Ellipsoid.WGS84.cartesianToCartographic(corner));
14044
+ return Array.from(import_geospatial7.Ellipsoid.WGS84.cartesianToCartographic(corner));
14199
14045
  });
14200
14046
  }
14201
14047
  return getBoxSigns().map((signs) => {
@@ -14215,10 +14061,10 @@ function getSourceBoundSamples(bounds, sourceFrame, sourceToGeographicTransforme
14215
14061
  const radius = mbs[3];
14216
14062
  if (sourceFrame === "geographic") {
14217
14063
  const geographicCenter = sourceToGeographicTransformer.transformPosition(center);
14218
- const cartesianCenter = import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(geographicCenter));
14064
+ const cartesianCenter = import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(geographicCenter));
14219
14065
  return getAxisDirections().map(
14220
14066
  (direction) => Array.from(
14221
- import_geospatial9.Ellipsoid.WGS84.cartesianToCartographic(
14067
+ import_geospatial7.Ellipsoid.WGS84.cartesianToCartographic(
14222
14068
  new import_core10.Vector3(cartesianCenter).add(new import_core10.Vector3(direction).scale(radius))
14223
14069
  )
14224
14070
  )
@@ -14318,12 +14164,12 @@ function getGeographicRegion(positions) {
14318
14164
  function normalizeLongitude(longitude) {
14319
14165
  return ((longitude + 180) % 360 + 360) % 360 - 180;
14320
14166
  }
14321
- var import_core10, import_geospatial9, I3SSpatialTransformer;
14167
+ var import_core10, import_geospatial7, I3SSpatialTransformer;
14322
14168
  var init_i3s_spatial_transformer = __esm({
14323
14169
  "../tiles-3d/src/spatial/i3s-spatial-transformer.ts"() {
14324
14170
  "use strict";
14325
14171
  import_core10 = require("@math.gl/core");
14326
- import_geospatial9 = require("@math.gl/geospatial");
14172
+ import_geospatial7 = require("@math.gl/geospatial");
14327
14173
  init_spatial_coordinate_transformer();
14328
14174
  init_spatial_types();
14329
14175
  init_i3s_elevation();
@@ -14660,14 +14506,14 @@ var init_i3s_spatial_transformer = __esm({
14660
14506
  /** Rebuild an I3S bound as a WGS84 ECEF box for generic `Tileset3D` traversal. */
14661
14507
  transformBoundingVolumeToGeocentric(bounds) {
14662
14508
  const cartesianSamples = this.getGeographicBoundSamples(bounds).map(
14663
- (position) => Array.from(import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14509
+ (position) => Array.from(import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14664
14510
  );
14665
14511
  return { box: getAxisAlignedBox(cartesianSamples) };
14666
14512
  }
14667
14513
  /** Rebuild an I3S bound as WGS84 ECEF after asynchronous elevation placement. */
14668
14514
  async transformBoundingVolumeToGeocentricAsync(bounds) {
14669
14515
  const cartesianSamples = (await this.getGeographicBoundSamplesAsync(bounds)).map(
14670
- (position) => Array.from(import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14516
+ (position) => Array.from(import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14671
14517
  );
14672
14518
  return { box: getAxisAlignedBox(cartesianSamples) };
14673
14519
  }
@@ -14698,7 +14544,7 @@ var init_i3s_spatial_transformer = __esm({
14698
14544
  async transformBoundsAsync(bounds) {
14699
14545
  const geographicSamples = await this.getGeographicBoundSamplesAsync(bounds);
14700
14546
  const cartesianSamples = geographicSamples.map(
14701
- (position) => Array.from(import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14547
+ (position) => Array.from(import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(position)))
14702
14548
  );
14703
14549
  const targetSamples = geographicSamples.map(
14704
14550
  (position) => this.geographicToTargetTransformer.transformPosition(position)
@@ -14857,13 +14703,13 @@ var init_i3s_spatial_transformer = __esm({
14857
14703
  if (this.targetCoordinateFrame === "geographic") {
14858
14704
  return ecefVectorToLocalEnu(ecefNormal, geographic).normalize();
14859
14705
  }
14860
- const cartesian = import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(geographic));
14706
+ const cartesian = import_geospatial7.Ellipsoid.WGS84.cartographicToCartesian(new import_core10.Vector3(geographic));
14861
14707
  const jacobianColumns = [];
14862
14708
  for (const direction of getPositiveAxisDirections()) {
14863
- const positiveGeographic = import_geospatial9.Ellipsoid.WGS84.cartesianToCartographic(
14709
+ const positiveGeographic = import_geospatial7.Ellipsoid.WGS84.cartesianToCartographic(
14864
14710
  new import_core10.Vector3(cartesian).add(direction)
14865
14711
  );
14866
- const negativeGeographic = import_geospatial9.Ellipsoid.WGS84.cartesianToCartographic(
14712
+ const negativeGeographic = import_geospatial7.Ellipsoid.WGS84.cartesianToCartographic(
14867
14713
  new import_core10.Vector3(cartesian).subtract(direction)
14868
14714
  );
14869
14715
  const positiveTarget = this.geographicToTargetTransformer.transformPosition(positiveGeographic);
@@ -14914,12 +14760,12 @@ function normalizeI3SRequest(input) {
14914
14760
  coreApi: input.coreApi
14915
14761
  };
14916
14762
  }
14917
- var import_geospatial10, import_core11, EMPTY_CONTENT_FORMATS, I3SSource;
14763
+ var import_geospatial8, import_core11, EMPTY_CONTENT_FORMATS, I3SSource;
14918
14764
  var init_i3s_source = __esm({
14919
14765
  "../tiles-3d/src/tileset-3d/format-i3s/i3s-source.ts"() {
14920
14766
  "use strict";
14921
14767
  init_loader_utils();
14922
- import_geospatial10 = require("@math.gl/geospatial");
14768
+ import_geospatial8 = require("@math.gl/geospatial");
14923
14769
  import_core11 = require("@math.gl/core");
14924
14770
  init_tile_3d();
14925
14771
  init_i3s_tileset_traverser();
@@ -15230,7 +15076,7 @@ var init_i3s_source = __esm({
15230
15076
  zmin + (zmax - zmin) / 2
15231
15077
  );
15232
15078
  const cartesianCenter = new import_core11.Vector3();
15233
- import_geospatial10.Ellipsoid.WGS84.cartographicToCartesian(cartographicCenter, cartesianCenter);
15079
+ import_geospatial8.Ellipsoid.WGS84.cartographicToCartesian(cartographicCenter, cartesianCenter);
15234
15080
  return {
15235
15081
  cartographicCenter,
15236
15082
  cartesianCenter,
@@ -15242,7 +15088,7 @@ var init_i3s_source = __esm({
15242
15088
  const [xmin, ymin, xmax, ymax] = extent;
15243
15089
  const cartographicCenter = new import_core11.Vector3(xmin + (xmax - xmin) / 2, ymin + (ymax - ymin) / 2, 0);
15244
15090
  const cartesianCenter = new import_core11.Vector3();
15245
- import_geospatial10.Ellipsoid.WGS84.cartographicToCartesian(cartographicCenter, cartesianCenter);
15091
+ import_geospatial8.Ellipsoid.WGS84.cartographicToCartesian(cartographicCenter, cartesianCenter);
15246
15092
  return {
15247
15093
  cartographicCenter,
15248
15094
  cartesianCenter,
@@ -15934,8 +15780,8 @@ function parsePositions(attribute, options) {
15934
15780
  const enuMatrix = new import_core12.Matrix4();
15935
15781
  const cartographicOrigin = new import_core12.Vector3(mbs[0], mbs[1], mbs[2]);
15936
15782
  const cartesianOrigin = new import_core12.Vector3();
15937
- import_geospatial11.Ellipsoid.WGS84.cartographicToCartesian(cartographicOrigin, cartesianOrigin);
15938
- (0, import_geospatial12.eastNorthUpToFixedFrame)(import_geospatial11.Ellipsoid.WGS84, cartesianOrigin, enuMatrix);
15783
+ import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(cartographicOrigin, cartesianOrigin);
15784
+ (0, import_geospatial10.eastNorthUpToFixedFrame)(import_geospatial9.Ellipsoid.WGS84, cartesianOrigin, enuMatrix);
15939
15785
  attribute.value = offsetsToCartesians(value, metadata, cartographicOrigin);
15940
15786
  return enuMatrix;
15941
15787
  }
@@ -15954,7 +15800,7 @@ function offsetsToSourcePositions(vertices, metadata = {}, sourceOrigin) {
15954
15800
  function offsetsToCartesians(vertices, metadata = {}, cartographicOrigin) {
15955
15801
  const positions = offsetsToSourcePositions(vertices, metadata, cartographicOrigin);
15956
15802
  for (let i = 0; i < positions.length; i += 3) {
15957
- import_geospatial11.Ellipsoid.WGS84.cartographicToCartesian(positions.subarray(i, i + 3), scratchVector3);
15803
+ import_geospatial9.Ellipsoid.WGS84.cartographicToCartesian(positions.subarray(i, i + 3), scratchVector3);
15958
15804
  positions[i] = scratchVector3.x;
15959
15805
  positions[i + 1] = scratchVector3.y;
15960
15806
  positions[i + 2] = scratchVector3.z;
@@ -16139,14 +15985,14 @@ function getFeatureIdsFromFeatureIndexMetadata(featureIndex) {
16139
15985
  var _a2, _b;
16140
15986
  return (_b = (_a2 = featureIndex == null ? void 0 : featureIndex.metadata) == null ? void 0 : _a2["i3s-feature-ids"]) == null ? void 0 : _b.intArray;
16141
15987
  }
16142
- var import_core12, import_geospatial11, import_geospatial12, scratchVector3, I3S_ATTRIBUTE_TYPE;
15988
+ var import_core12, import_geospatial9, import_geospatial10, scratchVector3, I3S_ATTRIBUTE_TYPE;
16143
15989
  var init_parse_i3s_tile_content = __esm({
16144
15990
  "../tiles-3d/src/i3s/lib/parsers/parse-i3s-tile-content.ts"() {
16145
15991
  "use strict";
16146
15992
  init_schema();
16147
15993
  import_core12 = require("@math.gl/core");
16148
- import_geospatial11 = require("@math.gl/geospatial");
16149
- import_geospatial12 = require("@math.gl/geospatial");
15994
+ import_geospatial9 = require("@math.gl/geospatial");
15995
+ import_geospatial10 = require("@math.gl/geospatial");
16150
15996
  init_loader_utils();
16151
15997
  init_src();
16152
15998
  init_src3();
@@ -16784,14 +16630,14 @@ function normalizeTileNonUrlData(tile) {
16784
16630
  if (tile.mbs) {
16785
16631
  mbs = tile.mbs;
16786
16632
  boundingVolume.sphere = [
16787
- ...import_geospatial13.Ellipsoid.WGS84.cartographicToCartesian(tile.mbs.slice(0, 3)),
16633
+ ...import_geospatial11.Ellipsoid.WGS84.cartographicToCartesian(tile.mbs.slice(0, 3)),
16788
16634
  // cartesian center of sphere
16789
16635
  tile.mbs[3]
16790
16636
  // radius of sphere
16791
16637
  ];
16792
16638
  } else if (tile.obb) {
16793
16639
  boundingVolume.box = [
16794
- ...import_geospatial13.Ellipsoid.WGS84.cartographicToCartesian(tile.obb.center),
16640
+ ...import_geospatial11.Ellipsoid.WGS84.cartographicToCartesian(tile.obb.center),
16795
16641
  // cartesian center of box
16796
16642
  ...tile.obb.halfSize,
16797
16643
  // halfSize
@@ -16861,12 +16707,12 @@ async function normalizeTilesetData(tileset, options, context) {
16861
16707
  lodMetricValue: root.lodMetricValue
16862
16708
  };
16863
16709
  }
16864
- var import_culling5, import_geospatial13;
16710
+ var import_culling5, import_geospatial11;
16865
16711
  var init_parse_i3s = __esm({
16866
16712
  "../tiles-3d/src/i3s/lib/parsers/parse-i3s.ts"() {
16867
16713
  "use strict";
16868
16714
  import_culling5 = require("@math.gl/geometry/culling");
16869
- import_geospatial13 = require("@math.gl/geospatial");
16715
+ import_geospatial11 = require("@math.gl/geospatial");
16870
16716
  init_i3s_nodepages_tiles();
16871
16717
  init_url_utils();
16872
16718
  init_i3s_loader_with_parser();
@@ -20025,7 +19871,7 @@ function normalizePointPositions(positions, center, requestedCoordinateSystem) {
20025
19871
  const cartesianPositions = new Float32Array(positions.length);
20026
19872
  const cartesian = new import_core13.Vector3();
20027
19873
  for (let index = 0; index < positions.length; index += 3) {
20028
- import_geospatial14.Ellipsoid.WGS84.cartographicToCartesian(
19874
+ import_geospatial12.Ellipsoid.WGS84.cartographicToCartesian(
20029
19875
  new import_core13.Vector3([positions[index], positions[index + 1], positions[index + 2]]),
20030
19876
  cartesian
20031
19877
  );
@@ -20104,7 +19950,7 @@ function getTransformedPointCloudBounds(boundingVolume, coordinateFrame) {
20104
19950
  coordinateFrame
20105
19951
  };
20106
19952
  }
20107
- var import_core13, import_geospatial14, I3SPointCloudSource, EARTH_EQUATORIAL_RADIUS;
19953
+ var import_core13, import_geospatial12, I3SPointCloudSource, EARTH_EQUATORIAL_RADIUS;
20108
19954
  var init_i3s_point_cloud_source = __esm({
20109
19955
  "../tiles-3d/src/i3s/i3s-point-cloud-source.ts"() {
20110
19956
  "use strict";
@@ -20112,7 +19958,7 @@ var init_i3s_point_cloud_source = __esm({
20112
19958
  init_schema_utils();
20113
19959
  init_schema();
20114
19960
  import_core13 = require("@math.gl/core");
20115
- import_geospatial14 = require("@math.gl/geospatial");
19961
+ import_geospatial12 = require("@math.gl/geospatial");
20116
19962
  init_src4();
20117
19963
  init_loader_utils();
20118
19964
  init_parse_slpk();
@@ -20902,21 +20748,13 @@ var init_mvt_format = __esm({
20902
20748
  }
20903
20749
  });
20904
20750
 
20905
- // ../tables/src/arrow/transport.ts
20906
- var init_transport = __esm({
20907
- "../tables/src/arrow/transport.ts"() {
20908
- "use strict";
20909
- init_arrow_transport();
20910
- }
20911
- });
20912
-
20913
20751
  // ../tiles/src/mvt/lib/mvt-worker-transport.ts
20914
20752
  function serializeMVTWorkerResult(result, options) {
20915
- if (isArrowTable2(result)) {
20753
+ if (isArrowTable(result)) {
20916
20754
  const bufferCopyMode = getWorkerTransferBufferCopyMode(options);
20917
20755
  return {
20918
20756
  ...result,
20919
- data: dehydrateArrowTable(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
20757
+ data: (0, import_arrow2.dehydrateArrowTable)(result.data, bufferCopyMode ? { copy: bufferCopyMode } : void 0)
20920
20758
  };
20921
20759
  }
20922
20760
  return result;
@@ -20925,12 +20763,12 @@ function deserializeMVTWorkerResult(result) {
20925
20763
  if (isSerializedArrowTable(result)) {
20926
20764
  return {
20927
20765
  ...result,
20928
- data: hydrateArrowTable(result.data)
20766
+ data: (0, import_arrow2.hydrateArrowTable)(result.data)
20929
20767
  };
20930
20768
  }
20931
20769
  return result;
20932
20770
  }
20933
- function isArrowTable2(value) {
20771
+ function isArrowTable(value) {
20934
20772
  const table = value;
20935
20773
  return Boolean(
20936
20774
  table && typeof table === "object" && table.shape === "arrow-table" && table.data && "batches" in table.data
@@ -20946,10 +20784,11 @@ function getWorkerTransferBufferCopyMode(options) {
20946
20784
  var _a2;
20947
20785
  return ((_a2 = options == null ? void 0 : options.core) == null ? void 0 : _a2.workerTransferBufferCopy) ?? (options == null ? void 0 : options.workerTransferBufferCopy);
20948
20786
  }
20787
+ var import_arrow2;
20949
20788
  var init_mvt_worker_transport = __esm({
20950
20789
  "../tiles/src/mvt/lib/mvt-worker-transport.ts"() {
20951
20790
  "use strict";
20952
- init_transport();
20791
+ import_arrow2 = require("@math.gl/arrow");
20953
20792
  }
20954
20793
  });
20955
20794