@gisatcz/deckgl-geolib 2.3.0 → 2.4.0-dev.1
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/README.md +35 -5
- package/dist/cjs/index.js +381 -169
- 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 +381 -169
- 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/CogTiles.d.ts +2 -2
- package/dist/esm/types/core/GeoImage.d.ts +2 -0
- package/dist/esm/types/core/lib/KernelGenerator.d.ts +31 -0
- package/dist/esm/types/core/lib/TerrainGenerator.d.ts +6 -1
- package/dist/esm/types/core/types.d.ts +19 -12
- package/dist/esm/types/layers/CogTerrainLayer.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,10 @@ This library allows you to efficiently visualize high-resolution bitmap and terr
|
|
|
16
16
|
|
|
17
17
|
- **COG Rendering**: Efficiently loads and displays COG files directly without a backend server.
|
|
18
18
|
- **Bitmap and Terrain Layers**: Supports visualizing both raster and elevation data.
|
|
19
|
-
- **Customizable Rendering**:
|
|
19
|
+
- **Customizable Rendering**: Custom color scales, multichannel support, heatmaps, categorical classification, and opacity control.
|
|
20
|
+
- **Terrain Texturing**: Drape a styled visualization (elevation heatmap, external imagery) directly onto the 3D terrain mesh — no separate layer needed.
|
|
21
|
+
- **Kernel Analysis**: Compute slope and hillshade directly from elevation data using 3×3 neighborhood kernels (Horn's method / ESRI algorithm).
|
|
22
|
+
- **Raw Value Picking**: Access original raster values (elevation, band values, slope, hillshade) at hover/click locations with no extra network requests.
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
## Installation
|
|
@@ -33,7 +36,7 @@ For more information, visit the [npm package page](https://www.npmjs.com/package
|
|
|
33
36
|
|
|
34
37
|
## Documentation
|
|
35
38
|
|
|
36
|
-
* **[Layer Showcase](docs/showcase-layers.md)** – Visual examples (RGB, Heatmaps, Terrain).
|
|
39
|
+
* **[Layer Showcase](docs/showcase-layers.md)** – Visual examples (RGB, Heatmaps, Terrain, Slope/Hillshade, Picking).
|
|
37
40
|
* **[API Reference](docs/api-reference.md)** – Detailed property configuration.
|
|
38
41
|
* **[Internal Architecture](docs/generators.md)** – Technical details about the core processing engines.
|
|
39
42
|
|
|
@@ -58,24 +61,51 @@ const cogLayer = new CogBitmapLayer({
|
|
|
58
61
|
|
|
59
62
|
### 2. CogTerrainLayer
|
|
60
63
|
|
|
61
|
-
Used for displaying 3D terrain from elevation data.
|
|
62
|
-
|
|
64
|
+
Used for displaying 3D terrain from elevation data. Supports draping a styled texture derived from the elevation itself.
|
|
63
65
|
|
|
64
66
|
```typescript
|
|
65
67
|
import { CogTerrainLayer } from '@gisatcz/deckgl-geolib';
|
|
66
68
|
|
|
67
69
|
const cogLayer = new CogTerrainLayer({
|
|
68
70
|
id: 'cog_terrain_name',
|
|
69
|
-
elevationData:
|
|
71
|
+
elevationData: 'cog_terrain_data_url.tif',
|
|
70
72
|
isTiled: true,
|
|
71
73
|
tileSize: 256,
|
|
72
74
|
operation: 'terrain+draw',
|
|
73
75
|
terrainOptions: {
|
|
74
76
|
type: 'terrain',
|
|
77
|
+
useHeatMap: true,
|
|
78
|
+
useChannel: 1,
|
|
79
|
+
colorScale: ['#440154', '#20908d', '#fde725'],
|
|
80
|
+
colorScaleValueRange: [0, 3000],
|
|
75
81
|
}
|
|
76
82
|
});
|
|
77
83
|
```
|
|
78
84
|
|
|
85
|
+
### 3. Kernel Analysis (Slope & Hillshade)
|
|
86
|
+
|
|
87
|
+
Compute slope or hillshade directly from elevation data and drape it as a texture on the terrain mesh.
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { CogTerrainLayer } from '@gisatcz/deckgl-geolib';
|
|
91
|
+
|
|
92
|
+
const slopeLayer = new CogTerrainLayer({
|
|
93
|
+
id: 'cog_slope',
|
|
94
|
+
elevationData: 'cog_terrain_data_url.tif',
|
|
95
|
+
isTiled: true,
|
|
96
|
+
tileSize: 256,
|
|
97
|
+
operation: 'terrain+draw',
|
|
98
|
+
terrainOptions: {
|
|
99
|
+
type: 'terrain',
|
|
100
|
+
useChannel: 1,
|
|
101
|
+
useSlope: true, // or useHillshade: true
|
|
102
|
+
useHeatMap: true,
|
|
103
|
+
colorScale: [[255, 255, 255], [235, 200, 150], [200, 80, 50], [100, 40, 30]],
|
|
104
|
+
colorScaleValueRange: [0, 90], // degrees
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
79
109
|
|
|
80
110
|
## Data Preparation
|
|
81
111
|
|