@loaders.gl/tiles 5.0.0-alpha.2 → 5.0.0-alpha.3

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 (109) hide show
  1. package/LICENSE +1 -1
  2. package/dist/dist.dev.js +17325 -5650
  3. package/dist/dist.min.js +4 -1
  4. package/dist/index.cjs +1924 -178
  5. package/dist/index.cjs.map +3 -3
  6. package/dist/index.d.ts +9 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/point-cloud/point-cloud-tileset.d.ts +4 -0
  11. package/dist/point-cloud/point-cloud-tileset.d.ts.map +1 -1
  12. package/dist/point-cloud/point-cloud-tileset.js +51 -12
  13. package/dist/point-cloud/point-cloud-tileset.js.map +1 -1
  14. package/dist/point-cloud/types.d.ts +17 -0
  15. package/dist/point-cloud/types.d.ts.map +1 -1
  16. package/dist/raster-set.d.ts +10 -8
  17. package/dist/raster-set.d.ts.map +1 -1
  18. package/dist/raster-set.js +18 -1
  19. package/dist/raster-set.js.map +1 -1
  20. package/dist/spatial/format-spatial-reference.d.ts +67 -0
  21. package/dist/spatial/format-spatial-reference.d.ts.map +1 -0
  22. package/dist/spatial/format-spatial-reference.js +233 -0
  23. package/dist/spatial/format-spatial-reference.js.map +1 -0
  24. package/dist/spatial/get-spatial-coordinate-frame.d.ts +9 -0
  25. package/dist/spatial/get-spatial-coordinate-frame.d.ts.map +1 -0
  26. package/dist/spatial/get-spatial-coordinate-frame.js +58 -0
  27. package/dist/spatial/get-spatial-coordinate-frame.js.map +1 -0
  28. package/dist/spatial/i3s-elevation.d.ts +20 -0
  29. package/dist/spatial/i3s-elevation.d.ts.map +1 -0
  30. package/dist/spatial/i3s-elevation.js +90 -0
  31. package/dist/spatial/i3s-elevation.js.map +1 -0
  32. package/dist/spatial/i3s-spatial-transformer.d.ts +189 -0
  33. package/dist/spatial/i3s-spatial-transformer.d.ts.map +1 -0
  34. package/dist/spatial/i3s-spatial-transformer.js +686 -0
  35. package/dist/spatial/i3s-spatial-transformer.js.map +1 -0
  36. package/dist/spatial/spatial-coordinate-transformer.d.ts +48 -0
  37. package/dist/spatial/spatial-coordinate-transformer.d.ts.map +1 -0
  38. package/dist/spatial/spatial-coordinate-transformer.js +211 -0
  39. package/dist/spatial/spatial-coordinate-transformer.js.map +1 -0
  40. package/dist/spatial/spatial-resource-registry.d.ts +44 -0
  41. package/dist/spatial/spatial-resource-registry.d.ts.map +1 -0
  42. package/dist/spatial/spatial-resource-registry.js +67 -0
  43. package/dist/spatial/spatial-resource-registry.js.map +1 -0
  44. package/dist/spatial/spatial-types.d.ts +190 -0
  45. package/dist/spatial/spatial-types.d.ts.map +1 -0
  46. package/dist/spatial/spatial-types.js +192 -0
  47. package/dist/spatial/spatial-types.js.map +1 -0
  48. package/dist/tileset-3d/common/tile-3d.d.ts +49 -1
  49. package/dist/tileset-3d/common/tile-3d.d.ts.map +1 -1
  50. package/dist/tileset-3d/common/tile-3d.js +132 -64
  51. package/dist/tileset-3d/common/tile-3d.js.map +1 -1
  52. package/dist/tileset-3d/common/tileset-3d.d.ts +25 -0
  53. package/dist/tileset-3d/common/tileset-3d.d.ts.map +1 -1
  54. package/dist/tileset-3d/common/tileset-3d.js +49 -7
  55. package/dist/tileset-3d/common/tileset-3d.js.map +1 -1
  56. package/dist/tileset-3d/common/tileset-source.d.ts +14 -0
  57. package/dist/tileset-3d/common/tileset-source.d.ts.map +1 -1
  58. package/dist/tileset-3d/common/tileset-source.js.map +1 -1
  59. package/dist/tileset-3d/common/tileset-traverser.d.ts +6 -1
  60. package/dist/tileset-3d/common/tileset-traverser.d.ts.map +1 -1
  61. package/dist/tileset-3d/common/tileset-traverser.js +11 -6
  62. package/dist/tileset-3d/common/tileset-traverser.js.map +1 -1
  63. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.d.ts +26 -1
  64. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.d.ts.map +1 -1
  65. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.js +62 -18
  66. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.js.map +1 -1
  67. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.d.ts +1 -7
  68. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.d.ts.map +1 -1
  69. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.js +32 -55
  70. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.js.map +1 -1
  71. package/dist/tileset-3d/format-i3s/i3s-source.d.ts +14 -1
  72. package/dist/tileset-3d/format-i3s/i3s-source.d.ts.map +1 -1
  73. package/dist/tileset-3d/format-i3s/i3s-source.js +107 -17
  74. package/dist/tileset-3d/format-i3s/i3s-source.js.map +1 -1
  75. package/dist/tileset-3d/helpers/bounding-volume.d.ts.map +1 -1
  76. package/dist/tileset-3d/helpers/bounding-volume.js +3 -33
  77. package/dist/tileset-3d/helpers/bounding-volume.js.map +1 -1
  78. package/dist/tileset-3d/helpers/frame-state.d.ts +3 -1
  79. package/dist/tileset-3d/helpers/frame-state.d.ts.map +1 -1
  80. package/dist/tileset-3d/helpers/frame-state.js +1 -0
  81. package/dist/tileset-3d/helpers/frame-state.js.map +1 -1
  82. package/dist/tileset-3d/helpers/i3s-lod.d.ts.map +1 -1
  83. package/dist/tileset-3d/helpers/i3s-lod.js +20 -8
  84. package/dist/tileset-3d/helpers/i3s-lod.js.map +1 -1
  85. package/dist/types.d.ts +3 -0
  86. package/dist/types.d.ts.map +1 -1
  87. package/package.json +12 -9
  88. package/src/index.ts +42 -1
  89. package/src/point-cloud/point-cloud-tileset.ts +66 -12
  90. package/src/point-cloud/types.ts +17 -0
  91. package/src/raster-set.ts +46 -11
  92. package/src/spatial/format-spatial-reference.ts +311 -0
  93. package/src/spatial/get-spatial-coordinate-frame.ts +74 -0
  94. package/src/spatial/i3s-elevation.ts +96 -0
  95. package/src/spatial/i3s-spatial-transformer.ts +957 -0
  96. package/src/spatial/spatial-coordinate-transformer.ts +276 -0
  97. package/src/spatial/spatial-resource-registry.ts +79 -0
  98. package/src/spatial/spatial-types.ts +422 -0
  99. package/src/tileset-3d/common/tile-3d.ts +156 -69
  100. package/src/tileset-3d/common/tileset-3d.ts +77 -6
  101. package/src/tileset-3d/common/tileset-source.ts +15 -0
  102. package/src/tileset-3d/common/tileset-traverser.ts +11 -6
  103. package/src/tileset-3d/format-3d-tiles/implicit-tiling.ts +100 -22
  104. package/src/tileset-3d/format-3d-tiles/tiles-3d-source.ts +36 -56
  105. package/src/tileset-3d/format-i3s/i3s-source.ts +119 -18
  106. package/src/tileset-3d/helpers/bounding-volume.ts +3 -55
  107. package/src/tileset-3d/helpers/frame-state.ts +3 -0
  108. package/src/tileset-3d/helpers/i3s-lod.ts +22 -8
  109. package/src/types.ts +3 -0
