@gisatcz/deckgl-geolib 1.10.2-dev.5 → 1.10.2-dev.6
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 +10 -14
- 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/cogterrainlayer/CogTerrainLayer.d.ts +4 -0
- package/dist/cjs/types/cogtiles/cogtiles.d.ts +1 -1
- package/dist/cjs/types/geoimage/geoimage.d.ts +2 -2
- package/dist/esm/index.js +10 -14
- 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/cogterrainlayer/CogTerrainLayer.d.ts +4 -0
- package/dist/esm/types/cogtiles/cogtiles.d.ts +1 -1
- package/dist/esm/types/geoimage/geoimage.d.ts +2 -2
- package/package.json +1 -1
- package/src/cogterrainlayer/CogTerrainLayer.ts +10 -4
- package/src/cogtiles/cogtiles.ts +2 -2
- package/src/geoimage/geoimage.ts +5 -3
package/dist/cjs/index.js
CHANGED
|
@@ -14790,21 +14790,21 @@ class GeoImage {
|
|
|
14790
14790
|
this.data = data;
|
|
14791
14791
|
});
|
|
14792
14792
|
}
|
|
14793
|
-
getMap(input, options) {
|
|
14793
|
+
getMap(input, options, meshMaxError) {
|
|
14794
14794
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14795
14795
|
const mergedOptions = Object.assign(Object.assign({}, DefaultGeoImageOptions), options);
|
|
14796
14796
|
switch (mergedOptions.type) {
|
|
14797
14797
|
case 'image':
|
|
14798
14798
|
return this.getBitmap(input, mergedOptions);
|
|
14799
14799
|
case 'terrain':
|
|
14800
|
-
return this.getHeightmap(input, mergedOptions);
|
|
14800
|
+
return this.getHeightmap(input, mergedOptions, meshMaxError);
|
|
14801
14801
|
default:
|
|
14802
14802
|
return null;
|
|
14803
14803
|
}
|
|
14804
14804
|
});
|
|
14805
14805
|
}
|
|
14806
14806
|
// GetHeightmap uses only "useChannel" and "multiplier" options
|
|
14807
|
-
getHeightmap(input, options) {
|
|
14807
|
+
getHeightmap(input, options, meshMaxError) {
|
|
14808
14808
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14809
14809
|
let rasters = [];
|
|
14810
14810
|
let width;
|
|
@@ -14853,7 +14853,7 @@ class GeoImage {
|
|
|
14853
14853
|
let mesh;
|
|
14854
14854
|
switch (tesselator) {
|
|
14855
14855
|
case 'martini':
|
|
14856
|
-
mesh = getMartiniTileMesh(
|
|
14856
|
+
mesh = getMartiniTileMesh(meshMaxError, width, terrain);
|
|
14857
14857
|
break;
|
|
14858
14858
|
case 'delatin':
|
|
14859
14859
|
mesh = getDelatinTileMesh(meshMaxError, width, height, terrain);
|
|
@@ -14862,7 +14862,7 @@ class GeoImage {
|
|
|
14862
14862
|
if (width === height && !(height && (width - 1))) {
|
|
14863
14863
|
// fixme get terrain to separate method
|
|
14864
14864
|
// terrain = getTerrain(data, width, height, elevationDecoder, 'martini');
|
|
14865
|
-
mesh = getMartiniTileMesh(
|
|
14865
|
+
mesh = getMartiniTileMesh(meshMaxError, width, terrain);
|
|
14866
14866
|
}
|
|
14867
14867
|
else {
|
|
14868
14868
|
// fixme get terrain to separate method
|
|
@@ -15297,7 +15297,7 @@ class CogTiles {
|
|
|
15297
15297
|
const cartographicPositionAdjusted = [cartographicPosition[0], -cartographicPosition[1]];
|
|
15298
15298
|
return cartographicPositionAdjusted;
|
|
15299
15299
|
}
|
|
15300
|
-
getTile(x, y, z, bounds) {
|
|
15300
|
+
getTile(x, y, z, bounds, meshMaxError) {
|
|
15301
15301
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15302
15302
|
const wantedMpp = this.getResolutionFromZoomLevel(this.tileSize, z);
|
|
15303
15303
|
const img = this.cog.getImageByResolution(wantedMpp);
|
|
@@ -15395,7 +15395,7 @@ class CogTiles {
|
|
|
15395
15395
|
width: this.tileSize,
|
|
15396
15396
|
height: this.tileSize,
|
|
15397
15397
|
bounds,
|
|
15398
|
-
}, this.options);
|
|
15398
|
+
}, this.options, meshMaxError);
|
|
15399
15399
|
// console.log(decompressed.length)
|
|
15400
15400
|
return decompressed;
|
|
15401
15401
|
}
|
|
@@ -15654,11 +15654,7 @@ class TerrainLayer extends core.CompositeLayer {
|
|
|
15654
15654
|
|| props.meshMaxError !== oldProps.meshMaxError
|
|
15655
15655
|
|| props.elevationDecoder !== oldProps.elevationDecoder
|
|
15656
15656
|
|| props.bounds !== oldProps.bounds;
|
|
15657
|
-
if (!this.state.isTiled && shouldReload)
|
|
15658
|
-
// When state.isTiled, elevationData cannot be an array
|
|
15659
|
-
const terrain = this.loadTerrain(props);
|
|
15660
|
-
this.setState({ terrain });
|
|
15661
|
-
}
|
|
15657
|
+
if (!this.state.isTiled && shouldReload) ;
|
|
15662
15658
|
// TODO - remove in v9
|
|
15663
15659
|
// @ts-ignore
|
|
15664
15660
|
if (props.workerUrl) {
|
|
@@ -15675,7 +15671,7 @@ class TerrainLayer extends core.CompositeLayer {
|
|
|
15675
15671
|
elevationDecoder }) });
|
|
15676
15672
|
const { fetch } = this.props;
|
|
15677
15673
|
return fetch(elevationData, {
|
|
15678
|
-
propName: 'elevationData', layer: this, loadOptions, signal,
|
|
15674
|
+
propName: 'elevationData', layer: this, loadOptions, signal, loaders: [],
|
|
15679
15675
|
});
|
|
15680
15676
|
}
|
|
15681
15677
|
getTiledTerrainData(tile) {
|
|
@@ -15697,7 +15693,7 @@ class TerrainLayer extends core.CompositeLayer {
|
|
|
15697
15693
|
const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
|
|
15698
15694
|
// TODO - pass signal to getTile
|
|
15699
15695
|
// abort request if signal is aborted
|
|
15700
|
-
const terrain = yield this.state.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds);
|
|
15696
|
+
const terrain = yield this.state.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds, this.props.meshMaxError);
|
|
15701
15697
|
return Promise.all([terrain]);
|
|
15702
15698
|
});
|
|
15703
15699
|
}
|