@developmentseed/deck.gl-raster 0.1.0-beta.3 → 0.1.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.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/raster-layer.d.ts +12 -3
- package/dist/raster-layer.d.ts.map +1 -1
- package/dist/raster-layer.js +127 -31
- package/dist/raster-layer.js.map +1 -1
- package/dist/raster-tile-layer.d.ts +1 -0
- package/dist/raster-tile-layer.d.ts.map +1 -0
- package/dist/raster-tile-layer.js +2 -0
- package/dist/raster-tile-layer.js.map +1 -0
- package/dist/raster-tileset/index.d.ts +3 -0
- package/dist/raster-tileset/index.d.ts.map +1 -0
- package/dist/raster-tileset/index.js +2 -0
- package/dist/raster-tileset/index.js.map +1 -0
- package/dist/raster-tileset/raster-tile-traversal.d.ts +164 -0
- package/dist/raster-tileset/raster-tile-traversal.d.ts.map +1 -0
- package/dist/raster-tileset/raster-tile-traversal.js +610 -0
- package/dist/raster-tileset/raster-tile-traversal.js.map +1 -0
- package/dist/raster-tileset/raster-tileset-2d.d.ts +38 -0
- package/dist/raster-tileset/raster-tileset-2d.d.ts.map +1 -0
- package/dist/raster-tileset/raster-tileset-2d.js +114 -0
- package/dist/raster-tileset/raster-tileset-2d.js.map +1 -0
- package/dist/raster-tileset/types.d.ts +162 -0
- package/dist/raster-tileset/types.d.ts.map +1 -0
- package/dist/raster-tileset/types.js +2 -0
- package/dist/raster-tileset/types.js.map +1 -0
- package/dist/raster-tileset-bak/index.d.ts +1 -0
- package/dist/raster-tileset-bak/index.d.ts.map +1 -0
- package/dist/raster-tileset-bak/index.js +2 -0
- package/dist/raster-tileset-bak/index.js.map +1 -0
- package/dist/raster-tileset-bak/raster-tile-traversal.d.ts +104 -0
- package/dist/raster-tileset-bak/raster-tile-traversal.d.ts.map +1 -0
- package/dist/raster-tileset-bak/raster-tile-traversal.js +390 -0
- package/dist/raster-tileset-bak/raster-tile-traversal.js.map +1 -0
- package/dist/raster-tileset-bak/raster-tileset-2d.d.ts +43 -0
- package/dist/raster-tileset-bak/raster-tileset-2d.d.ts.map +1 -0
- package/dist/raster-tileset-bak/raster-tileset-2d.js +288 -0
- package/dist/raster-tileset-bak/raster-tileset-2d.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
export { RasterDebugLayer } from "./raster-debug-layer.js";
|
|
2
|
-
export type { RasterDebugLayerProps } from "./raster-debug-layer.js";
|
|
3
1
|
export { RasterLayer } from "./raster-layer.js";
|
|
4
2
|
export type { RasterLayerProps } from "./raster-layer.js";
|
|
3
|
+
export { RasterTileset2D } from "./raster-tileset/index.js";
|
|
4
|
+
export type { TileMatrix, TileMatrixSet, TileMatrixSetBoundingBox, } from "./raster-tileset/types.js";
|
|
5
|
+
export declare const __TEST_EXPORTS: {
|
|
6
|
+
computeProjectedTileBounds: ({ x, y, transform, tileWidth, tileHeight, }: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
transform: [number, number, number, number, number, number];
|
|
10
|
+
tileWidth: number;
|
|
11
|
+
tileHeight: number;
|
|
12
|
+
}) => [number, number, number, number];
|
|
13
|
+
RasterTileNode: typeof import("./raster-tileset/raster-tile-traversal.js").RasterTileNode;
|
|
14
|
+
};
|
|
5
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,YAAY,EACV,UAAU,EACV,aAAa,EACb,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AAInC,eAAO,MAAM,cAAc;;;;;;;;;CAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { RasterDebugLayer } from "./raster-debug-layer.js";
|
|
2
1
|
export { RasterLayer } from "./raster-layer.js";
|
|
2
|
+
export { RasterTileset2D } from "./raster-tileset/index.js";
|
|
3
|
+
import { __TEST_EXPORTS as traversalTestExports } from "./raster-tileset/raster-tile-traversal.js";
|
|
4
|
+
export const __TEST_EXPORTS = { ...traversalTestExports };
|
|
3
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEnG,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,oBAAoB,EAAE,CAAC"}
|
package/dist/raster-layer.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type { CompositeLayerProps, UpdateParameters } from "@deck.gl/core";
|
|
1
|
+
import type { CompositeLayerProps, Layer, UpdateParameters } from "@deck.gl/core";
|
|
2
2
|
import { CompositeLayer } from "@deck.gl/core";
|
|
3
3
|
import type { SimpleMeshLayerProps } from "@deck.gl/mesh-layers";
|
|
4
|
-
import { SimpleMeshLayer } from "@deck.gl/mesh-layers";
|
|
5
4
|
import type { ReprojectionFns } from "@developmentseed/raster-reproject";
|
|
6
5
|
import { RasterReprojector } from "@developmentseed/raster-reproject";
|
|
6
|
+
type ParsedTriangle = {
|
|
7
|
+
idx: number;
|
|
8
|
+
geom: number[][];
|
|
9
|
+
};
|
|
7
10
|
export interface RasterLayerProps extends CompositeLayerProps {
|
|
8
11
|
/**
|
|
9
12
|
* Width of the input raster image in pixels
|
|
@@ -35,6 +38,8 @@ export interface RasterLayerProps extends CompositeLayerProps {
|
|
|
35
38
|
* @default 0.125
|
|
36
39
|
*/
|
|
37
40
|
maxError?: number;
|
|
41
|
+
debug?: boolean;
|
|
42
|
+
debugOpacity?: number;
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
45
|
* RasterLayer renders georeferenced raster data with client-side reprojection.
|
|
@@ -46,6 +51,7 @@ export declare class RasterLayer extends CompositeLayer<RasterLayerProps> {
|
|
|
46
51
|
static layerName: string;
|
|
47
52
|
static defaultProps: {
|
|
48
53
|
maxError: number;
|
|
54
|
+
debug: boolean;
|
|
49
55
|
};
|
|
50
56
|
state: {
|
|
51
57
|
reprojector?: RasterReprojector;
|
|
@@ -54,10 +60,13 @@ export declare class RasterLayer extends CompositeLayer<RasterLayerProps> {
|
|
|
54
60
|
indices: Uint32Array;
|
|
55
61
|
texCoords: Float32Array;
|
|
56
62
|
};
|
|
63
|
+
debugTriangles?: ParsedTriangle[];
|
|
57
64
|
};
|
|
58
65
|
initializeState(): void;
|
|
59
66
|
updateState(params: UpdateParameters<this>): void;
|
|
60
67
|
_generateMesh(): void;
|
|
61
|
-
|
|
68
|
+
_createDebugTriangles(): void;
|
|
69
|
+
renderLayers(): Layer<{}>[] | null;
|
|
62
70
|
}
|
|
71
|
+
export {};
|
|
63
72
|
//# sourceMappingURL=raster-layer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raster-layer.d.ts","sourceRoot":"","sources":["../src/raster-layer.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E,WAAW,CAAC;YACrB,SAAS,EAAE,YAAY,CAAC;SACzB,CAAC;QACF,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;KACnC,CAAC;IAEO,eAAe,IAAI,IAAI;IAIvB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAsBnD,aAAa,IAAI,IAAI;IAwCrB,qBAAqB,IAAI,IAAI;IAY7B,YAAY;CAoEb"}
|
package/dist/raster-layer.js
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
import { CompositeLayer } from "@deck.gl/core";
|
|
2
|
+
import { PolygonLayer } from "@deck.gl/layers";
|
|
2
3
|
import { SimpleMeshLayer } from "@deck.gl/mesh-layers";
|
|
3
4
|
import { RasterReprojector } from "@developmentseed/raster-reproject";
|
|
4
5
|
const DEFAULT_MAX_ERROR = 0.125;
|
|
6
|
+
const DEBUG_COLORS = [
|
|
7
|
+
[252, 73, 163], // pink
|
|
8
|
+
[255, 51, 204], // magenta-pink
|
|
9
|
+
[204, 102, 255], // purple-ish
|
|
10
|
+
[153, 51, 255], // deep purple
|
|
11
|
+
[102, 204, 255], // sky blue
|
|
12
|
+
[51, 153, 255], // clear blue
|
|
13
|
+
[102, 255, 204], // teal
|
|
14
|
+
[51, 255, 170], // aqua-teal
|
|
15
|
+
[0, 255, 0], // lime green
|
|
16
|
+
[51, 204, 51], // stronger green
|
|
17
|
+
[255, 204, 102], // light orange
|
|
18
|
+
[255, 179, 71], // golden-orange
|
|
19
|
+
[255, 102, 102], // salmon
|
|
20
|
+
[255, 80, 80], // red-salmon
|
|
21
|
+
[255, 0, 0], // red
|
|
22
|
+
[204, 0, 0], // crimson
|
|
23
|
+
[255, 128, 0], // orange
|
|
24
|
+
[255, 153, 51], // bright orange
|
|
25
|
+
[255, 255, 102], // yellow
|
|
26
|
+
[255, 255, 51], // lemon
|
|
27
|
+
[0, 255, 255], // turquoise
|
|
28
|
+
[0, 204, 255], // cyan
|
|
29
|
+
];
|
|
5
30
|
const defaultProps = {
|
|
6
31
|
maxError: DEFAULT_MAX_ERROR,
|
|
32
|
+
debug: false,
|
|
7
33
|
};
|
|
8
34
|
/**
|
|
9
35
|
* RasterLayer renders georeferenced raster data with client-side reprojection.
|
|
@@ -21,20 +47,36 @@ export class RasterLayer extends CompositeLayer {
|
|
|
21
47
|
super.updateState(params);
|
|
22
48
|
const { props, oldProps, changeFlags } = params;
|
|
23
49
|
// Regenerate mesh if key properties change
|
|
24
|
-
const
|
|
50
|
+
const needsMeshUpdate = Boolean(changeFlags.dataChanged) ||
|
|
25
51
|
props.width !== oldProps.width ||
|
|
26
52
|
props.height !== oldProps.height ||
|
|
27
53
|
props.reprojectionFns !== oldProps.reprojectionFns ||
|
|
28
54
|
props.maxError !== oldProps.maxError;
|
|
29
|
-
if (
|
|
55
|
+
if (needsMeshUpdate) {
|
|
30
56
|
this._generateMesh();
|
|
31
57
|
}
|
|
58
|
+
else if (props.debug && !oldProps.debug) {
|
|
59
|
+
// Even if the mesh wasn't changed, we may need to recreate debug
|
|
60
|
+
// triangles if debug was just enabled
|
|
61
|
+
this._createDebugTriangles();
|
|
62
|
+
}
|
|
32
63
|
}
|
|
33
64
|
_generateMesh() {
|
|
34
|
-
const { width, height, reprojectionFns, maxError = DEFAULT_MAX_ERROR, } = this.props;
|
|
35
|
-
|
|
65
|
+
const { width, height, reprojectionFns, maxError = DEFAULT_MAX_ERROR, debug = false, } = this.props;
|
|
66
|
+
// The mesh is lined up with the upper and left edges of the raster. So if
|
|
67
|
+
// we give the raster the same width and height as the number of pixels in
|
|
68
|
+
// the image, it'll be omitting the last row and column of pixels.
|
|
69
|
+
//
|
|
70
|
+
// To account for this, we add 1 to both width and height when generating
|
|
71
|
+
// the mesh. This also solves obvious gaps in between neighboring tiles in
|
|
72
|
+
// the COGLayer.
|
|
73
|
+
const reprojector = new RasterReprojector(reprojectionFns, width + 1, height + 1);
|
|
36
74
|
reprojector.run(maxError);
|
|
37
75
|
const { indices, positions, texCoords } = reprojectorToMesh(reprojector);
|
|
76
|
+
let debugTriangles = undefined;
|
|
77
|
+
if (debug) {
|
|
78
|
+
debugTriangles = reprojectorToTriangles(reprojector);
|
|
79
|
+
}
|
|
38
80
|
this.setState({
|
|
39
81
|
reprojector,
|
|
40
82
|
mesh: {
|
|
@@ -42,43 +84,76 @@ export class RasterLayer extends CompositeLayer {
|
|
|
42
84
|
indices,
|
|
43
85
|
texCoords,
|
|
44
86
|
},
|
|
87
|
+
debugTriangles,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
_createDebugTriangles() {
|
|
91
|
+
const { reprojector } = this.state;
|
|
92
|
+
if (!reprojector) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const debugTriangles = reprojectorToTriangles(reprojector);
|
|
96
|
+
this.setState({
|
|
97
|
+
debugTriangles,
|
|
45
98
|
});
|
|
46
99
|
}
|
|
47
100
|
renderLayers() {
|
|
48
101
|
const { mesh } = this.state;
|
|
49
|
-
const { texture } = this.props;
|
|
102
|
+
const { texture, debug } = this.props;
|
|
50
103
|
if (!mesh) {
|
|
51
104
|
return null;
|
|
52
105
|
}
|
|
53
106
|
const { indices, positions, texCoords } = mesh;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
const layers = [
|
|
108
|
+
new SimpleMeshLayer(this.getSubLayerProps({
|
|
109
|
+
id: "raster",
|
|
110
|
+
texture,
|
|
111
|
+
// Dummy data because we're only rendering _one_ instance of this mesh
|
|
112
|
+
// https://github.com/visgl/deck.gl/blob/93111b667b919148da06ff1918410cf66381904f/modules/geo-layers/src/terrain-layer/terrain-layer.ts#L241
|
|
113
|
+
data: [1],
|
|
114
|
+
mesh: {
|
|
115
|
+
indices: { value: indices, size: 1 },
|
|
116
|
+
attributes: {
|
|
117
|
+
POSITION: {
|
|
118
|
+
value: positions,
|
|
119
|
+
size: 3,
|
|
120
|
+
},
|
|
121
|
+
TEXCOORD_0: {
|
|
122
|
+
value: texCoords,
|
|
123
|
+
size: 2,
|
|
124
|
+
},
|
|
70
125
|
},
|
|
71
126
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
127
|
+
// We're only rendering a single mesh, without instancing
|
|
128
|
+
// https://github.com/visgl/deck.gl/blob/93111b667b919148da06ff1918410cf66381904f/modules/geo-layers/src/terrain-layer/terrain-layer.ts#L244
|
|
129
|
+
_instanced: false,
|
|
130
|
+
// Dummy accessors for the dummy data
|
|
131
|
+
// We place our mesh at the coordinate origin
|
|
132
|
+
getPosition: [0, 0, 0],
|
|
133
|
+
// We give a white color to turn off color mixing with the texture
|
|
134
|
+
getColor: [255, 255, 255],
|
|
135
|
+
})),
|
|
136
|
+
];
|
|
137
|
+
if (debug) {
|
|
138
|
+
const { debugTriangles } = this.state;
|
|
139
|
+
const { debugOpacity } = this.props;
|
|
140
|
+
if (debugTriangles) {
|
|
141
|
+
const debugLayer = new PolygonLayer(this.getSubLayerProps({
|
|
142
|
+
id: "polygon",
|
|
143
|
+
data: debugTriangles,
|
|
144
|
+
getPolygon: (d) => d.geom,
|
|
145
|
+
getFillColor: (d) => DEBUG_COLORS[d.idx % DEBUG_COLORS.length],
|
|
146
|
+
getLineColor: [0, 0, 0],
|
|
147
|
+
getLineWidth: 0,
|
|
148
|
+
lineWidthMinPixels: 1,
|
|
149
|
+
opacity: debugOpacity !== undefined && Number.isFinite(debugOpacity)
|
|
150
|
+
? Math.max(0, Math.min(1, debugOpacity))
|
|
151
|
+
: 1,
|
|
152
|
+
}));
|
|
153
|
+
layers.push(debugLayer);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return layers;
|
|
82
157
|
}
|
|
83
158
|
}
|
|
84
159
|
function reprojectorToMesh(reprojector) {
|
|
@@ -99,4 +174,25 @@ function reprojectorToMesh(reprojector) {
|
|
|
99
174
|
texCoords,
|
|
100
175
|
};
|
|
101
176
|
}
|
|
177
|
+
function reprojectorToTriangles(reprojector) {
|
|
178
|
+
const positions = reprojector.exactOutputPositions;
|
|
179
|
+
const triangles = reprojector.triangles;
|
|
180
|
+
const trianglePolygons = [];
|
|
181
|
+
for (let triangleIdx = 0; triangleIdx < triangles.length / 3; ++triangleIdx) {
|
|
182
|
+
const a = triangles[triangleIdx * 3];
|
|
183
|
+
const b = triangles[triangleIdx * 3 + 1];
|
|
184
|
+
const c = triangles[triangleIdx * 3 + 2];
|
|
185
|
+
const coords = [
|
|
186
|
+
[positions[a * 2], positions[a * 2 + 1]],
|
|
187
|
+
[positions[b * 2], positions[b * 2 + 1]],
|
|
188
|
+
[positions[c * 2], positions[c * 2 + 1]],
|
|
189
|
+
[positions[a * 2], positions[a * 2 + 1]],
|
|
190
|
+
];
|
|
191
|
+
trianglePolygons.push({
|
|
192
|
+
idx: triangleIdx,
|
|
193
|
+
geom: coords,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return trianglePolygons;
|
|
197
|
+
}
|
|
102
198
|
//# sourceMappingURL=raster-layer.js.map
|
package/dist/raster-layer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raster-layer.js","sourceRoot":"","sources":["../src/raster-layer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"raster-layer.js","sourceRoot":"","sources":["../src/raster-layer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,m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=raster-tile-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raster-tile-layer.d.ts","sourceRoot":"","sources":["../src/raster-tile-layer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raster-tile-layer.js","sourceRoot":"","sources":["../src/raster-tile-layer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/raster-tileset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/raster-tileset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file implements tile traversal for generic 2D tilesets defined by
|
|
3
|
+
* TileMatrixSet tile layouts.
|
|
4
|
+
*
|
|
5
|
+
* The main algorithm works as follows:
|
|
6
|
+
*
|
|
7
|
+
* 1. Start at the root tile(s) (z=0, covers the entire image, but not
|
|
8
|
+
* necessarily the whole world)
|
|
9
|
+
* 2. Test if each tile is visible using viewport frustum culling
|
|
10
|
+
* 3. For visible tiles, compute distance-based LOD (Level of Detail)
|
|
11
|
+
* 4. If LOD is insufficient, recursively subdivide into 4 child tiles
|
|
12
|
+
* 5. Select tiles at appropriate zoom levels based on distance from camera
|
|
13
|
+
*
|
|
14
|
+
* The result is a set of tiles at varying zoom levels that efficiently
|
|
15
|
+
* cover the visible area with appropriate detail.
|
|
16
|
+
*/
|
|
17
|
+
import { Viewport } from "@deck.gl/core";
|
|
18
|
+
import { CullingVolume, OrientedBoundingBox } from "@math.gl/culling";
|
|
19
|
+
import type { TileIndex, TileMatrix, TileMatrixSet, ZRange, Bounds } from "./types.js";
|
|
20
|
+
/**
|
|
21
|
+
* Raster Tile Node - represents a single tile in the TileMatrixSet structure
|
|
22
|
+
*
|
|
23
|
+
* Akin to the upstream OSMNode class.
|
|
24
|
+
*
|
|
25
|
+
* This node class uses the following coordinate system:
|
|
26
|
+
*
|
|
27
|
+
* - x: tile column (0 to TileMatrix.matrixWidth, left to right)
|
|
28
|
+
* - y: tile row (0 to TileMatrix.matrixHeight, top to bottom)
|
|
29
|
+
* - z: overview level. This assumes ordering where: 0 = coarsest, higher = finer
|
|
30
|
+
*/
|
|
31
|
+
export declare class RasterTileNode {
|
|
32
|
+
/** Index across a row */
|
|
33
|
+
x: number;
|
|
34
|
+
/** Index down a column */
|
|
35
|
+
y: number;
|
|
36
|
+
/** Zoom index assumed to be (higher = finer detail) */
|
|
37
|
+
z: number;
|
|
38
|
+
private metadata;
|
|
39
|
+
/**
|
|
40
|
+
* Flag indicating whether any descendant of this tile is visible.
|
|
41
|
+
*
|
|
42
|
+
* Used to prevent loading parent tiles when children are visible (avoids
|
|
43
|
+
* overdraw).
|
|
44
|
+
*/
|
|
45
|
+
private childVisible?;
|
|
46
|
+
/**
|
|
47
|
+
* Flag indicating this tile should be rendered
|
|
48
|
+
*
|
|
49
|
+
* Set to `true` when this is the appropriate LOD for its distance from camera.
|
|
50
|
+
*/
|
|
51
|
+
private selected?;
|
|
52
|
+
/** A cache of the children of this node. */
|
|
53
|
+
private _children?;
|
|
54
|
+
constructor(x: number, y: number, z: number, metadata: TileMatrixSet);
|
|
55
|
+
/** Get overview info for this tile's z level */
|
|
56
|
+
get tileMatrix(): TileMatrix;
|
|
57
|
+
/** Get the children of this node.
|
|
58
|
+
*
|
|
59
|
+
* Find all tiles at level this.z + 1 whose spatial extent overlaps this tile.
|
|
60
|
+
*
|
|
61
|
+
* A TileMatrixSet is not a quadtree, but rather a stack of independent grids. We can't cleanly find child tiles by decimation directly.
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
get children(): RasterTileNode[] | null;
|
|
65
|
+
/**
|
|
66
|
+
* Recursively traverse the tile pyramid to determine if this tile (or its
|
|
67
|
+
* descendants) should be rendered.
|
|
68
|
+
*
|
|
69
|
+
* I.e. “Given this tile node, should I render this tile, or should I recurse
|
|
70
|
+
* into its children?”
|
|
71
|
+
*
|
|
72
|
+
* The algorithm performs:
|
|
73
|
+
* 1. Visibility culling - reject tiles outside the view frustum
|
|
74
|
+
* 2. Bounds checking - reject tiles outside the specified geographic bounds
|
|
75
|
+
* 3. LOD selection - choose appropriate zoom level based on distance from camera
|
|
76
|
+
* 4. Recursive subdivision - if LOD is insufficient, test child tiles
|
|
77
|
+
*
|
|
78
|
+
* Additionally, there should never be overdraw, i.e. a tile should never be
|
|
79
|
+
* rendered if any of its descendants are rendered.
|
|
80
|
+
*
|
|
81
|
+
* @returns true if this tile or any descendant is visible, false otherwise
|
|
82
|
+
*/
|
|
83
|
+
update(params: {
|
|
84
|
+
viewport: Viewport;
|
|
85
|
+
project: ((xyz: number[]) => number[]) | null;
|
|
86
|
+
cullingVolume: CullingVolume;
|
|
87
|
+
elevationBounds: ZRange;
|
|
88
|
+
/** Minimum (coarsest) COG overview level */
|
|
89
|
+
minZ: number;
|
|
90
|
+
/** Maximum (finest) COG overview level */
|
|
91
|
+
maxZ?: number;
|
|
92
|
+
/** Optional geographic bounds filter */
|
|
93
|
+
bounds?: Bounds;
|
|
94
|
+
}): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Collect all tiles marked as selected in the tree.
|
|
97
|
+
* Recursively traverses the entire tree and gathers tiles where selected=true.
|
|
98
|
+
*
|
|
99
|
+
* @param result - Accumulator array for selected tiles
|
|
100
|
+
* @returns Array of selected OSMNode tiles
|
|
101
|
+
*/
|
|
102
|
+
getSelected(result?: RasterTileNode[]): RasterTileNode[];
|
|
103
|
+
/**
|
|
104
|
+
* Test if this tile intersects the specified bounds in Web Mercator space.
|
|
105
|
+
* Used to filter tiles when only a specific geographic region is needed.
|
|
106
|
+
*
|
|
107
|
+
* @param bounds - [minX, minY, maxX, maxY] in Web Mercator units (0-512)
|
|
108
|
+
* @returns true if tile overlaps the bounds
|
|
109
|
+
*/
|
|
110
|
+
insideBounds(bounds: Bounds, commonSpaceBounds: Bounds): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Calculate the 3D bounding volume for this tile in deck.gl's common
|
|
113
|
+
* coordinate space for frustum culling.
|
|
114
|
+
*
|
|
115
|
+
* TODO: In the future, we can add a fast path in the case that the source
|
|
116
|
+
* tiling is already in EPSG:3857.
|
|
117
|
+
*/
|
|
118
|
+
getBoundingVolume(zRange: ZRange, project: ((xyz: number[]) => number[]) | null): {
|
|
119
|
+
boundingVolume: OrientedBoundingBox;
|
|
120
|
+
commonSpaceBounds: Bounds;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Generic case - sample reference points and reproject to Web Mercator, then
|
|
124
|
+
* convert to deck.gl common space
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
private _getGenericBoundingVolume;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Compute the projected tile bounds in the tile matrix's CRS.
|
|
131
|
+
*
|
|
132
|
+
* Because it's a linear transformation from the tile index to projected bounds,
|
|
133
|
+
* we don't need to sample this for each of the reference points. We only need
|
|
134
|
+
* the corners.
|
|
135
|
+
*
|
|
136
|
+
* @return The bounding box as [minX, minY, maxX, maxY] in projected CRS.
|
|
137
|
+
*/
|
|
138
|
+
declare function computeProjectedTileBounds({ x, y, transform, tileWidth, tileHeight, }: {
|
|
139
|
+
x: number;
|
|
140
|
+
y: number;
|
|
141
|
+
transform: [number, number, number, number, number, number];
|
|
142
|
+
tileWidth: number;
|
|
143
|
+
tileHeight: number;
|
|
144
|
+
}): [number, number, number, number];
|
|
145
|
+
/**
|
|
146
|
+
* Get tile indices visible in viewport
|
|
147
|
+
* Uses frustum culling similar to OSM implementation
|
|
148
|
+
*
|
|
149
|
+
* Overviews follow TileMatrixSet ordering: index 0 = coarsest, higher = finer
|
|
150
|
+
*/
|
|
151
|
+
export declare function getTileIndices(metadata: TileMatrixSet, opts: {
|
|
152
|
+
viewport: Viewport;
|
|
153
|
+
maxZ: number;
|
|
154
|
+
zRange: ZRange | null;
|
|
155
|
+
}): TileIndex[];
|
|
156
|
+
/**
|
|
157
|
+
* Exports only for use in testing
|
|
158
|
+
*/
|
|
159
|
+
export declare const __TEST_EXPORTS: {
|
|
160
|
+
computeProjectedTileBounds: typeof computeProjectedTileBounds;
|
|
161
|
+
RasterTileNode: typeof RasterTileNode;
|
|
162
|
+
};
|
|
163
|
+
export {};
|
|
164
|
+
//# sourceMappingURL=raster-tile-traversal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raster-tile-traversal.d.ts","sourceRoot":"","sources":["../../src/raster-tileset/raster-tile-traversal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA0B,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,aAAa,EAEb,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,aAAa,EACb,MAAM,EACN,MAAM,EACP,MAAM,YAAY,CAAC;AAkEpB;;;;;;;;;;GAUG;AACH,qBAAa,cAAc;IACzB,yBAAyB;IACzB,CAAC,EAAE,MAAM,CAAC;IAEV,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IAEV,uDAAuD;IACvD,CAAC,EAAE,MAAM,CAAC;IAEV,OAAO,CAAC,QAAQ,CAAgB;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,YAAY,CAAC,CAAU;IAE/B;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,CAAU;IAE3B,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAC,CAA0B;gBAEhC,CAAC,EAAE,MAAM,E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