@@ -0,0 +1,190 @@
1
+ import { type ReadonlyCRSDefinition, type SpatialReference, type SpatialReferenceAlternative, type SpatialReferenceCoordinateFrame, type SpatialReferenceProvenance, type SpatialReferenceRepresentation, type SpatialReferenceState } from '@math.gl/crs';
2
+ import type { Geoid } from '@math.gl/geoid';
3
+ /** How height values in a 3D dataset relate to the earth. */
4
+ export type TilesetHeightReference = 'native' | 'ellipsoidal' | 'orthometric' | 'unknown';
5
+ /** Height reference that an application may request for transformed output. */
6
+ export type TilesetTargetHeightReference = 'native' | 'ellipsoidal' | 'orthometric';
7
+ /** I3S placement rule applied after source-height interpretation. */
8
+ export type TilesetElevationMode = 'absoluteHeight' | 'onTheGround' | 'relativeToGround' | 'relativeToScene';
9
+ /** One WGS84 longitude/latitude location requested from an elevation provider. */
10
+ export type TilesetElevationSample = readonly [longitude: number, latitude: number];
11
+ /** WGS84 geographic footprint passed to an elevation provider. */
12
+ export type TilesetElevationBounds = {
13
+ /** Western longitude in degrees. Greater than `east` when crossing the antimeridian. */
14
+ readonly west: number;
15
+ /** Southern latitude in degrees. */
16
+ readonly south: number;
17
+ /** Eastern longitude in degrees. Less than `west` when crossing the antimeridian. */
18
+ readonly east: number;
19
+ /** Northern latitude in degrees. */
20
+ readonly north: number;
21
+ };
22
+ /** Conservative elevation extrema over one geographic footprint. */
23
+ export type TilesetElevationRange = {
24
+ /** Minimum elevation anywhere inside the footprint. */
25
+ readonly minimum: number;
26
+ /** Maximum elevation anywhere inside the footprint. */
27
+ readonly maximum: number;
28
+ };
29
+ /**
30
+ * Application-owned source of terrain or scene-surface heights.
31
+ *
32
+ * Providers receive WGS84 longitude/latitude locations and may batch asynchronous requests. They
33
+ * never need to transform horizontal coordinates. Returned heights default to meters in the
34
+ * layer's source height reference unless `unit` or `heightReference` says otherwise.
35
+ */
36
+ export type TilesetElevationProvider = {
37
+ /** Height reference used by sampled values. Omit to use the layer's source height reference. */
38
+ readonly heightReference?: Exclude<TilesetHeightReference, 'native' | 'unknown'>;
39
+ /** Linear unit used by sampled values. Defaults to `meter`. */
40
+ readonly unit?: string;
41
+ /**
42
+ * Samples one height for every supplied location, preserving input order.
43
+ * @param positions - WGS84 longitude/latitude locations.
44
+ * @returns Finite heights with the same length and order as `positions`.
45
+ */
46
+ sampleElevations(positions: readonly TilesetElevationSample[]): readonly number[] | Promise<readonly number[]>;
47
+ /**
48
+ * Returns conservative elevation extrema over an entire geographic footprint.
49
+ *
50
+ * Bounds preparation requires this operation because point samples cannot detect an interior
51
+ * peak or depression and therefore cannot produce a culling-safe traversal volume.
52
+ *
53
+ * @param bounds - WGS84 geographic footprint in degrees.
54
+ * @returns Minimum and maximum elevations in this provider's declared unit and height reference.
55
+ */
56
+ getElevationRange(bounds: TilesetElevationBounds): TilesetElevationRange | Promise<TilesetElevationRange>;
57
+ };
58
+ /** Coordinate representation requested from a 3D tileset. */
59
+ export type TilesetOutputCoordinates = 'auto' | 'ecef' | 'local-enu' | 'target-crs';
60
+ /** Broad coordinate frame used by a 3D dataset. */
61
+ export type TilesetCoordinateFrame = SpatialReferenceCoordinateFrame;
62
+ /** Origin of a normalized spatial-reference value. */
63
+ export type TilesetSpatialReferenceProvenance = SpatialReferenceProvenance;
64
+ /**
65
+ * Simple application-facing spatial options shared by 3D Tiles and I3S.
66
+ *
67
+ * Source CRS details are normally discovered from dataset metadata. The source overrides are
68
+ * expert recovery controls for incomplete or non-standard datasets.
69
+ */
70
+ export type TilesetSpatialOptions = {
71
+ /** CRS of transformed output coordinates. Omit to retain the format's natural world frame. */
72
+ targetCrs?: ReadonlyCRSDefinition;
73
+ /** Height reference of transformed output coordinates. Defaults to `native`. */
74
+ targetHeightReference?: TilesetTargetHeightReference;
75
+ /** Output coordinate representation. Defaults to `auto`. */
76
+ outputCoordinates?: TilesetOutputCoordinates;
77
+ /** Expert override used when source metadata is absent or incorrect. */
78
+ sourceCrs?: ReadonlyCRSDefinition;
79
+ /** Expert override for a dynamic coordinate reference epoch. */
80
+ coordinateEpoch?: number;
81
+ /** Registered geoid model name or an already parsed geoid model. */
82
+ geoidModel?: string | Geoid;
83
+ /** Terrain heights used by I3S `onTheGround` and `relativeToGround` placement. */
84
+ terrainElevationProvider?: TilesetElevationProvider;
85
+ /** Scene-surface heights used by I3S `relativeToScene` placement. */
86
+ sceneElevationProvider?: TilesetElevationProvider;
87
+ };
88
+ /**
89
+ * Normalized, readonly spatial metadata discovered for a 3D tileset.
90
+ *
91
+ * This is diagnostic output. Applications normally do not construct it.
92
+ */
93
+ export type TilesetSpatialReference = SpatialReference & {
94
+ /** Source horizontal or compound CRS, when it can be identified. */
95
+ readonly sourceCrs?: ReadonlyCRSDefinition;
96
+ /** Source vertical CRS, when independently identified. */
97
+ readonly verticalCrs?: ReadonlyCRSDefinition;
98
+ /** Number of meters represented by one source Z unit. */
99
+ readonly verticalUnitScale: number;
100
+ /** Coordinate epoch attached to the source coordinates. */
101
+ readonly coordinateEpoch?: number;
102
+ /** Source height interpretation. */
103
+ readonly heightReference: TilesetHeightReference;
104
+ /** I3S placement rule, when the source layer declares one. */
105
+ readonly elevationMode?: TilesetElevationMode;
106
+ /** Declared I3S elevation offset before unit normalization. */
107
+ readonly elevationOffset?: number;
108
+ /** Unit of the I3S elevation offset. Defaults to `meter` when a mode is declared. */
109
+ readonly elevationUnit?: string;
110
+ /** Number of meters represented by one elevation-offset unit. */
111
+ readonly elevationUnitScale: number;
112
+ /** Broad frame in which source coordinates are encoded. */
113
+ readonly coordinateFrame: TilesetCoordinateFrame;
114
+ /** Coordinate component order used by the format wire representation. */
115
+ readonly axisOrder: 'xy' | 'yx' | 'xyz' | 'unknown';
116
+ /** How the source CRS was established. */
117
+ readonly provenance: TilesetSpatialReferenceProvenance;
118
+ /** Target CRS selected by application options, if any. */
119
+ readonly targetCrs?: ReadonlyCRSDefinition;
120
+ /** Target height interpretation selected by application options. */
121
+ readonly targetHeightReference: TilesetTargetHeightReference;
122
+ /** Output representation selected by application options. */
123
+ readonly outputCoordinates: TilesetOutputCoordinates;
124
+ /** Whether coordinates are native, ready to transform, transformed, or unresolved. */
125
+ readonly status: 'native' | 'transformable' | 'transformed' | 'unresolved';
126
+ /** Non-fatal qualifications retained for diagnostics and user interfaces. */
127
+ readonly warnings: readonly string[];
128
+ };
129
+ /** Input used by format adapters to create normalized spatial metadata. */
130
+ export type CreateTilesetSpatialReferenceOptions = {
131
+ /** Discovered source CRS. */
132
+ sourceCrs?: ReadonlyCRSDefinition;
133
+ /** Whether the source CRS was explicit, defaulted, unknown, or absent. */
134
+ sourceCrsState?: SpatialReferenceState;
135
+ /** Serialization or naming form used by the source CRS. */
136
+ sourceCrsRepresentation?: SpatialReferenceRepresentation;
137
+ /** Additional source CRS representations retained by the format. */
138
+ sourceCrsAlternatives?: readonly SpatialReferenceAlternative[];
139
+ /** Discovered vertical CRS. */
140
+ verticalCrs?: ReadonlyCRSDefinition;
141
+ /** Per-component source units, aligned with the stored coordinate order. */
142
+ units?: readonly string[];
143
+ /** Number of meters represented by one discovered source Z unit. */
144
+ verticalUnitScale?: number;
145
+ /** Discovered coordinate epoch. */
146
+ coordinateEpoch?: number;
147
+ /** Discovered height interpretation. */
148
+ heightReference?: TilesetHeightReference;
149
+ /** Format-specific elevation placement rule. */
150
+ elevationMode?: TilesetElevationMode;
151
+ /** Format-specific elevation offset before unit normalization. */
152
+ elevationOffset?: number;
153
+ /** Unit of the format-specific elevation offset. */
154
+ elevationUnit?: string;
155
+ /** Number of meters represented by one elevation-offset unit. */
156
+ elevationUnitScale?: number;
157
+ /** Discovered broad coordinate frame. */
158
+ coordinateFrame?: TilesetCoordinateFrame;
159
+ /** Format wire-axis order. */
160
+ axisOrder?: 'xy' | 'yx' | 'xyz' | 'unknown';
161
+ /** Metadata provenance. */
162
+ provenance?: TilesetSpatialReferenceProvenance;
163
+ /** Non-fatal discovery qualifications. */
164
+ warnings?: readonly string[];
165
+ };
166
+ /**
167
+ * Combines format discovery with the intentionally small application option surface.
168
+ *
169
+ * @param discovered - Values derived from dataset metadata and format defaults.
170
+ * @param options - Application target options and expert recovery overrides.
171
+ * @returns Normalized immutable spatial metadata.
172
+ */
173
+ export declare function createTilesetSpatialReference(discovered: CreateTilesetSpatialReferenceOptions, options?: TilesetSpatialOptions): TilesetSpatialReference;
174
+ /**
175
+ * Applies application target and recovery options to format-discovered spatial metadata.
176
+ *
177
+ * @param discovered - Readonly metadata returned by a format adapter.
178
+ * @param options - Application target options and expert recovery overrides.
179
+ * @returns A new normalized immutable descriptor.
180
+ */
181
+ export declare function applyTilesetSpatialOptions(discovered: TilesetSpatialReference | undefined, options?: TilesetSpatialOptions): TilesetSpatialReference;
182
+ /**
183
+ * Marks a normalized descriptor after every returned coordinate and bound has entered its target
184
+ * frame.
185
+ *
186
+ * @param spatialReference - Transformable spatial descriptor.
187
+ * @returns An immutable descriptor with `status: 'transformed'`.
188
+ */
189
+ export declare function markTilesetSpatialReferenceTransformed(spatialReference: TilesetSpatialReference): TilesetSpatialReference;
190
+ //# sourceMappingURL=spatial-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spatial-types.d.ts","sourceRoot":"","sources":["../../src/spatial/spatial-types.ts"],"names":[],"mappings":"AAIA,OAAO,E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@ -0,0 +1,192 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { createSpatialReference, inferCRSRepresentation } from '@math.gl/crs';
5
+ import { getSpatialCoordinateFrame } from "./get-spatial-coordinate-frame.js";
6
+ /**
7
+ * Combines format discovery with the intentionally small application option surface.
8
+ *
9
+ * @param discovered - Values derived from dataset metadata and format defaults.
10
+ * @param options - Application target options and expert recovery overrides.
11
+ * @returns Normalized immutable spatial metadata.
12
+ */
13
+ export function createTilesetSpatialReference(discovered, options = {}) {
14
+ const hasSourceCrsOverride = options.sourceCrs !== undefined;
15
+ const sourceCrs = options.sourceCrs || discovered.sourceCrs;
16
+ const outputCoordinates = options.outputCoordinates || 'auto';
17
+ const targetCrs = options.targetCrs || (outputCoordinates === 'ecef' ? 'EPSG:4978' : undefined);
18
+ const targetHeightReference = options.targetHeightReference || 'native';
19
+ const verticalUnitScale = discovered.verticalUnitScale ?? 1;
20
+ const elevationUnitScale = discovered.elevationUnitScale ?? 1;
21
+ const elevationOffset = discovered.elevationOffset || 0;
22
+ const requiresSurface = discovered.elevationMode === 'onTheGround' ||
23
+ discovered.elevationMode === 'relativeToGround' ||
24
+ discovered.elevationMode === 'relativeToScene';
25
+ const hasElevationProvider = discovered.elevationMode === 'relativeToScene'
26
+ ? Boolean(options.sceneElevationProvider)
27
+ : !requiresSurface || Boolean(options.terrainElevationProvider);
28
+ const hasFormatVerticalOperation = verticalUnitScale !== 1 ||
29
+ elevationUnitScale !== 1 ||
30
+ (discovered.elevationMode !== undefined &&
31
+ (requiresSurface ||
32
+ (discovered.elevationMode === 'absoluteHeight' && elevationOffset !== 0)));
33
+ const needsHeightTransform = targetHeightReference !== 'native' && targetHeightReference !== discovered.heightReference;
34
+ const hasRequestedTransform = Boolean(targetCrs) ||
35
+ targetHeightReference !== 'native' ||
36
+ outputCoordinates !== 'auto' ||
37
+ hasFormatVerticalOperation;
38
+ const hasRequiredTarget = outputCoordinates !== 'target-crs' || Boolean(targetCrs);
39
+ const hasHeightMetadata = !needsHeightTransform || (discovered.heightReference || 'unknown') !== 'unknown';
40
+ const hasVerticalUnits = Number.isFinite(verticalUnitScale) &&
41
+ verticalUnitScale > 0 &&
42
+ Number.isFinite(elevationUnitScale) &&
43
+ elevationUnitScale > 0;
44
+ const canTransform = Boolean(sourceCrs) &&
45
+ hasRequestedTransform &&
46
+ hasRequiredTarget &&
47
+ hasHeightMetadata &&
48
+ hasVerticalUnits &&
49
+ hasElevationProvider &&
50
+ outputCoordinates !== 'local-enu';
51
+ const provenance = hasSourceCrsOverride ? 'caller-override' : discovered.provenance || 'unknown';
52
+ const coordinateFrame = hasSourceCrsOverride && sourceCrs
53
+ ? getSpatialCoordinateFrame(sourceCrs)
54
+ : discovered.coordinateFrame;
55
+ const sourceCrsState = hasSourceCrsOverride
56
+ ? 'explicit'
57
+ : discovered.sourceCrsState ||
58
+ (sourceCrs ? (provenance === 'format-default' ? 'default' : 'explicit') : 'absent');
59
+ const spatialReference = createSpatialReference({
60
+ crs: sourceCrs
61
+ ? {
62
+ state: sourceCrsState === 'default' ? 'default' : 'explicit',
63
+ definition: sourceCrs,
64
+ representation: (!hasSourceCrsOverride && discovered.sourceCrsRepresentation) ||
65
+ inferCRSRepresentation(sourceCrs),
66
+ provenance,
67
+ alternatives: hasSourceCrsOverride ? undefined : discovered.sourceCrsAlternatives
68
+ }
69
+ : {
70
+ state: sourceCrsState === 'unknown' ? 'unknown' : 'absent',
71
+ provenance
72
+ },
73
+ vertical: discovered.verticalCrs
74
+ ? {
75
+ state: 'explicit',
76
+ definition: discovered.verticalCrs,
77
+ representation: inferCRSRepresentation(discovered.verticalCrs),
78
+ provenance: discovered.provenance || 'metadata'
79
+ }
80
+ : undefined,
81
+ coordinateEpoch: options.coordinateEpoch ?? discovered.coordinateEpoch,
82
+ coordinateFrame,
83
+ coordinateOrder: getCoordinateOrder(discovered.axisOrder),
84
+ units: hasSourceCrsOverride ? undefined : discovered.units
85
+ });
86
+ const normalizedSourceCrs = getKnownCRSDefinition(spatialReference.crs);
87
+ const normalizedVerticalCrs = spatialReference.vertical
88
+ ? getKnownCRSDefinition(spatialReference.vertical)
89
+ : undefined;
90
+ const normalizedTargetCrs = targetCrs ? cloneReadonlyCRSDefinition(targetCrs) : undefined;
91
+ return Object.freeze({
92
+ ...spatialReference,
93
+ sourceCrs: normalizedSourceCrs,
94
+ verticalCrs: normalizedVerticalCrs,
95
+ verticalUnitScale,
96
+ coordinateEpoch: options.coordinateEpoch ?? discovered.coordinateEpoch,
97
+ heightReference: discovered.heightReference || 'unknown',
98
+ elevationMode: discovered.elevationMode,
99
+ elevationOffset: discovered.elevationOffset,
100
+ elevationUnit: discovered.elevationUnit,
101
+ elevationUnitScale,
102
+ coordinateFrame: coordinateFrame || 'unknown',
103
+ axisOrder: discovered.axisOrder || 'unknown',
104
+ provenance,
105
+ targetCrs: normalizedTargetCrs,
106
+ targetHeightReference,
107
+ outputCoordinates,
108
+ status: hasRequestedTransform ? (canTransform ? 'transformable' : 'unresolved') : 'native',
109
+ warnings: Object.freeze([...(discovered.warnings || [])])
110
+ });
111
+ }
112
+ /**
113
+ * Applies application target and recovery options to format-discovered spatial metadata.
114
+ *
115
+ * @param discovered - Readonly metadata returned by a format adapter.
116
+ * @param options - Application target options and expert recovery overrides.
117
+ * @returns A new normalized immutable descriptor.
118
+ */
119
+ export function applyTilesetSpatialOptions(discovered, options = {}) {
120
+ return createTilesetSpatialReference({
121
+ sourceCrs: discovered?.sourceCrs,
122
+ sourceCrsState: discovered?.crs.state,
123
+ sourceCrsRepresentation: discovered?.crs.state === 'explicit' || discovered?.crs.state === 'default'
124
+ ? discovered.crs.representation
125
+ : undefined,
126
+ sourceCrsAlternatives: discovered?.crs.state === 'explicit' || discovered?.crs.state === 'default'
127
+ ? discovered.crs.alternatives
128
+ : undefined,
129
+ verticalCrs: discovered?.verticalCrs,
130
+ units: discovered?.units,
131
+ verticalUnitScale: discovered?.verticalUnitScale,
132
+ coordinateEpoch: discovered?.coordinateEpoch,
133
+ heightReference: discovered?.heightReference,
134
+ elevationMode: discovered?.elevationMode,
135
+ elevationOffset: discovered?.elevationOffset,
136
+ elevationUnit: discovered?.elevationUnit,
137
+ elevationUnitScale: discovered?.elevationUnitScale,
138
+ coordinateFrame: discovered?.coordinateFrame,
139
+ axisOrder: discovered?.axisOrder,
140
+ provenance: discovered?.provenance,
141
+ warnings: discovered?.warnings
142
+ }, options);
143
+ }
144
+ /** Return a known definition from a canonical CRS reference. */
145
+ function getKnownCRSDefinition(reference) {
146
+ return reference.state === 'explicit' || reference.state === 'default'
147
+ ? reference.definition
148
+ : undefined;
149
+ }
150
+ /** Clone and deeply freeze a target CRS through the canonical math.gl constructor. */
151
+ function cloneReadonlyCRSDefinition(definition) {
152
+ const spatialReference = createSpatialReference({
153
+ crs: {
154
+ state: 'explicit',
155
+ definition,
156
+ representation: inferCRSRepresentation(definition),
157
+ provenance: 'caller-override'
158
+ }
159
+ });
160
+ const clonedDefinition = getKnownCRSDefinition(spatialReference.crs);
161
+ if (!clonedDefinition) {
162
+ throw new Error('Failed to normalize a known target CRS definition');
163
+ }
164
+ return clonedDefinition;
165
+ }
166
+ /** Convert the legacy tileset axis label to the common stored-coordinate order. */
167
+ function getCoordinateOrder(axisOrder) {
168
+ switch (axisOrder) {
169
+ case 'xy':
170
+ return ['x', 'y'];
171
+ case 'yx':
172
+ return ['y', 'x'];
173
+ case 'xyz':
174
+ return ['x', 'y', 'z'];
175
+ default:
176
+ return [];
177
+ }
178
+ }
179
+ /**
180
+ * Marks a normalized descriptor after every returned coordinate and bound has entered its target
181
+ * frame.
182
+ *
183
+ * @param spatialReference - Transformable spatial descriptor.
184
+ * @returns An immutable descriptor with `status: 'transformed'`.
185
+ */
186
+ export function markTilesetSpatialReferenceTransformed(spatialReference) {
187
+ if (spatialReference.status !== 'transformable' && spatialReference.status !== 'transformed') {
188
+ throw new Error('Only a transformable spatial reference can be marked as transformed');
189
+ }
190
+ return Object.freeze({ ...spatialReference, status: 'transformed' });
191
+ }
192
+ //# sourceMappingURL=spatial-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spatial-types.js","sourceRoot":"","sources":["../../src/spatial/spatial-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EAQvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,yBAAyB,EAAC,0CAAuC;AA0LzE;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAC3C,UAAgD,EAChD,UAAiC,EAAE;IAEnC,MAAM,oBAAoB,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC;IAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC;IAC5D,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,MAAM,CAAC;IAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,iBAAiB,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAChG,MAAM,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,IAAI,QAAQ,CAAC;IACxE,MAAM,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,IAAI,CAAC,CAAC;IAC5D,MAAM,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,IAAI,CAAC,CAAC;IAC9D,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,IAAI,CAAC,CAAC;IACxD,MAAM,eAAe,GACnB,UAAU,CAAC,aAAa,KAAK,aAAa;QAC1C,UAAU,CAAC,aAAa,KAAK,kBAAkB;QAC/C,UAAU,CAAC,aAAa,KAAK,iBAAiB,CAAC;IACjD,MAAM,oBAAoB,GACxB,UAAU,CAAC,aAAa,KAAK,iBAAiB;QAC5C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB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SAAS,CAAC;AAChB,CAAC;AAED,sFAAsF;AACtF,SAAS,0BAA0B,CAAC,UAAiC;IACnE,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;QAC9C,GAAG,EAAE;YACH,KAAK,EAAE,UAAU;YACjB,UAAU;YACV,cAAc,EAAE,sBAAsB,CAAC,UAAU,CAAC;YAClD,UAAU,EAAE,iBAAiB;SAC9B;KACF,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACrE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,mFAAmF;AACnF,SAAS,kBAAkB,CACzB,SAA4D;IAE5D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpB,KAAK,KAAK;YACR,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACzB;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACpD,gBAAyC;IAEzC,IAAI,gBAAgB,CAAC,MAAM,KAAK,eAAe,IAAI,gBAAgB,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QAC7F,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAC,GAAG,gBAAgB,EAAE,MAAM,EAAE,aAAa,EAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { Matrix4 } from '@math.gl/core';
2
+ import { CullingVolume } from '@math.gl/culling';
3
+ import type { CullingResult } from '@math.gl/culling';
2
4
  import type { Tileset3D } from "./tileset-3d.js";
