@loaders.gl/tile-converter 5.0.0-alpha.10 → 5.0.0-alpha.12

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.
Files changed (107) hide show
  1. package/README.md +211 -2
  2. package/bin/converter-v5.js +2 -0
  3. package/dist/converter.min.cjs +162 -163
  4. package/dist/i3s-server/bin/i3s-server.min.cjs +73 -73
  5. package/dist/index.cjs +1933 -2232
  6. package/dist/index.js +1925 -2235
  7. package/dist/v5/adapters.cjs +3186 -208
  8. package/dist/v5/adapters.d.ts +29 -2
  9. package/dist/v5/adapters.js +3202 -196
  10. package/dist/v5/archive-source.d.ts +36 -0
  11. package/dist/v5/browser-tileset-source.d.ts +55 -11
  12. package/dist/v5/browser.cjs +30 -0
  13. package/dist/v5/browser.d.ts +26 -2
  14. package/dist/v5/browser.js +45 -1
  15. package/dist/v5/conversion-api.d.ts +9 -0
  16. package/dist/v5/converter-cli.d.ts +1 -0
  17. package/dist/v5/converter-cli.js +1214 -0
  18. package/dist/v5/core.cjs +515 -50
  19. package/dist/v5/core.d.ts +2 -0
  20. package/dist/v5/core.js +515 -50
  21. package/dist/v5/i3s-mesh-conversion.d.ts +14 -4
  22. package/dist/v5/i3s-mesh-sink.d.ts +25 -0
  23. package/dist/v5/i3s-mesh-source-features.d.ts +13 -0
  24. package/dist/v5/i3s-mesh-source-material.d.ts +5 -0
  25. package/dist/v5/i3s-mesh-source.d.ts +30 -0
  26. package/dist/v5/i3s-selection-source.d.ts +70 -0
  27. package/dist/v5/index.cjs +20 -0
  28. package/dist/v5/index.d.ts +18 -2
  29. package/dist/v5/index.js +31 -1
  30. package/dist/v5/mesh-conversion.d.ts +29 -2
  31. package/dist/v5/mesh-features.d.ts +9 -0
  32. package/dist/v5/mesh-hierarchy.d.ts +47 -0
  33. package/dist/v5/mesh-source-features.d.ts +2 -1
  34. package/dist/v5/mesh-source-schema.d.ts +12 -0
  35. package/dist/v5/mesh-source-texture.d.ts +2 -0
  36. package/dist/v5/mesh-source.d.ts +13 -3
  37. package/dist/v5/mesh-tileset-sink.d.ts +5 -0
  38. package/dist/v5/mesh.d.ts +6 -1
  39. package/dist/v5/node-cli.d.ts +9 -0
  40. package/dist/v5/node-conversion.d.ts +32 -0
  41. package/dist/v5/node-feature-schema.d.ts +3 -0
  42. package/dist/v5/node-i3s-source.d.ts +41 -0
  43. package/dist/v5/node-source.d.ts +47 -0
  44. package/dist/v5/node.cjs +900 -0
  45. package/dist/v5/node.d.ts +6 -0
  46. package/dist/v5/node.js +877 -0
  47. package/dist/v5/point-cloud-file.d.ts +83 -0
  48. package/dist/v5/point-cloud-potree.d.ts +47 -0
  49. package/dist/v5/point-cloud-source-encoder.d.ts +4 -7
  50. package/dist/v5/point-cloud-spatial.d.ts +22 -0
  51. package/dist/v5/point-cloud-tileset-sink.d.ts +28 -0
  52. package/dist/v5/point-cloud-tileset.d.ts +44 -0
  53. package/dist/v5/point-cloud.d.ts +26 -1
  54. package/dist/v5/resource-fetcher.d.ts +18 -0
  55. package/dist/v5/resource-manifest.d.ts +10 -1
  56. package/dist/v5/selected-mesh-source.d.ts +53 -0
  57. package/dist/v5/spatial-conversion.d.ts +3 -1
  58. package/package.json +33 -25
  59. package/src/index.ts +4 -1
  60. package/src/v4/3d-tiles-converter/helpers/load-i3s.ts +2 -4
  61. package/src/v4/converter-cli.ts +8 -2
  62. package/src/v4/i3s-converter/helpers/load-3d-tiles.ts +3 -51
  63. package/src/v4/i3s-converter/helpers/node-index-document.ts +5 -2
  64. package/src/v4/i3s-converter/helpers/preprocess-3d-tiles.ts +1 -1
  65. package/src/v4/i3s-converter/json-templates/store.ts +2 -1
  66. package/src/v5/adapters.ts +69 -2
  67. package/src/v5/archive-source.ts +235 -0
  68. package/src/v5/browser-tileset-source.ts +418 -48
  69. package/src/v5/browser.ts +81 -2
  70. package/src/v5/conversion-api.ts +69 -9
  71. package/src/v5/converter-cli.ts +28 -0
  72. package/src/v5/core.ts +6 -0
  73. package/src/v5/i3s-mesh-conversion.ts +97 -19
  74. package/src/v5/i3s-mesh-sink.ts +351 -0
  75. package/src/v5/i3s-mesh-source-features.ts +279 -0
  76. package/src/v5/i3s-mesh-source-material.ts +157 -0
  77. package/src/v5/i3s-mesh-source.ts +228 -0
  78. package/src/v5/i3s-selection-source.ts +298 -0
  79. package/src/v5/index.ts +60 -2
  80. package/src/v5/mesh-conversion.ts +61 -11
  81. package/src/v5/mesh-draco.ts +47 -3
  82. package/src/v5/mesh-features.ts +319 -0
  83. package/src/v5/mesh-hierarchy.ts +648 -0
  84. package/src/v5/mesh-source-features.ts +73 -10
  85. package/src/v5/mesh-source-schema.ts +134 -0
  86. package/src/v5/mesh-source-texture.ts +47 -0
  87. package/src/v5/mesh-source.ts +99 -25
  88. package/src/v5/mesh-tileset-sink.ts +1 -1
  89. package/src/v5/mesh.ts +16 -7
  90. package/src/v5/node-cli.ts +197 -0
  91. package/src/v5/node-conversion.ts +345 -0
  92. package/src/v5/node-feature-schema.ts +155 -0
  93. package/src/v5/node-i3s-source.ts +181 -0
  94. package/src/v5/node-source.ts +328 -0
  95. package/src/v5/node.ts +16 -0
  96. package/src/v5/point-cloud-conversion.ts +9 -1
  97. package/src/v5/point-cloud-file.ts +306 -0
  98. package/src/v5/point-cloud-potree.ts +130 -0
  99. package/src/v5/point-cloud-source-encoder.ts +31 -20
  100. package/src/v5/point-cloud-spatial.ts +280 -0
  101. package/src/v5/point-cloud-tileset-sink.ts +234 -0
  102. package/src/v5/point-cloud-tileset.ts +137 -0
  103. package/src/v5/point-cloud.ts +159 -32
  104. package/src/v5/resource-fetcher.ts +113 -0
  105. package/src/v5/resource-manifest.ts +40 -5
  106. package/src/v5/selected-mesh-source.ts +384 -0
  107. package/src/v5/spatial-conversion.ts +161 -6
