@gisatcz/deckgl-geolib 2.5.0-dev.1 → 2.5.0-dev.2

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.
@@ -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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisatcz/deckgl-geolib",
3
- "version": "2.5.0-dev.1",
3
+ "version": "2.5.0-dev.2",
4
4
  "description": "Deck.gl extension for rendering Cloud-Optimized GeoTIFF (COG) data",
5
5
  "keywords": [
6
6
  "deck.gl",