3
5
  import type { DoublyLinkedListNode } from "../../utils/doubly-linked-list-node.js";
4
6
  import { TILE_REFINEMENT } from "../../constants.js";
@@ -6,6 +8,22 @@ import type { TileChildrenLoadResult, TileContentLoadResult } from "./tileset-so
6
8
  import { FrameState } from "../helpers/frame-state.js";
7
9
  import { CartographicBounds } from "../helpers/bounding-volume.js";
8
10
  import { TilesetTraverser } from "./tileset-traverser.js";
11
+ /**
12
+ * Classifies render-content visibility across all content volumes owned by a tile.
13
+ *
14
+ * Content volumes form a union: one visible content entry keeps the tile renderable even when
15
+ * another entry is outside the frustum or clipping planes. The traversal volume is intentionally
16
+ * not used here except as a fallback when a tile has no content-specific volume. This separation
17
+ * keeps clipping render-only and prevents a tight content volume from pruning descendants.
18
+ *
19
+ * @param contentVolumes - Transformed content volumes in source order.
20
+ * @param fallbackVolume - Tile volume used when content does not declare its own volume.
21
+ * @param cullingVolume - Current view frustum.
22
+ * @param visibilityPlaneMask - Parent visibility mask optimization.
23
+ * @param clippingPlanes - Optional world-space planes applied to render content only.
24
+ * @returns Union visibility classification for the renderable content.
25
+ */
26
+ export declare function getContentVisibility(contentVolumes: any[], fallbackVolume: any, cullingVolume: CullingVolume, visibilityPlaneMask: number | undefined, clippingPlanes?: any[]): CullingResult;
9
27
  /**
10
28
  * @param tileset - Tileset3D instance
11
29
  * @param header - tile header - JSON loaded from a dataset
@@ -35,6 +53,8 @@ export declare class Tile3D {
35
53
  refine: TILE_REFINEMENT;
36
54
  type: string;
37
55
  contentUrl: string;
56
+ /** Resolved render-content URLs in source order; empty for contentless tiles. */
57
+ contentUrls: string[];
38
58
  /** Different refinement algorithms used by I3S and 3D tiles */
