@gisatcz/deckgl-geolib 2.5.0-dev.1 → 2.5.0-dev.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.
- package/dist/cjs/index.js +142 -48
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +2 -2
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/esm/index.js +142 -48
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/core/GeoImage.d.ts +21 -0
- package/dist/esm/types/core/lib/BitmapGenerator.d.ts +14 -0
- package/dist/esm/types/core/lib/TerrainGenerator.d.ts +1 -1
- package/dist/esm/types/core/types.d.ts +19 -0
- package/package.json +1 -1
|
@@ -11,6 +11,27 @@ export default class GeoImage {
|
|
|
11
11
|
bounds: Bounds;
|
|
12
12
|
cellSizeMeters?: number;
|
|
13
13
|
}, options: GeoImageOptions, meshMaxError: number): Promise<TileResult | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the active visualization (coloring) mode after merging user options with defaults.
|
|
16
|
+
*
|
|
17
|
+
* Solves three key issues:
|
|
18
|
+
*
|
|
19
|
+
* 1. **Mutual exclusivity**: `DefaultGeoImageOptions` sets `useHeatMap: true`. If a user
|
|
20
|
+
* explicitly enables a coloring mode without explicitly setting `useHeatMap: false`,
|
|
21
|
+
* enforce that only the explicitly-enabled modes are active (all others forced to false).
|
|
22
|
+
* This prevents the default `useHeatMap: true` from interfering with user-chosen modes.
|
|
23
|
+
*
|
|
24
|
+
* 2. **Bitmap default**: for `type === 'image'` with no user-specified coloring mode,
|
|
25
|
+
* keep `useHeatMap: true` from defaults. This provides sensible data-driven visualization.
|
|
26
|
+
*
|
|
27
|
+
* 3. **Terrain default**: for `type === 'terrain'` with no user-specified coloring mode and
|
|
28
|
+
* no kernel-texture mode (`useSwissRelief` / `useSlope` / `useHillshade`), enable
|
|
29
|
+
* `useSingleColor` with `color = terrainColor`. This renders the mesh in the documented
|
|
30
|
+
* default colour (grey) without a data-driven texture overlay. When a kernel mode IS
|
|
31
|
+
* present but no coloring mode is specified, keep `useHeatMap: true` so the kernel output
|
|
32
|
+
* is still colourised.
|
|
33
|
+
*/
|
|
34
|
+
static resolveVisualizationMode(mergedOptions: GeoImageOptions, userOptions: GeoImageOptions): GeoImageOptions;
|
|
14
35
|
getHeightmap(input: string | {
|
|
15
36
|
bounds: Bounds;
|
|
16
37
|
width: number;
|
|
@@ -5,6 +5,20 @@ export declare class BitmapGenerator {
|
|
|
5
5
|
* Key: colorScale config + range, Value: pre-computed RGBA LUT
|
|
6
6
|
*/
|
|
7
7
|
private static _swissColorLUTCache;
|
|
8
|
+
/**
|
|
9
|
+
* Cache for 8-bit (256-entry) color LUTs.
|
|
10
|
+
* Shared process-wide across all tiles and datasets when options are fixed (i.e. !useAutoRange).
|
|
11
|
+
* Key: serialised coloring options, Value: pre-computed 256×RGBA LUT
|
|
12
|
+
*/
|
|
13
|
+
private static _8bitLUTCache;
|
|
14
|
+
/**
|
|
15
|
+
* Cache for float/16-bit (1024-entry) heatmap LUTs.
|
|
16
|
+
* Shared process-wide across all tiles and datasets when !useAutoRange.
|
|
17
|
+
* Key: serialised coloring options + range, Value: pre-computed 1024×RGBA LUT
|
|
18
|
+
*/
|
|
19
|
+
private static _floatLUTCache;
|
|
20
|
+
/** Build a cache key that captures all options affecting LUT colour output. */
|
|
21
|
+
private static getLUTCacheKey;
|
|
8
22
|
/**
|
|
9
23
|
* Main entry point: Generates an ImageBitmap from raw raster data.
|
|
10
24
|
*/
|
|
@@ -29,7 +29,7 @@ export declare class TerrainGenerator {
|
|
|
29
29
|
vertices: any;
|
|
30
30
|
triangles: any;
|
|
31
31
|
};
|
|
32
|
-
static getMeshAttributes(vertices: Uint16Array | Uint32Array | Float32Array | Float64Array, terrain: Float32Array, width: number, height: number, bounds: Bounds | number[]): {
|
|
32
|
+
static getMeshAttributes(vertices: Uint16Array | Uint32Array | Float32Array | Float64Array, terrain: Float32Array, width: number, height: number, bounds: Bounds | number[], verticalExaggeration?: number): {
|
|
33
33
|
POSITION: {
|
|
34
34
|
value: Float32Array<ArrayBuffer>;
|
|
35
35
|
size: number;
|
|
@@ -20,7 +20,26 @@ export type GeoImageOptions = {
|
|
|
20
20
|
/** 0-based index of the channel to visualize (e.g. 0 for the first channel). Alternative to useChannel. */
|
|
21
21
|
useChannelIndex?: number | null;
|
|
22
22
|
noDataValue?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Scalar applied to raw raster values before Martini/Delatin tessellation.
|
|
25
|
+
* Use this to convert or normalize source elevation values into the units that
|
|
26
|
+
* should be seen by the tessellator (e.g. convert raw values to metres).
|
|
27
|
+
* Because the scaled values are used during tessellation, changing `multiplier`
|
|
28
|
+
* also changes the effective mesh density unless `meshMaxError` is adjusted.
|
|
29
|
+
* `meshMaxError` must be specified in the same units as the post-`multiplier`
|
|
30
|
+
* elevation values.
|
|
31
|
+
* Default: 1.0
|
|
32
|
+
*/
|
|
23
33
|
multiplier?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Vertical scale factor applied **only** to mesh vertex z positions, after
|
|
36
|
+
* tessellation. Use this for **visual exaggeration** (make terrain look taller).
|
|
37
|
+
* Unlike `multiplier`, this does not affect `meshMaxError` — the error threshold
|
|
38
|
+
* is always evaluated against real-world (post-`multiplier`) elevation values.
|
|
39
|
+
* The skirt height is scaled by this factor automatically.
|
|
40
|
+
* Default: 1.0
|
|
41
|
+
*/
|
|
42
|
+
verticalExaggeration?: number;
|
|
24
43
|
numOfChannels?: number;
|
|
25
44
|
planarConfig?: number;
|
|
26
45
|
tesselator?: 'martini' | 'delatin';
|