@@ -0,0 +1,83 @@
1
+ import type { COPCTileSource, COPCSourceLoaderOptions } from '@loaders.gl/copc';
2
+ import { PotreeSourceLoader } from '@loaders.gl/potree';
3
+ import type { PotreeDataset, PotreeWriterNode, PotreeWriterOptions, PotreeSourceLoaderOptions } from '@loaders.gl/potree';
4
+ import type { Mesh, MeshArrowTable, MeshGeometry } from '@loaders.gl/schema';
5
+ /** Explicit local-file input; no format is inferred from an extension. */
6
+ export type OpenPointCloudFileOptions = {
7
+ /** Maximum retained input Blob size. This does not bound decoded heap. */
8
+ readonly maxFileBytes: number;
9
+ /** Cancellation before/after initialization and during archived resource reads. */
10
+ readonly signal?: AbortSignal;
11
+ } & ({
12
+ /** COPC is a native single LAZ file. */
13
+ readonly format: 'copc';
14
+ /** Existing COPC source coordinate and decoder controls. */
15
+ readonly sourceOptions?: COPCSourceLoaderOptions;
16
+ } | {
17
+ /** A loaders.gl STORE ZIP convention, not a native Potree archive standard. */
18
+ readonly format: 'potree-zip';
19
+ /** Maximum ZIP entry count, including metadata; default 100000. */
20
+ readonly maxEntries?: number;
21
+ /** Maximum requested ZIP resource/range bytes; default 64 MiB. */
22
+ readonly maxResourceBytes?: number;
23
+ /** Explicit metadata path when it is not at the ZIP root. */
24
+ readonly metadataPath?: string;
25
+ /** Existing Potree parser controls; the bundle owns its isolated fetch transport. */
26
+ readonly sourceOptions?: PotreeSourceLoaderOptions;
27
+ });
28
+ /** An initialized source with an owned local file lifetime. */
29
+ export interface OpenedPointCloudFile {
30
+ /** Lazy node access through the existing unified source APIs. */
31
+ readonly source: ReturnType<typeof PotreeSourceLoader.createDataSource> | COPCTileSource;
32
+ /** Closes the source and rejects subsequent bundle reads; idempotent. */
33
+ readonly close: () => Promise<void>;
34
+ }
35
+ /** Complete Potree dataset packaging controls. */
36
+ export interface EncodePotreeArchiveOptions {
37
+ /** Existing dataset version, precision, hierarchy and encoded-byte limits. */
38
+ readonly potree?: PotreeWriterOptions['potree'];
39
+ /** Maximum completed STORE ZIP32 bytes, checked before archive allocation. */
40
+ readonly maxArchiveBytes: number;
41
+ }
42
+ /**
43
+ * Writes a complete Potree 1.x/2.0 dataset to a deterministic uncompressed ZIP32 Blob.
44
+ * This is a loaders.gl bundle convention, not a native Potree archive standard. Metadata sits
45
+ * at the root with original relative resource paths. Writer version/attribute/precision gates
46
+ * apply. Inputs, dataset bytes, ZIP temporaries and the returned Blob are separate memory.
47
+ * @param input - Decoded points or caller-organized additive nodes; no LOD sampling is inferred.
48
+ * @param options - Dataset writer controls and final archive budget.
49
+ * @returns A downloadable ZIP Blob that openPointCloudFile can read incrementally.
50
+ */
51
+ export declare function encodePotreeArchive(input: Mesh | MeshArrowTable | readonly PotreeWriterNode[], options: EncodePotreeArchiveOptions): Promise<Blob>;
52
+ /** Packages already encoded Potree files without encoding or sampling points a second time. */
53
+ export declare function encodePotreeDatasetArchive(dataset: PotreeDataset, maxArchiveBytes: number, signal?: AbortSignal): Promise<Blob>;
54
+ /**
55
+ * Opens a COPC Blob or a Potree STORE ZIP without extracting the complete dataset.
56
+ * ZIP directory/local headers are checked before constructing the Potree source; modern node
57
+ * requests slice only their archived byte ranges. DEFLATE, encrypted entries, ambiguous
58
+ * metadata and noncanonical paths fail explicitly. Partial reads do not verify whole-entry CRCs.
59
+ * Legacy Potree retains its existing coordinate behavior; modern Potree retains native coordinates.
60
+ * COPC uses its existing source coordinate policy. Applications own CRS preparation and conversion.
61
+ * @param input - Immutable local file/Blob, bounded by maxFileBytes.
62
+ * @param options - Explicit format, source controls and archive transport limits.
63
+ * @returns An initialized lazy source; close it when conversion finishes.
64
+ */
65
+ export declare function openPointCloudFile(input: Blob, options: OpenPointCloudFileOptions): Promise<OpenedPointCloudFile>;
66
+ /** Explicit opt-in mesh-to-point selection. */
67
+ export interface ExtractMeshVerticesOptions {
68
+ /** Attribute names to retain in addition to POSITION; all other semantics are omitted explicitly. */
69
+ readonly attributes: readonly string[];
70
+ /** Maximum stored vertices, not expanded triangle corners. */
71
+ readonly maxPoints: number;
72
+ }
73
+ /**
74
+ * Harvests one point per stored vertex from already placed triangle geometry.
75
+ * Does not expand indices, deduplicate coincident vertices or sample triangle interiors. Output
76
+ * shares immutable attribute arrays. Materials, features, topology and unselected attributes are
77
+ * discarded by this explicit opt-in; select compatible attributes before destination encoding.
78
+ * For tiles, use the mesh source adapters first so node/RTC/tile transforms are applied once.
79
+ * @param mesh - Decoded triangle geometry in the desired absolute coordinate frame.
80
+ * @param options - Explicit retained attributes and stored-vertex count budget.
81
+ * @returns An unindexed point Mesh ready for point-cloud writers or the dynamic tiler.
82
+ */
83
+ export declare function extractMeshVertices(mesh: MeshGeometry, options: ExtractMeshVerticesOptions): Mesh;
@@ -0,0 +1,47 @@
1
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/schema';
2
+ import { type PointCloudTilerOptions } from '@loaders.gl/schema-utils';
3
+ import type { PotreeDataset, PotreeWriterOptions } from '@loaders.gl/potree';
4
+ /** Bounded authoring of one decoded dataset in its already placed native coordinates. */
5
+ export interface ConvertPointCloudToPotreeOptions {
6
+ /** Explicit CRS declaration written verbatim; coordinates are not reprojected. */
7
+ readonly projection: string;
8
+ /** Maximum bytes retained across all gathered node attribute buffers. */
9
+ readonly maxGatheredBytes: number;
10
+ /** Maximum complete encoded dataset bytes, including metadata and hierarchy. */
11
+ readonly maxOutputBytes: number;
12
+ /** Input, index, per-node and node-count limits of the shared dynamic tiler. */
13
+ readonly tiling?: Omit<PointCloudTilerOptions, 'signal'>;
14
+ /** Existing version, precision, spacing and hierarchy controls. */
15
+ readonly potree?: Omit<NonNullable<PotreeWriterOptions['potree']>, 'projection' | 'signal' | 'maxOutputBytes'>;
16
+ /** Also package the completed files as a loaders.gl STORE ZIP32 bundle. */
17
+ readonly archive?: {
18
+ readonly maxArchiveBytes: number;
19
+ };
20
+ /** Cooperative cancellation during indexing, gathering, writing and packaging. */
21
+ readonly signal?: AbortSignal;
22
+ }
23
+ /** Complete Potree files; no partial dataset is returned after a failure. */
24
+ export interface ConvertedPointCloudPotree {
25
+ /** Exact input row count, emitted once across the additive octree. */
26
+ readonly pointCount: number;
27
+ /** Number of connected octree nodes, including an empty root for empty input. */
28
+ readonly nodeCount: number;
29
+ /** Metadata and encoded resources; applications own storage. */
30
+ readonly dataset: PotreeDataset;
31
+ /** Optional downloadable bundle; applications own object URL and saving lifetimes. */
32
+ readonly archive?: Blob;
33
+ }
34
+ /**
35
+ * Connects the portable point tiler to the existing Potree 1.x/2.0 dataset writer.
36
+ * Retains additive octree addresses and every source row exactly once, including terminal
37
+ * overflow. Input must be immutable, unindexed decoded points already placed in the declared
38
+ * CRS. No origins, transforms, reprojection, attribute mappings or surface sampling are inferred.
39
+ * The writer rejects attributes or precision that the selected version cannot represent.
40
+ * Gathered nodes are bounded separately from source buffers, indexes, encoded output and ZIP
41
+ * temporaries. This is in-memory authoring, not streaming ingestion or a peak-heap guarantee.
42
+ * The shared tiler's sample coverage bound is not a qualified viewer LOD/error contract.
43
+ * @param input - One decoded point Mesh or MeshArrowTable, including loader output.
44
+ * @param options - Explicit native CRS, resource budgets and existing writer controls.
45
+ * @returns A complete dataset and optional bundle after releasing the owned tiler.
46
+ */
47
+ export declare function convertPointCloudToPotree(input: Mesh | MeshArrowTable, options: ConvertPointCloudToPotreeOptions): Promise<ConvertedPointCloudPotree>;
@@ -1,21 +1,18 @@
1
1
  import type { PointCloudBoundingVolume, PointCloudCoordinateSystem, PointCloudTilesetSource, TilesetSpatialReference } from '@loaders.gl/tiles';