39
59
  lodMetricType: string;
40
60
  /**
@@ -54,6 +74,17 @@ export declare class Tile3D {
54
74
  * not the content's metadata in the tileset JSON file.
55
75
  */
56
76
  content: any;
77
+ /** Loaded payloads in the same order as {@link contentUrls}; `content` remains the primary payload. */
78
+ contents: any[];
79
+ /**
80
+ * Metadata entity attached to this tile in the source tileset, if present.
81
+ *
82
+ * This is the raw 3D Tiles metadata reference. The generic tiles runtime preserves it without
83
+ * decoding schema classes or binary property tables.
84
+ */
85
+ metadata: Record<string, any> | null;
86
+ /** Raw metadata entities attached to tile contents, in content source order. */
87
+ contentMetadata: Array<Record<string, any> | null>;
57
88
  contentState: number;
58
89
  gpuMemoryUsageInBytes: number;
59
90
  /** The tile's children - an array of Tile3D objects. */
@@ -94,7 +125,16 @@ export declare class Tile3D {
94
125
  private _visibilityPlaneMask;
95
126
  private _visible;
96
127
  private _contentBoundingVolume;
128
+ private _contentBoundingVolumes;
129
+ /** Source content-volume headers retained after render content is unloaded. */
130
+ private _contentBoundingVolumeHeaders;
97
131
  private _viewerRequestVolume;
132
+ /** Bounding volume used to cull the tile's first renderable content entry. */
133
+ get contentBoundingVolume(): any;
134
+ /** All transformed render-content bounding volumes, including tile-volume fallbacks. */
135
+ get contentBoundingVolumes(): any[];
136
+ /** Bounding volume that limits when this tile may be requested, when declared. */
137
+ get viewerRequestVolume(): any;
98
138
  _initialTransform: Matrix4;
99
139
  _priority: number;
100
140
  _selectedFrame: number;
@@ -271,7 +311,15 @@ export declare class Tile3D {
271
311
  */
272
312
  _updateRequestPriorityMetrics(frameState: FrameState): void;
273
313
  visibility(frameState: any, parentVisibilityPlaneMask: any): any;
274
- contentVisibility(): boolean;
314
+ /**
315
+ * Determines whether renderable content intersects the view and configured clipping planes.
316
+ *
317
+ * Clipping planes are render-only constraints; traversal continues to use the tile volume.
318
+ *
319
+ * @param frameState Current camera, culling, and optional clipping-plane state.
320
+ * @returns The content visibility classification.
321
+ */
322
+ contentVisibility(frameState: FrameState): CullingResult;
275
323
  /**
276
324
  * Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
277
325
  * @param frameState The frame state.
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d.d.ts","sourceRoot":"","sources":["../../../src/tileset-3d/common/tile-3d.ts"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