@gisatcz/deckgl-geolib 1.4.2 → 1.4.3-dev.0
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/CHANGELOG.md +0 -12
- package/dist/cjs/index.js +13 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/types/geoimage/geoimage.d.ts +1 -0
- package/dist/esm/index.js +13 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/geoimage/geoimage.d.ts +1 -0
- package/package.json +1 -1
- package/src/cogterrainlayer/CogTerrainLayer.ts +2 -0
- package/src/geoimage/geoimage.ts +13 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
# v1.4.2 (Wed Jun 21 2023)
|
|
2
|
-
|
|
3
|
-
#### 🐾 Patch
|
|
4
|
-
|
|
5
|
-
- remove unused line [#22](https://github.com/gisat-panther/deck.gl-geotiff/pull/22) ([@vdubr](https://github.com/vdubr))
|
|
6
|
-
|
|
7
|
-
#### Authors: 1
|
|
8
|
-
|
|
9
|
-
- Vojtěch Dubrovský ([@vdubr](https://github.com/vdubr))
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
1
|
# v1.4.1 (Tue Jun 20 2023)
|
|
14
2
|
|
|
15
3
|
#### ⚠️ Pushed to `master`
|
package/dist/cjs/index.js
CHANGED
|
@@ -14106,14 +14106,18 @@ class GeoImage {
|
|
|
14106
14106
|
imageData.data[index] = value;
|
|
14107
14107
|
});
|
|
14108
14108
|
}
|
|
14109
|
+
// RGB values in one channel
|
|
14109
14110
|
if (rasters[0].length / (width * height) === 3) {
|
|
14110
14111
|
// console.log("geoImage: " + "RGB 1 array of length: " + rasters[0].length);
|
|
14111
14112
|
let pixel = 0;
|
|
14112
|
-
for (let
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14113
|
+
for (let idx = 0; idx < size; idx += 4) {
|
|
14114
|
+
const rgbColor = [rasters[0][pixel], rasters[0][pixel + 1], rasters[0][pixel + 2]];
|
|
14115
|
+
const rgbaColor = this.hasPixelsNoData(rgbColor, optionsLocal.noDataValue)
|
|
14116
|
+
? optionsLocal.nullColor
|
|
14117
|
+
: [...rgbColor, optionsLocal.alpha];
|
|
14118
|
+
// eslint-disable-next-line max-len
|
|
14119
|
+
[imageData.data[idx], imageData.data[idx + 1], imageData.data[idx + 2], imageData.data[idx + 3]] = rgbaColor;
|
|
14120
|
+
pixel += 3;
|
|
14117
14121
|
}
|
|
14118
14122
|
}
|
|
14119
14123
|
if (rasters[0].length / (width * height) === 4) {
|
|
@@ -14256,6 +14260,9 @@ class GeoImage {
|
|
|
14256
14260
|
}
|
|
14257
14261
|
return colorDefinition;
|
|
14258
14262
|
}
|
|
14263
|
+
hasPixelsNoData(pixels, noDataValue) {
|
|
14264
|
+
return noDataValue !== undefined && pixels.every((pixel) => pixel === noDataValue);
|
|
14265
|
+
}
|
|
14259
14266
|
}
|
|
14260
14267
|
|
|
14261
14268
|
const EARTH_CIRCUMFERENCE = 40075000.0;
|
|
@@ -14661,6 +14668,7 @@ class CogTerrainLayer extends core.CompositeLayer {
|
|
|
14661
14668
|
};
|
|
14662
14669
|
this.init(this.terrainUrl);
|
|
14663
14670
|
}
|
|
14671
|
+
// async initializeState() {}
|
|
14664
14672
|
init(terrainUrl) {
|
|
14665
14673
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14666
14674
|
// console.log("LAYER INITIALIZE STATE");
|