2
- import type { EncodePointCloudTileOptions } from './point-cloud.js';
2
+ import type { PointCloudSpatialOptions } from './point-cloud-spatial.js';
3
+ import type { EncodePointCloudTileOptions, EncodedPointCloudTile } from './point-cloud.js';
3
4
  import type { PointCloudSourceTile, TraversePointCloudSourceOptions } from '@loaders.gl/tile-converter/v5/core';
4
5
  /** Traversal and per-tile encoding options for a point-cloud source. */
5
- export type EncodePointCloudSourceOptions = TraversePointCloudSourceOptions & {
6
+ export type EncodePointCloudSourceOptions = TraversePointCloudSourceOptions & Partial<Pick<PointCloudSpatialOptions, 'spatialContext' | 'normalReferenceFrame'>> & {
6
7
  /** Select encoder options for each source tile with content, using its header and decoded data. */
7
8
  readonly getTileEncodingOptions?: (sourceTile: PointCloudSourceTile) => EncodePointCloudTileOptions;
8
9
  };
9
10
  /** A PNTS resource paired with the source placement metadata needed to package its tile. */
10
- export type EncodedPointCloudSourceTile = {
11
+ export type EncodedPointCloudSourceTile = EncodedPointCloudTile & {
11
12
  /** Stable source tile identifier. */
12
13
  readonly id: string;
13
14
  /** Original source hierarchy and bounds. */
14
15
  readonly header: PointCloudSourceTile['header'];
15
- /** Encoded point-cloud tile content. */
16
- readonly pnts: ArrayBuffer;
17
- /** Number of point records encoded. */
18
- readonly pointCount: number;
19
16
  /** Coordinate system used by the returned point positions. */
20
17
  readonly coordinateSystem: PointCloudCoordinateSystem;
21
18
  /** Origin to add to source-relative point positions. */
@@ -0,0 +1,22 @@
1
+ import type { I3SConversionSpatialContext, PointCloudSourceTile } from '@loaders.gl/tile-converter/v5/core';
2
+ /** Explicit spatial preparation for source point positions before PNTS encoding. */
3
+ export interface PointCloudSpatialOptions {
4
+ /** Context for the decoded content's source CRS, units and elevation placement. */
5
+ readonly spatialContext: I3SConversionSpatialContext;
6
+ /** Required for point normals; prevents guessing their I3S vector basis. */
7
+ readonly normalReferenceFrame?: 'earth-centered' | 'vertex-reference-frame';
8
+ /** Cancellation checked before and after application-owned elevation sampling. */
9
+ readonly signal?: AbortSignal;
10
+ }
11
+ /**
12
+ * Resolves renderer placement and transforms one point batch to absolute target coordinates.
13
+ * Cartesian affine placement and longitude/latitude offsets are applied before the shared CRS
14
+ * operation. Ambiguous default/meter-offset representations and repeated source transforms fail
15
+ * explicitly. The caller declares source metadata through the context; metadata on content must
16
+ * agree. Source arrays and traversal headers remain unchanged. Output bounds describe decoded
17
+ * points, not the source LOD volume; archive sinks rebuild their bounds from encoded points.
18
+ * @param sourceTile - A decoded source tile with packed Arrow positions.
19
+ * @param options - Source spatial policy, optional normal frame and cancellation.
20
+ * @returns Prepared target-frame point content, or the unchanged empty tile.
21
+ */
22
+ export declare function transformPointCloudSourceTile(sourceTile: PointCloudSourceTile, options: PointCloudSpatialOptions): Promise<PointCloudSourceTile>;
@@ -0,0 +1,28 @@
1
+ import type { BrowserTileConversionFile, TileConversionSink } from '@loaders.gl/tile-converter/v5/core';
2
+ import type { EncodedPointCloudSourceTile } from './point-cloud-source-encoder.js';
3
+ /** Output limits and geometric error for independent ECEF point tiles. */
4
+ export interface PointCloudTilesetSinkOptions {
5
+ /** Maximum retained PNTS and tileset JSON bytes, excluding peak serialization memory. */
6
+ readonly maxTotalBytes: number;
7
+ /** Maximum independent tile placements retained by the sink. */
8
+ readonly maxTiles: number;
9
+ /** Leaf error in meters, including source sampling error and measured position rounding. */
10
+ readonly geometricError: number;
11
+ }
12
+ /** Atomic flat 3D Tiles package suitable for the existing 3TZ archive adapter. */
13
+ export interface PointCloudTilesetSink extends TileConversionSink<EncodedPointCloudSourceTile> {
14
+ /** Returns named PNTS files and tileset.json after successful finalization; empty after abort. */
15
+ getFiles(): readonly BrowserTileConversionFile[];
16
+ }
17
+ /**
18
+ * Packages independent point tiles as a bounded 3D Tiles 1.0 collection with an ADD root.
19
+ * Requires unmodified encoder outputs in declared EPSG:4978 xyz meters and ellipsoidal heights,
20
+ * cartesian positions, zero source origin and no additional placement transform. PNTS RTC_CENTER
21
+ * is already encoded and is applied once to bounds. Geographic/projected/offset source frames
22
+ * must be converted before this sink. This authors a flat partial dataset, not source LOD;
23
+ * callers must select independent, non-overlapping samples and supply their sampling error.
24
+ * Use createTileConversionArchive with format 3tz to package the finalized files.
25
+ * @param options - Retained byte/tile limits and explicit leaf geometric error.
26
+ * @returns A sink exposing the completed package atomically.
27
+ */
28
+ export declare function createPointCloudTilesetSink(options: PointCloudTilesetSinkOptions): PointCloudTilesetSink;
@@ -0,0 +1,44 @@
1
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/schema';
2
+ import type { PointCloudTilerOptions } from '@loaders.gl/schema-utils';
3
+ import type { TilesetSpatialReference } from '@loaders.gl/tiles';
4
+ import type { BrowserTileConversionFile, TileConversionProgress, TileConversionReport } from '@loaders.gl/tile-converter/v5/core';
5
+ import type { PointCloudTilesetSinkOptions } from './point-cloud-tileset-sink.js';
6
+ import type { TileConversionArchiveOptions } from './conversion-archive.js';
7
+ /** Bounded authoring of a complete decoded ECEF point dataset. */
8
+ export interface ConvertPointCloudToTilesetOptions extends PointCloudTilesetSinkOptions {
9
+ /** Explicit native EPSG:4978 XYZ meters with ellipsoidal heights. No CRS is inferred. */
10
+ readonly spatialReference: TilesetSpatialReference;
11
+ /** In-memory input, index, gathered-tile and node limits; defaults belong to PointCloudTiler. */
12
+ readonly tiling?: Omit<PointCloudTilerOptions, 'signal'>;
13
+ /** Also create an indexed 3TZ Blob within this final archive-size budget. */
14
+ readonly archive?: Pick<TileConversionArchiveOptions, 'maxArchiveBytes'>;
15
+ /** Cooperative cancellation during indexing, traversal, encoding and packaging. */
16
+ readonly signal?: AbortSignal;
17
+ /** PNTS conversion progress; excludes tileset JSON and optional archive packaging. */
18
+ readonly onProgress?: (progress: TileConversionProgress) => void;
19
+ }
20
+ /** Completed point authoring result; no partial files are returned on failure. */
21
+ export interface ConvertedPointCloudTileset {
22
+ /** Exact number of input points, each emitted once across the complete collection. */
23
+ readonly pointCount: number;
24
+ /** PNTS resource counts and bytes; input bytes count gathered Arrow column buffers. */
25
+ readonly report: TileConversionReport;
26
+ /** PNTS resources and tileset.json, including JSON in the retained output byte budget. */
27
+ readonly files: readonly BrowserTileConversionFile[];
28
+ /** Optional indexed 3TZ Blob. Applications own saving and object URL lifetimes. */
29
+ readonly archive?: Blob;
30
+ }
31
+ /**
32
+ * Tiles decoded point Mesh/Arrow data and authors a flat additive 3D Tiles 1.0 collection.
33
+ * All input rows are emitted once, including remaining rows at the tiler's maximum depth.
34
+ * Per-tile RTC centers reduce float32 rounding; geometricError gates measured reconstruction error.
35
+ * The flat collection does not preserve octree LOD or provide a sampling-error guarantee.
36
+ * Input must remain immutable until completion. Arrow normalization can copy buffers; retained
37
+ * input, row indexes, gathered tiles, output Blobs and optional ZIP temporaries are separate memory.
38
+ * This is bounded in-memory authoring, not streaming ingestion or an out-of-core converter.
39
+ * Unsupported PNTS attributes fail; callers must explicitly map or remove them beforehand.
40
+ * @param input - One decoded unindexed point-list with finite floating-point XYZ positions.
41
+ * @param options - Explicit ECEF frame, precision and resource limits, and optional 3TZ packaging.
42
+ * @returns Completed files and report after releasing the privately owned dynamic source.
43
+ */
44
+ export declare function convertPointCloudToTileset(input: Mesh | MeshArrowTable, options: ConvertPointCloudToTilesetOptions): Promise<ConvertedPointCloudTileset>;
@@ -1,13 +1,28 @@
1
- import type { Mesh, MeshArrowTable } from '@loaders.gl/schema';
1
+ import type { Mesh, MeshArrowTable, MeshAttribute } from '@loaders.gl/schema';
2
2
  /** Options for encoding one Arrow or mesh point batch as a 3D Tiles point tile. */
3
3
  export interface EncodePointCloudTileOptions {
4
4
  /** Optional origin subtracted from absolute positions and stored as the PNTS RTC_CENTER. */
5
5
  readonly rtcCenter?: readonly [number, number, number];
6
+ /** Maximum Euclidean position reconstruction error in source units; omission permits float32 rounding. */
7
+ readonly maxPositionError?: number;
6
8
  /** Optional source-wide RGBA color stored as the PNTS CONSTANT_RGBA property. */
7
9
  readonly constantRGBA?: readonly number[];
8
10
  /** Optional per-point values indexed by the tile's `BATCH_ID` attribute. */
9
11
  readonly batchTableJson?: Readonly<Record<string, readonly (string | number)[]>>;
10
12
  }
13
+ /** Encoded PNTS and measured placement information from its float32 POSITION stream. */
14
+ export interface EncodedPointCloudTile {
15
+ /** Self-contained PNTS payload. */
16
+ readonly pnts: ArrayBuffer;
17
+ /** Actual number of encoded points. */
18
+ readonly pointCount: number;
19
+ /** RTC center added to encoded positions; zero when no RTC center was selected. */
20
+ readonly rtcCenter: readonly [number, number, number];
21
+ /** Axis-aligned bounds of encoded positions before adding the RTC center. */
22
+ readonly localBoundingBox: readonly [readonly number[], readonly number[]];
23
+ /** Maximum Euclidean error after reconstructing absolute positions, in source units. */
24
+ readonly maximumPositionError: number;
25
+ }
11
26
  /**
12
27
  * Encodes one mesh or Mesh Arrow point batch as a PNTS resource.
13
28
  *
@@ -22,3 +37,13 @@ export interface EncodePointCloudTileOptions {
22
37
  * @returns A 3D Tiles PNTS resource.
23
38
  */
24
39
  export declare function encodePointCloudTile(pointBatch: Mesh | MeshArrowTable, options?: EncodePointCloudTileOptions): ArrayBuffer;
40
+ /**
41
+ * Encodes a point batch and measures its decoded float32 bounds and position rounding.
42
+ * The optional error gate runs before PNTS serialization. Source arrays remain unchanged.
43
+ * @param pointBatch - One mesh or Arrow point batch.
44
+ * @param options - RTC center, precision gate, appearance and batch metadata.
45
+ * @returns PNTS bytes paired with bounds, RTC placement and maximum position error.
46
+ */
47
+ export declare function encodePointCloudTileWithMetadata(pointBatch: Mesh | MeshArrowTable, options?: EncodePointCloudTileOptions): EncodedPointCloudTile;
48
+ /** Decodes packed point positions to doubles before applying a spatial operation. */
49
+ export declare function decodePointCloudPositions(attribute: MeshAttribute | undefined): Float64Array;
@@ -0,0 +1,18 @@
1
+ /** One aggregate transport budget shared by selected contents and their dependencies. */
2
+ export interface TileConversionResourceFetcherOptions {
3
+ /** Maximum total response bytes, including previously inspected root bytes. */
4
+ readonly maxInputBytes: number;
5
+ /** Previously consumed input bytes, such as the inspected tileset JSON. */
6
+ readonly initialInputBytes?: number;
7
+ /** Application transport; also enables archive-backed or hermetic resolution. */
8
+ readonly fetcher?: typeof fetch;
9
+ /** Conversion cancellation, forwarded to every dependency request. */
10
+ readonly signal?: AbortSignal;
11
+ }
12
+ /**
13
+ * Wraps application fetch with a shared byte budget and conversion cancellation.
14
+ * Each requested resource is charged, including repeated requests; HTTP(S), Blob and embedded data
15
+ * URLs are accepted. Response streams are canceled on overflow or failure. The complete bounded
16
+ * response is retained for codecs; this does not bound their decoded allocations.
17
+ */
18
+ export declare function createTileConversionResourceFetcher(options: TileConversionResourceFetcherOptions): typeof fetch;
@@ -32,6 +32,14 @@ export interface ManifestBackedTileConversionSinkOptions<TResource> {
32
32
  readonly sink: TileConversionSink<TResource>;
33
33
  /** Persistence adapter for snapshots written after each resource. */
34
34
  readonly manifestStore: TileResourceManifestStore;
35
+ /** Optional cap on unique checkpoint entries loaded or written; defaults to no cap. */
36
+ readonly maxResources?: number;
37
+ /**
38
+ * Checks destination bytes before skipping a matching checkpoint. Return true only when
39
+ * stored bytes match the entry's size and fingerprint; false rewrites the resource.
40
+ * Without this callback the caller guarantees checkpointed destination bytes remain intact.
41
+ */
42
+ readonly verifyResource?: (entry: TileResourceManifestEntry, signal?: AbortSignal) => Promise<boolean>;
35
43
  /** Stable profile-specific path or resource key. */
36
44
  readonly getResourceId: (resource: TResource) => string;
37
45
  /** Byte length used to detect changed content under an existing resource ID. */
@@ -50,7 +58,8 @@ export interface ManifestBackedTileConversionSinkOptions<TResource> {
50
58
  * including writes skipped because the matching resource was already present. A graceful abort
51
59
  * clears the manifest checkpoint before asking the destination to clean partial output, so the
52
60
  * next run starts cleanly. A process interruption that does not call `abort` can resume from its
53
- * last saved checkpoint.
61
+ * last saved checkpoint. Optional destination verification repairs missing or changed stored
62
+ * resources before treating them as complete. maxResources caps unique checkpoint entries.
54
63
  *
55
64
  * @param options - Destination, manifest store, stable IDs, byte measurement, and fingerprinting.
56
65
  * @returns A `TileConversionSink` with resumable per-resource progress.
@@ -0,0 +1,53 @@
1
+ import type { DracoLibraryOptions } from '@loaders.gl/draco/bundled';
2
+ import { createTiles3DConversionSpatialContext } from '@loaders.gl/tile-converter/v5/core';
3
+ import type { BrowserTilesetConversionInspection, BrowserTilesetConversionInputResource, TileConversionSource } from '@loaders.gl/tile-converter/v5/core';
4
+ import type { MeshSourceResource, MeshSourceFeatureOptions } from '@loaders.gl/tile-converter/v5/adapters';
5
+ /** Required transport, decoded geometry, retained output, and archive budgets for this demo. */
6
+ export declare const SELECTED_MESH_LIMITS: {
7
+ /** Root JSON plus selected content transport bytes; also the decoded geometry/image/feature byte gate. */
8
+ readonly maxInputBytes: number;
9
+ /** Maximum declared content placements inspected. */
10
+ readonly maxInputResources: 1000;
11
+ /** Maximum inspected root/external document placements. */
12
+ readonly maxTilesetDocuments: 32;
13
+ /** Maximum explicitly selected content placements in one partial archive. */
14
+ readonly maxSelectedResources: 64;
15
+ /** Maximum primitive placements authored across all selected contents. */
16
+ readonly maxMeshResources: 64;
17
+ /** Maximum retained file bytes and final archive bytes. */
18
+ readonly maxOutputBytes: number;
19
+ /** Maximum measured reconstruction error in meters. */
20
+ readonly maxPositionError: 0.01;
21
+ };
22
+ /** Injected transport and decoder assets for the bounded selected mesh profile. */
23
+ export interface SelectedMeshSourceOptions {
24
+ /** Require a complete qualified explicit tree; pair with createMeshHierarchyTilesetSink. */
25
+ readonly preserveHierarchy?: boolean;
26
+ /** Inspected content placement identifiers; one to 64 distinct selections. */
27
+ readonly resourceIds: readonly string[];
28
+ /** Cancellation across qualification, raw reads and decoding. */
29
+ readonly signal: AbortSignal;
30
+ /** Application-owned decoder asset locations or modules. */
31
+ readonly dracoLibraryOptions: DracoLibraryOptions;
32
+ /** Transport for decoded buffers/images, confined by a platform adapter when local. */
33
+ readonly fetcher?: typeof fetch;
34
+ /** Optional source owning the raw input lifetime, such as a Node file/archive adapter. */
35
+ readonly source?: TileConversionSource<BrowserTilesetConversionInspection, BrowserTilesetConversionInputResource>;
36
+ /** Explicit feature mapping, or the qualified inline structural metadata profile. */
37
+ readonly features?: MeshSourceFeatureOptions;
38
+ /** Lower the shared 16 MiB transport and decoded mesh limit. */
39
+ readonly maxInputBytes?: number;
40
+ }
41
+ /** Qualified selected-mesh decoding and source error policy. */
42
+ export interface SelectedMeshConversionSource {
43
+ /** Lazy source that releases each dedicated mesh runtime after use. */
44
+ readonly source: TileConversionSource<BrowserTilesetConversionInspection, MeshSourceResource>;
45
+ /** Native ECEF coordinate context, qualified before reading mesh content. */
46
+ readonly spatialContext: ReturnType<typeof createTiles3DConversionSpatialContext>;
47
+ /** Conservative metric source error plus the position reconstruction allowance. */
48
+ readonly geometricError: number;
49
+ }
50
+ /** Qualifies and constructs a lazy selected mesh source without platform I/O or output ownership. */
51
+ export declare function createSelectedMeshConversionSource(inspection: BrowserTilesetConversionInspection, options: SelectedMeshSourceOptions): Promise<SelectedMeshConversionSource>;
52
+ /** Charges geometry, encoded image bytes, triangle associations and Arrow columns after extraction. */
53
+ export declare function measureMeshBytes(resource: MeshSourceResource): number;
@@ -1,4 +1,4 @@
1
- import type { CreateTilesetSpatialReferenceOptions, I3SSpatialBounds, I3STransformedPositions, Tiles3DSpatialBoundingVolume, TilesetSpatialOptions, TilesetSpatialReference } from '@loaders.gl/tiles';
1
+ import type { CreateTilesetSpatialReferenceOptions, I3SSpatialBounds, I3STransformedPositions, I3STransformedGeometry, Tiles3DSpatialBoundingVolume, TilesetSpatialOptions, TilesetSpatialReference } from '@loaders.gl/tiles';
2
2
  /** Portable coordinate operations and output metadata for a 3D Tiles conversion. */
3
3
  export interface Tiles3DConversionSpatialContext {
4
4
  /** Source and selected target CRS, height reference, units, and transformation state. */
@@ -16,6 +16,8 @@ export interface I3SConversionSpatialContext {
16
16
  readonly spatialReference: TilesetSpatialReference;
17
17
  /** Transform absolute I3S positions after applying declared height units and placement. */
18
18
  transformPositions(positions: ArrayLike<number>, sourceOrigin: ArrayLike<number>): I3STransformedPositions;
19
+ /** Transform absolute conversion geometry without intermediate float32 rounding. */
20
+ transformGeometryAsync(positions: ArrayLike<number>, normals?: ArrayLike<number>, normalReferenceFrame?: string): Promise<I3STransformedGeometry>;
19
21
  /** Transform absolute I3S positions when terrain or scene sampling is asynchronous. */
20
22
  transformPositionsAsync(positions: ArrayLike<number>, sourceOrigin: ArrayLike<number>): Promise<I3STransformedPositions>;
21
23
  /** Transform packed normals using the corresponding source positions. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tile-converter",
3
- "version": "5.0.0-alpha.10",
3
+ "version": "5.0.0-alpha.12",
4
4
  "description": "Converter",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,12 +44,18 @@
44
44
  "types": "./dist/v5/adapters.d.ts",
45
45
  "import": "./dist/v5/adapters.js",
46
46
  "require": "./dist/v5/adapters.cjs"
47
+ },
48
+ "./v5/node": {
49
+ "types": "./dist/v5/node.d.ts",
50
+ "import": "./dist/v5/node.js",
51
+ "require": "./dist/v5/node.cjs"
47
52
  }
48
53
  },
49
54
  "sideEffects": false,
50
55
  "bin": {
51
56
  "i3s-server": "./bin/i3s-server.js",
52
- "tile-converter": "./bin/converter.js"
57
+ "tile-converter": "./bin/converter.js",
58
+ "tile-converter-v5": "./bin/converter-v5.js"
53
59
  },
54
60
  "files": [
55
61
  "src",
@@ -71,30 +77,32 @@
71
77
  "build-converter-bundle": "esbuild src/v4/converter-cli.ts --outfile=dist/converter.min.cjs --platform=node --target=esnext,node14 --external:join-images --minify --bundle --define:__VERSION__=\\\"$npm_package_version\\\"",
72
78
  "build-i3s-server-bundle": "esbuild src/v4/i3s-server/bin/www.ts --outfile=dist/i3s-server/bin/i3s-server.min.cjs --platform=node --target=esnext,node14 --minify --bundle --define:__VERSION__=\\\"$npm_package_version\\\"",
73
79
  "copy-certificates": "cp -R src/v4/i3s-server/certs dist/i3s-server",
74
- "build-v5-entrypoints": "esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=esm && esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs"
80
+ "build-v5-entrypoints": "esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=esm && esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs && esbuild src/v5/node.ts src/v5/converter-cli.ts --bundle --packages=external --external:@loaders.gl/* --platform=node --outdir=dist/v5 --format=esm && esbuild src/v5/node.ts --bundle --packages=external --external:@loaders.gl/* --platform=node --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs"
75
81
  },
76
82
  "dependencies": {
77
- "@loaders.gl/3d-tiles": "5.0.0-alpha.10",
78
- "@loaders.gl/compression": "5.0.0-alpha.10",
79
- "@loaders.gl/crypto": "5.0.0-alpha.10",
80
- "@loaders.gl/draco": "5.0.0-alpha.10",
81
- "@loaders.gl/gltf": "5.0.0-alpha.10",
82
- "@loaders.gl/i3s": "5.0.0-alpha.10",
83
- "@loaders.gl/images": "5.0.0-alpha.10",
84
- "@loaders.gl/loader-utils": "5.0.0-alpha.10",
85
- "@loaders.gl/polyfills": "5.0.0-alpha.10",
86
- "@loaders.gl/schema": "5.0.0-alpha.10",
87
- "@loaders.gl/schema-utils": "5.0.0-alpha.10",
88
- "@loaders.gl/textures": "5.0.0-alpha.10",
89
- "@loaders.gl/tiles": "5.0.0-alpha.10",
90
- "@loaders.gl/worker-utils": "5.0.0-alpha.10",
91
- "@loaders.gl/zip": "5.0.0-alpha.10",
92
- "@math.gl/core": "5.0.0-alpha.13",
93
- "@math.gl/crs": "5.0.0-alpha.13",
94
- "@math.gl/culling": "5.0.0-alpha.13",
95
- "@math.gl/geoid": "5.0.0-alpha.13",
96
- "@math.gl/geometry-utils": "5.0.0-alpha.13",
97
- "@math.gl/geospatial": "5.0.0-alpha.13",
83
+ "@loaders.gl/3d-tiles": "5.0.0-alpha.12",
84
+ "@loaders.gl/compression": "5.0.0-alpha.12",
85
+ "@loaders.gl/copc": "5.0.0-alpha.12",
86
+ "@loaders.gl/crypto": "5.0.0-alpha.12",
87
+ "@loaders.gl/draco": "5.0.0-alpha.12",
88
+ "@loaders.gl/gltf": "5.0.0-alpha.12",
89
+ "@loaders.gl/i3s": "5.0.0-alpha.12",
90
+ "@loaders.gl/images": "5.0.0-alpha.12",
91
+ "@loaders.gl/loader-utils": "5.0.0-alpha.12",
92
+ "@loaders.gl/polyfills": "5.0.0-alpha.12",
93
+ "@loaders.gl/potree": "5.0.0-alpha.12",
94
+ "@loaders.gl/schema": "5.0.0-alpha.12",
95
+ "@loaders.gl/schema-utils": "5.0.0-alpha.12",
96
+ "@loaders.gl/textures": "5.0.0-alpha.12",
97
+ "@loaders.gl/tiles": "5.0.0-alpha.12",
98
+ "@loaders.gl/worker-utils": "5.0.0-alpha.12",
99
+ "@loaders.gl/zip": "5.0.0-alpha.12",
100
+ "@math.gl/core": "5.0.0-alpha.16",
101
+ "@math.gl/crs": "5.0.0-alpha.16",
102
+ "@math.gl/culling": "5.0.0-alpha.16",
103
+ "@math.gl/geoid": "5.0.0-alpha.16",
104
+ "@math.gl/geometry-utils": "5.0.0-alpha.16",
105
+ "@math.gl/geospatial": "5.0.0-alpha.16",
98
106
  "ajv": "^8.12.0",
99
107
  "archiver": "^5.0.0",
100
108
  "cors": "^2.8.5",
@@ -119,5 +127,5 @@
119
127
  "peerDependencies": {
120
128
  "@loaders.gl/core": "~5.0.0-alpha.0"
121
129
  },
122
- "gitHead": "7cbfaef633e86356c946541dab4977b522745b6c"
130
+ "gitHead": "8cbff6cb3e55c4eb1305072743992af27ff0c171"
123
131
  }
package/src/index.ts CHANGED
@@ -1 +1,4 @@
1
- export * from './v4/index.js';
1
+ export {
2
+ I3SConverter,
3
+ Tiles3DConverter
4
+ } from './v4/index.js';
@@ -8,7 +8,7 @@ import {
8
8
  parseSLPKArchive
9
9
  } from '@loaders.gl/i3s';
10
10
  import {NodeFile} from '@loaders.gl/loader-utils';
11
- import {ZipFileSystem, makeZipCDHeaderIterator} from '@loaders.gl/zip';
11
+ import {ZipFileSystem} from '@loaders.gl/zip';
12
12
 
13
13
  export type SLPKUrlParts = {slpkFileName: string; internalFileName: string};
14
14
 
@@ -116,9 +116,7 @@ export async function getNodeCount(fileSystem: ZipFileSystem | null): Promise<nu
116
116
  return 0;
117
117
  }
118
118
  const nodeSet = new Set();
119
- const filesIterator = makeZipCDHeaderIterator(fileSystem.file);
120
- for await (const file of filesIterator) {
121
- const filename = file.fileName;
119
+ for (const filename of await fileSystem.readdir()) {
122
120
  const nodeNumberSearchResult = /^nodes\/(\d+)\//.exec(filename);
123
121
  if (nodeNumberSearchResult) {
124
122
  nodeSet.add(nodeNumberSearchResult[1]);
@@ -11,7 +11,7 @@ import {
11
11
  getURLValue,
12
12
  validateOptionsWithEqual
13
13
  } from './lib/utils/cli-utils';
14
- import {addOneFile, composeHashFile, makeZipCDHeaderIterator} from '@loaders.gl/zip';
14
+ import {addOneFile, composeHashFile, openZipArchive} from '@loaders.gl/zip';
15
15
  import {NodeFile} from '@loaders.gl/loader-utils';
16
16
  // @ts-ignore
17
17
  import {copyFile} from 'node:fs/promises';
@@ -141,7 +141,13 @@ async function main() {
141
141
  if (finalPath !== validatedOptions.tileset) {
142
142
  await copyFile(validatedOptions.tileset, finalPath);
143
143
  }
144
- const hashTable = await composeHashFile(makeZipCDHeaderIterator(new NodeFile(finalPath)));
144
+ const archive = await openZipArchive(new NodeFile(finalPath));
145
+ let hashTable: ArrayBuffer;
146
+ try {
147
+ hashTable = await composeHashFile(archive.entries());
148
+ } finally {
149
+ await archive.close();
150
+ }
145
151
  await addOneFile(finalPath, hashTable, '@specialIndexFileHASH128@');
146
152
 
147
153
  return;
@@ -4,19 +4,11 @@ import type {
4
4
  Tiles3DTileJSONPostprocessed,
5
5
  Tiles3DTilesetJSONPostprocessed
6
6
  } from '@loaders.gl/3d-tiles';
7
- import {Tiles3DArchive} from '@loaders.gl/3d-tiles';
7
+ import {parse3DTilesArchive} from '@loaders.gl/3d-tiles';
8
8
  import {LoaderWithParser, load} from '@loaders.gl/core';
9
9
  import type {ReadableFile} from '@loaders.gl/loader-utils';
10
10
  import {HttpFile, NodeFile, isBrowser} from '@loaders.gl/loader-utils';
11
- import {
12
- CD_HEADER_SIGNATURE,
13
- ZipFileSystem,
14
- parseHashTable,
15
- parseZipCDFileHeader,
16
- parseZipLocalFileHeader,
17
- searchFromTheEnd,
18
- readRange
19
- } from '@loaders.gl/zip';
11
+ import {ZipFileSystem} from '@loaders.gl/zip';
20
12
 
21
13
  /**
22
14
  * Load nested 3DTiles tileset. If the sourceTile is not nested tileset - do nothing
@@ -116,8 +108,7 @@ export async function loadFromArchive(
116
108
  if (filename) {
117
109
  const tz3Path = `${tz3UrlParts[0]}.3tz`;
118
110
  const fileProvider = createReadableFile(tz3Path);
119
- const hashTable = await loadHashTable(fileProvider);
120
- const archive = new Tiles3DArchive(fileProvider, hashTable, tz3Path);
111
+ const archive = await parse3DTilesArchive(fileProvider, undefined, tz3Path);
121
112
  const fileSystem = new ZipFileSystem(archive);
122
113
  const archiveLoadOptions = {
123
114
  ...loadOptions,
@@ -145,42 +136,3 @@ function createReadableFile(path: string): ReadableFile {
145
136
  }
146
137
  return isBrowser ? new HttpFile(path) : new NodeFile(path);
147
138
  }
148
-
149
- /**
150
- * Load hash file from 3TZ
151
- * @param fileProvider - binary reader of 3TZ
152
- * @returns hash table of the 3TZ file content or undefined if the hash file is not presented inside
153
- */
154
- async function loadHashTable(
155
- fileProvider: ReadableFile
156
- ): Promise<undefined | Record<string, bigint>> {
157
- let hashTable: undefined | Record<string, bigint>;
158
-
159
- const hashCDOffset = await searchFromTheEnd(fileProvider, CD_HEADER_SIGNATURE);
160
-
161
- const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);
162
-
163
- // '@3dtilesIndex1@' is index file that must be the last in the archive. It allows
164
- // to improve load and read performance when the archive contains a very large number
165
- // of files.
166
- if (cdFileHeader?.fileName === '@3dtilesIndex1@') {
167
- const localFileHeader = await parseZipLocalFileHeader(
168
- cdFileHeader.localHeaderOffset,
169
- fileProvider
170
- );
171
- if (!localFileHeader) {
172
- throw new Error('corrupted 3tz');
173
- }
174
-
175
- const fileDataOffset = localFileHeader.fileDataOffset;
176
- const hashFile = await readRange(
177
- fileProvider,
178
- fileDataOffset,
179
- fileDataOffset + localFileHeader.compressedSize
180
- );
181
-
182
- hashTable = parseHashTable(hashFile);
183
- }
184
-
185
- return hashTable;
186
- }