@gisatcz/deckgl-geolib 2.0.0 → 2.1.0-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/README.md +22 -20
- package/dist/cjs/index.js +4652 -4202
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +3 -3
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/types/core/CogTiles.d.ts +8 -22
- package/dist/cjs/types/core/GeoImage.d.ts +1 -0
- package/dist/cjs/types/core/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/layers/CogBitmapLayer.d.ts +3 -0
- package/dist/cjs/types/layers/CogTerrainLayer.d.ts +2 -0
- package/dist/esm/index.js +4651 -4201
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +3 -3
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/core/CogTiles.d.ts +8 -22
- package/dist/esm/types/core/GeoImage.d.ts +1 -0
- package/dist/esm/types/core/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/layers/CogBitmapLayer.d.ts +3 -0
- package/dist/esm/types/layers/CogTerrainLayer.d.ts +2 -0
- package/package.json +31 -26
|
@@ -8,16 +8,16 @@ declare class CogTiles {
|
|
|
8
8
|
cogOrigin: number[];
|
|
9
9
|
zoomRange: number[];
|
|
10
10
|
tileSize: number;
|
|
11
|
-
bounds:
|
|
11
|
+
bounds: [number, number, number, number];
|
|
12
12
|
geo: GeoImage;
|
|
13
13
|
options: GeoImageOptions;
|
|
14
14
|
constructor(options: GeoImageOptions);
|
|
15
15
|
initializeCog(url: string): Promise<void>;
|
|
16
16
|
getZoomRange(): number[];
|
|
17
|
-
calculateZoomRange(
|
|
18
|
-
calculateBoundsAsLatLon(
|
|
17
|
+
calculateZoomRange(tileSize: number, resolution: number, imgCount: number): number[];
|
|
18
|
+
calculateBoundsAsLatLon(bbox: number[]): [number, number, number, number];
|
|
19
19
|
getZoomLevelFromResolution(tileSize: number, resolution: number): number;
|
|
20
|
-
getBoundsAsLatLon():
|
|
20
|
+
getBoundsAsLatLon(): [number, number, number, number];
|
|
21
21
|
getLatLon(input: number[]): number[];
|
|
22
22
|
/**
|
|
23
23
|
* Builds lookup tables for zoom levels and estimated resolutions from a Cloud Optimized GeoTIFF (COG) object.
|
|
@@ -34,7 +34,7 @@ declare class CogTiles {
|
|
|
34
34
|
* - The first array (`zoomLookup`) maps each image index to its computed zoom level.
|
|
35
35
|
* - The second array (`resolutionLookup`) maps each image index to its estimated resolution (m/pixel).
|
|
36
36
|
*/
|
|
37
|
-
buildCogZoomResolutionLookup(cog:
|
|
37
|
+
buildCogZoomResolutionLookup(cog: GeoTIFF): Promise<any[][]>;
|
|
38
38
|
/**
|
|
39
39
|
* Determines the appropriate image index from the Cloud Optimized GeoTIFF (COG)
|
|
40
40
|
* that best matches a given zoom level.
|
|
@@ -47,7 +47,7 @@ declare class CogTiles {
|
|
|
47
47
|
* @returns {number} The index of the image in the COG that best matches the specified zoom level.
|
|
48
48
|
*/
|
|
49
49
|
getImageIndexForZoomLevel(zoom: any): number;
|
|
50
|
-
getTileFromImage(tileX: any, tileY: any, zoom: any): Promise<any[][] | Float32Array<ArrayBuffer>[] | import("geotiff").
|
|
50
|
+
getTileFromImage(tileX: any, tileY: any, zoom: any): Promise<any[][] | Float32Array<ArrayBuffer>[] | import("geotiff").TypedArrayWithDimensions[]>;
|
|
51
51
|
/**
|
|
52
52
|
* Creates a blank tile buffer filled with the "No Data" value.
|
|
53
53
|
*/
|
|
@@ -83,7 +83,7 @@ declare class CogTiles {
|
|
|
83
83
|
* @param {GeoTIFFImage} image - A GeoTIFF.js image.
|
|
84
84
|
* @returns {Promise<string>} - A string representing the data type.
|
|
85
85
|
*/
|
|
86
|
-
getDataTypeFromTags(
|
|
86
|
+
getDataTypeFromTags(fileDirectory: any): Promise<string>;
|
|
87
87
|
/**
|
|
88
88
|
* Extracts the noData value from a GeoTIFF.js image.
|
|
89
89
|
* Returns the noData value as a number (including NaN) if available, otherwise undefined.
|
|
@@ -91,21 +91,7 @@ declare class CogTiles {
|
|
|
91
91
|
* @param {GeoTIFFImage} image - The GeoTIFF.js image.
|
|
92
92
|
* @returns {number|undefined} The noData value, possibly NaN, or undefined if not set or invalid.
|
|
93
93
|
*/
|
|
94
|
-
getNoDataValue(image:
|
|
95
|
-
/**
|
|
96
|
-
* Retrieves the number of channels (samples per pixel) in a GeoTIFF image.
|
|
97
|
-
*
|
|
98
|
-
* @param {GeoTIFFImage} image - A GeoTIFFImage object from which to extract the number of channels.
|
|
99
|
-
* @returns {number} The number of channels in the image.
|
|
100
|
-
*/
|
|
101
|
-
getNumberOfChannels(image: any): any;
|
|
102
|
-
/**
|
|
103
|
-
* Retrieves the PlanarConfiguration value from a GeoTIFF image.
|
|
104
|
-
*
|
|
105
|
-
* @param {GeoTIFFImage} image - The GeoTIFF image object.
|
|
106
|
-
* @returns {number} The PlanarConfiguration value (1 for Chunky format, 2 for Planar format).
|
|
107
|
-
*/
|
|
108
|
-
getPlanarConfiguration(image: any): any;
|
|
94
|
+
getNoDataValue(image: GeoTIFFImage): number;
|
|
109
95
|
/**
|
|
110
96
|
* Creates a tile buffer of the specified size using a typed array corresponding to the provided data type.
|
|
111
97
|
*
|
|
@@ -6,6 +6,7 @@ export type ClampToTerrainOptions = {
|
|
|
6
6
|
};
|
|
7
7
|
export type GeoImageOptions = {
|
|
8
8
|
type: 'image' | 'terrain';
|
|
9
|
+
tesselator?: 'martini' | 'delatin';
|
|
9
10
|
format?: 'uint8' | 'uint16' | 'uint32' | 'int8' | 'int16' | 'int32' | 'float32' | 'float64';
|
|
10
11
|
useHeatMap?: boolean;
|
|
11
12
|
useColorsBasedOnValues?: boolean;
|
|
@@ -2,6 +2,7 @@ import { CompositeLayer, CompositeLayerProps, DefaultProps, TextureSource, Updat
|
|
|
2
2
|
import { _Tile2DHeader as Tile2DHeader, _TileLoadProps as TileLoadProps, GeoBoundingBox, NonGeoBoundingBox, TileLayer, TileLayerProps } from '@deck.gl/geo-layers';
|
|
3
3
|
import { BitmapLayer } from '@deck.gl/layers';
|
|
4
4
|
import type { MeshAttributes } from '@loaders.gl/schema';
|
|
5
|
+
import CogTiles from '../core/CogTiles';
|
|
5
6
|
import { GeoImageOptions } from '../core/GeoImage';
|
|
6
7
|
export type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;
|
|
7
8
|
export type ZRange = [minZ: number, maxZ: number];
|
|
@@ -30,6 +31,8 @@ type _CogBitmapLayerProps = {
|
|
|
30
31
|
*/
|
|
31
32
|
cogBitmapOptions: GeoImageOptions;
|
|
32
33
|
isTiled: boolean;
|
|
34
|
+
/** Pre-initialized CogTiles object */
|
|
35
|
+
cogTiles?: CogTiles;
|
|
33
36
|
/**
|
|
34
37
|
* @deprecated Use `loadOptions.terrain.workerUrl` instead
|
|
35
38
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisatcz/deckgl-geolib",
|
|
3
|
-
"version": "v2.0.0",
|
|
3
|
+
"version": "v2.1.0-dev.0",
|
|
4
4
|
"description": "Deck.gl extension for rendering Cloud-Optimized GeoTIFF (COG) data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deck.gl",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Gisat",
|
|
16
|
-
"homepage": "https://github.com/
|
|
16
|
+
"homepage": "https://github.com/Gisat/deck.gl-geotiff/tree/master/geoimage#readme",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/Gisat/deck.gl-geotiff.git",
|
|
@@ -46,40 +46,45 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"rollup": "rollup -c",
|
|
48
48
|
"start": "yarn && yarn rollup",
|
|
49
|
-
"lint": "eslint 'src/**/*.{js,ts,tsx}'
|
|
50
|
-
"lintFix": "eslint 'src/**/*.{js,ts,tsx}'
|
|
49
|
+
"lint": "eslint 'src/**/*.{js,ts,tsx}'",
|
|
50
|
+
"lintFix": "eslint 'src/**/*.{js,ts,tsx}' --fix"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@mapbox/martini": "^0.2.0",
|
|
54
|
+
"chroma-js": "^2.4.2",
|
|
55
|
+
"geotiff": "^3.0.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@deck.gl/core": ">=9.0.0",
|
|
59
|
+
"@deck.gl/extensions": ">=9.0.0",
|
|
60
|
+
"@deck.gl/geo-layers": ">=9.0.0",
|
|
61
|
+
"@deck.gl/layers": ">=9.0.0",
|
|
62
|
+
"@deck.gl/mesh-layers": ">=9.0.0",
|
|
63
|
+
"@loaders.gl/core": ">=4.0.0",
|
|
64
|
+
"@loaders.gl/loader-utils": ">=4.0.0",
|
|
65
|
+
"@loaders.gl/schema": ">=4.0.0",
|
|
66
|
+
"@math.gl/web-mercator": ">=4.0.0"
|
|
51
67
|
},
|
|
52
68
|
"devDependencies": {
|
|
69
|
+
"@deck.gl/core": "^9.0.33",
|
|
70
|
+
"@deck.gl/layers": "^9.0.33",
|
|
71
|
+
"@deck.gl/geo-layers": "^9.0.33",
|
|
72
|
+
"@deck.gl/mesh-layers": "^9.0.33",
|
|
73
|
+
"@deck.gl/extensions": "^9.0.33",
|
|
74
|
+
"@loaders.gl/core": "^4.3.1",
|
|
75
|
+
"@loaders.gl/loader-utils": "^4.3.1",
|
|
76
|
+
"@loaders.gl/schema": "^4.3.1",
|
|
77
|
+
"@math.gl/web-mercator": "^4.0.0",
|
|
53
78
|
"@rollup/plugin-commonjs": "^25.0.1",
|
|
54
79
|
"@rollup/plugin-json": "^6.0.0",
|
|
55
80
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
81
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
56
82
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
57
83
|
"@types/chroma-js": "^2.4.0",
|
|
58
|
-
"
|
|
59
|
-
"eslint": "^8.43.0",
|
|
84
|
+
"eslint": "^9.0.0",
|
|
60
85
|
"rollup": "^3.25.1",
|
|
61
86
|
"rollup-plugin-dts": "^5.3.0",
|
|
62
87
|
"rollup-plugin-filesize": "^10.0.0",
|
|
63
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
64
88
|
"typescript": "^5.0.4"
|
|
65
|
-
},
|
|
66
|
-
"dependencies": {
|
|
67
|
-
"@chunkd/source-http": "^11.1.0",
|
|
68
|
-
"@deck.gl/core": "^9.0.33",
|
|
69
|
-
"@deck.gl/extensions": "^9.0.33",
|
|
70
|
-
"@deck.gl/geo-layers": "^9.0.33",
|
|
71
|
-
"@deck.gl/layers": "^9.0.33",
|
|
72
|
-
"@deck.gl/mesh-layers": "^9.0.33",
|
|
73
|
-
"@deck.gl/react": "^9.0.33",
|
|
74
|
-
"@deck.gl/widgets": "^9.0.33",
|
|
75
|
-
"@loaders.gl/loader-utils": "^4.3.1",
|
|
76
|
-
"@loaders.gl/schema": "^4.3.1",
|
|
77
|
-
"@luma.gl/constants": "^9.0.27",
|
|
78
|
-
"@mapbox/martini": "^0.2.0",
|
|
79
|
-
"@math.gl/web-mercator": "^4.1.0",
|
|
80
|
-
"chroma-js": "^2.4.2",
|
|
81
|
-
"geotiff": "^2.1.3",
|
|
82
|
-
"jpeg-js": "^0.4.4",
|
|
83
|
-
"pako": "^2.1.0"
|
|
84
89
|
}
|
|
85
90
|
}
|