@gisatcz/deckgl-geolib 1.2.0 → 1.2.1-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/dist/cjs/index.js +2 -2
- 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/cogbitmaplayer/CogBitmapLayer.d.ts +1 -4
- package/dist/cjs/types/cogterrainlayer/CogTerrainLayer.d.ts +1 -4
- package/dist/esm/index.js +2 -2
- 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/cogbitmaplayer/CogBitmapLayer.d.ts +1 -4
- package/dist/esm/types/cogterrainlayer/CogTerrainLayer.d.ts +1 -4
- package/package.json +3 -4
- package/rollup.config.mjs +7 -4
- package/src/geoimage/geoimage.ts +2 -2
- package/tsconfig.json +3 -0
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="deck.gl" />
|
|
2
|
-
/// <reference types="deck.gl" />
|
|
3
1
|
import { CompositeLayer } from '@deck.gl/core';
|
|
4
|
-
import { TileLayer } from '@deck.gl/geo-layers';
|
|
5
2
|
import { GeoImageOptions } from '../geoimage/geoimage';
|
|
6
3
|
declare class CogBitmapLayer extends CompositeLayer<any> {
|
|
7
4
|
static layerName: string;
|
|
@@ -11,6 +8,6 @@ declare class CogBitmapLayer extends CompositeLayer<any> {
|
|
|
11
8
|
constructor(id: string, url: string, options: GeoImageOptions);
|
|
12
9
|
initializeState(): void;
|
|
13
10
|
init(url: string): Promise<void>;
|
|
14
|
-
renderLayers():
|
|
11
|
+
renderLayers(): any;
|
|
15
12
|
}
|
|
16
13
|
export default CogBitmapLayer;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="deck.gl" />
|
|
2
|
-
/// <reference types="deck.gl" />
|
|
3
1
|
import { CompositeLayer } from '@deck.gl/core';
|
|
4
|
-
import { TileLayer } from '@deck.gl/geo-layers';
|
|
5
2
|
import { GeoImageOptions } from '../geoimage/geoimage';
|
|
6
3
|
declare class CogTerrainLayer extends CompositeLayer<any> {
|
|
7
4
|
static layerName: string;
|
|
@@ -13,6 +10,6 @@ declare class CogTerrainLayer extends CompositeLayer<any> {
|
|
|
13
10
|
constructor(id: string, terrainUrl: string, terrainOptions: GeoImageOptions, bitmapUrl?: string, bitmapOptions?: GeoImageOptions);
|
|
14
11
|
initializeState(): void;
|
|
15
12
|
init(terrainUrl: string): Promise<void>;
|
|
16
|
-
renderLayers():
|
|
13
|
+
renderLayers(): any[];
|
|
17
14
|
}
|
|
18
15
|
export default CogTerrainLayer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisatcz/deckgl-geolib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1-dev.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"@rollup/plugin-json": "^6.0.0",
|
|
18
18
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
19
19
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
20
|
-
"@
|
|
21
|
-
"@typescript-eslint/parser": "^5.59.9",
|
|
20
|
+
"@types/pako": "^2.0.0",
|
|
22
21
|
"eslint": "^8.42.0",
|
|
23
22
|
"eslint-config-airbnb": "^19.0.4",
|
|
24
23
|
"eslint-config-prettier": "^8.3.0",
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
"eslint-plugin-promise": "^5.2.0",
|
|
30
29
|
"eslint-plugin-react": "^7.32.2",
|
|
31
30
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
32
|
-
"prettier": "^2.5.1",
|
|
33
31
|
"rollup-plugin-dts": "^5.3.0",
|
|
34
32
|
"rollup-plugin-terser": "^7.0.2",
|
|
35
33
|
"typescript": "^5.0.4"
|
|
@@ -42,6 +40,7 @@
|
|
|
42
40
|
"@deck.gl/geo-layers": "^8.9.18",
|
|
43
41
|
"@deck.gl/layers": "^8.9.18",
|
|
44
42
|
"@deck.gl/mesh-layers": "^8.9.18",
|
|
43
|
+
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
45
44
|
"@math.gl/web-mercator": "^3.6.3",
|
|
46
45
|
"@types/chroma-js": "^2.4.0",
|
|
47
46
|
"chroma-js": "^2.4.2",
|
package/rollup.config.mjs
CHANGED
|
@@ -6,8 +6,6 @@ import { terser } from 'rollup-plugin-terser';
|
|
|
6
6
|
import json from '@rollup/plugin-json';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
|
|
9
|
-
// import resolve from 'rollup-plugin-node-resolve';
|
|
10
|
-
|
|
11
9
|
const packageJson = {
|
|
12
10
|
main: './dist/cjs/',
|
|
13
11
|
module: './dist/esm/',
|
|
@@ -29,34 +27,39 @@ export default [
|
|
|
29
27
|
'@loaders.gl/core',
|
|
30
28
|
],
|
|
31
29
|
input: './src/index.ts',
|
|
32
|
-
inlineDynamicImports: true,
|
|
33
30
|
output: [
|
|
34
31
|
{
|
|
35
32
|
file: path.join(packageJson.main, 'index.js'),
|
|
36
33
|
format: 'cjs',
|
|
37
34
|
sourcemap: true,
|
|
35
|
+
inlineDynamicImports: true,
|
|
38
36
|
},
|
|
39
37
|
{
|
|
40
38
|
file: path.join(packageJson.main, 'index.min.js'),
|
|
41
39
|
format: 'cjs',
|
|
42
40
|
sourcemap: true,
|
|
43
41
|
plugins: [terser()],
|
|
42
|
+
inlineDynamicImports: true,
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
45
|
file: path.join(packageJson.module, 'index.js'),
|
|
47
46
|
format: 'esm',
|
|
48
47
|
sourcemap: true,
|
|
48
|
+
inlineDynamicImports: true,
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
file: path.join(packageJson.module, 'index.min.js'),
|
|
52
52
|
format: 'esm',
|
|
53
53
|
sourcemap: true,
|
|
54
54
|
plugins: [terser()],
|
|
55
|
+
inlineDynamicImports: true,
|
|
55
56
|
},
|
|
56
57
|
],
|
|
57
58
|
plugins: [
|
|
58
59
|
json(),
|
|
59
|
-
resolve(
|
|
60
|
+
resolve({
|
|
61
|
+
preferBuiltins: true,
|
|
62
|
+
}),
|
|
60
63
|
commonjs(),
|
|
61
64
|
typescript({ tsconfig: './tsconfig.json', exclude: ['**.js'] }),
|
|
62
65
|
],
|
package/src/geoimage/geoimage.ts
CHANGED
|
@@ -317,7 +317,7 @@ export default class GeoImage {
|
|
|
317
317
|
let maxValue = options.maxValue ? options.maxValue : Number.MIN_VALUE;
|
|
318
318
|
let minValue = options.minValue ? options.minValue : Number.MAX_VALUE;
|
|
319
319
|
for (let idx = 0; idx < array.length; idx += 1) {
|
|
320
|
-
if (
|
|
320
|
+
if (options.noDataValue === undefined || array[idx] !== options.noDataValue) {
|
|
321
321
|
if (array[idx] > maxValue) maxValue = array[idx];
|
|
322
322
|
if (array[idx] < minValue) minValue = array[idx];
|
|
323
323
|
}
|
|
@@ -336,7 +336,7 @@ export default class GeoImage {
|
|
|
336
336
|
|
|
337
337
|
for (let i = 0; i < arrayLength; i += 4) {
|
|
338
338
|
let pixelColor = options.nullColor;
|
|
339
|
-
if (
|
|
339
|
+
if (options.noDataValue === undefined || dataArray[pixel] !== options.noDataValue) {
|
|
340
340
|
if (
|
|
341
341
|
(options.clipLow != null && dataArray[pixel] <= options.clipLow)
|
|
342
342
|
|| (options.clipHigh != null && dataArray[pixel] >= options.clipHigh)
|