-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support epsg 4326 map layer projections + ESRI tilemap fixes (#2473)
* Allow image provider to spedify tiling scheme * Rework and correct child availability * Fix _testChildAvailability when arcgis server has a minimum zoom level. * Handle arcgis testmap errors * Restored ESRI tilemap caching. (#2452) * WIP - restored tilemap cache * Added calls queue. * Created a call queue for each LOD. Check cache before queuing a call. When error 422 is returned, mark all corresponding tiles to non-available. Added tests. * Now make a second request if first tilemap got clipped by server. Improved tests and documentation. code cleanup * Code clean up. * Rework tiling scheme to have uniform levels for all tiling schemes * Request workaround and removed unused baseLevel * Remove force4326 from WTMS * Code clean up * Fixed lint in error. * Added change logs. * WmtsMapLayerFormat.validateSource was not checking for WGS84 tile matrixsets * Removed void async method in ArcGISMapLayerImageryProvider._generateChildIds, disable ellint/no-floating-promises instead. * Removed .only in ArcGISTileMap test suite. * Removed no longer needed eslint rule disabling instructions. * Reverted testing code for EPSG:4326. * GeographicTiling * rowZeroAtNorth for map layer imagery providers * Base imagery draping on width to handle 4326 drape on width * Correct fix for fraction at root tile. * Fixed issue where style identifier for layer was missing, removed the style= param from the request in that case. * install-run-rushx.js * Correct approximate terrain calculation. * Add tests for approximate heights * Remove .only from test * Merge * extract-api Co-authored-by: Ray.Bentley <[email protected]> Co-authored-by: Paul Connelly <[email protected]>
- Loading branch information
1 parent
1a8826e
commit ec78ce4
Showing
20 changed files
with
2,723 additions
and
2,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...hanges/@itwin/core-frontend/Support-EPSG-4326-map-layer-projections_2021-10-12-18-36.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@itwin/core-frontend", | ||
"comment": "Rework and correct child availability of tiled imagery formats. Added EPSG:4326 support for WMTS.", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@itwin/core-frontend" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/frontend/src/test/tile/map/ApproximateTerrainHeights.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { Range1d } from "@itwin/core-geometry"; | ||
import { expect } from "chai"; | ||
import { ApproximateTerrainHeights } from "../../../ApproximateTerrainHeights"; | ||
import { GeographicTilingScheme, QuadId } from "../../../core-frontend"; | ||
|
||
describe("ApproximateTerrainHeights", () => { | ||
it("test correct heights", async () => { | ||
const tilingScheme = new GeographicTilingScheme(); | ||
const testPairs = [ | ||
{ id: new QuadId(3, 2, 1), range: Range1d.createXX(-102.31, 3682.63) }, | ||
{ id: new QuadId(5, 4, 4), range: Range1d.createXX(-132.79, 3970.41) }, | ||
{ id: new QuadId(6, 32, 31), range: Range1d.createXX(-20.88, 716.38) }, | ||
{ id: new QuadId(8, 21, 11), range: Range1d.createXX(-98.4, -43.74) }, | ||
{ id: new QuadId(0, 0, 0), range: Range1d.createXX(-400, 90000) }, | ||
]; | ||
const terrainHeights = ApproximateTerrainHeights.instance; | ||
await terrainHeights.initialize(); | ||
|
||
testPairs.forEach((pair) => { | ||
const quadId = pair.id; | ||
const rectangle = tilingScheme.tileXYToRectangle(quadId.column, quadId.row, quadId.level); | ||
const heightRange = terrainHeights.getMinimumMaximumHeights(rectangle); | ||
expect(heightRange.isAlmostEqual(pair.range)).to.be.true; | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.