@itwin/rpcinterface-full-stack-tests 5.14.0-dev.19 → 5.14.0-dev.20
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/lib/dist/bundled-tests.js +40 -16
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -173771,7 +173771,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
173771
173771
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
173772
173772
|
/* harmony export */ OrbitGtTileTree: () => (/* binding */ OrbitGtTileTree),
|
|
173773
173773
|
/* harmony export */ OrbitGtTreeReference: () => (/* binding */ OrbitGtTreeReference),
|
|
173774
|
-
/* harmony export */
|
|
173774
|
+
/* harmony export */ computeVerticalDatumShift: () => (/* binding */ computeVerticalDatumShift),
|
|
173775
173775
|
/* harmony export */ createOrbitGtTileTreeReference: () => (/* binding */ createOrbitGtTileTreeReference)
|
|
173776
173776
|
/* harmony export */ });
|
|
173777
173777
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
@@ -174078,20 +174078,44 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
174078
174078
|
}
|
|
174079
174079
|
}
|
|
174080
174080
|
/** Computes the vertical shift, in meters along geodetic up, to correctly place a point cloud whose CRS does not
|
|
174081
|
-
*
|
|
174081
|
+
* say whether its heights are ellipsoidal or orthometric. We assume they use the same vertical datum as the iModel.
|
|
174082
174082
|
*
|
|
174083
|
-
* The
|
|
174084
|
-
*
|
|
174085
|
-
*
|
|
174083
|
+
* The caller already placed the point cloud assuming its heights are ellipsoidal
|
|
174084
|
+
* (`heightAsEllipsoidalDbZ`). This function checks whether that assumption needs correcting:
|
|
174085
|
+
*
|
|
174086
|
+
* - If the iModel uses a geoid-based vertical datum (GEOID, NAVD88, or NGVD29), the cloud's
|
|
174087
|
+
* heights are assumed to be geoid-based too, so we compute how far off the ellipsoidal
|
|
174088
|
+
* placement is from the correct (geoid-based) one, and return that difference as a shift.
|
|
174089
|
+
* - If the iModel is ellipsoidal (or the datum is unknown), no correction is needed -
|
|
174090
|
+
* the original ellipsoidal placement was already right, so this returns zero.
|
|
174091
|
+
* - If the shift can't be computed (e.g. conversion fails), also returns zero.
|
|
174086
174092
|
* Exported strictly for tests.
|
|
174087
174093
|
* @internal
|
|
174088
174094
|
*/
|
|
174089
|
-
async function
|
|
174090
|
-
|
|
174091
|
-
|
|
174095
|
+
async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iModel) {
|
|
174096
|
+
if (iModel.noGcsDefined)
|
|
174097
|
+
return 0;
|
|
174098
|
+
// The backend always resolves the vertical datum id. Convert against the iModel's own datum.
|
|
174099
|
+
let source;
|
|
174100
|
+
const verticalDatum = iModel.geographicCoordinateSystem?.verticalCRS?.id;
|
|
174101
|
+
switch (verticalDatum) {
|
|
174102
|
+
// Pair GEOID with a WGS84 horizontal CRS (EPSG:4326).
|
|
174103
|
+
case "GEOID":
|
|
174104
|
+
source = { horizontalCRS: { epsg: 4326 }, verticalCRS: { id: "GEOID" } };
|
|
174105
|
+
break;
|
|
174106
|
+
// Native rejects NAVD88 and NGVD29 with WGS84; pair them with NAD83 (EPSG:4269).
|
|
174107
|
+
case "NAVD88":
|
|
174108
|
+
case "NGVD29":
|
|
174109
|
+
source = { horizontalCRS: { epsg: 4269 }, verticalCRS: { id: verticalDatum } };
|
|
174110
|
+
break;
|
|
174111
|
+
default:
|
|
174112
|
+
return 0;
|
|
174113
|
+
}
|
|
174114
|
+
const converter = iModel.geoServices.getConverter(source);
|
|
174115
|
+
if (undefined === converter)
|
|
174092
174116
|
return 0;
|
|
174093
174117
|
try {
|
|
174094
|
-
const response = await
|
|
174118
|
+
const response = await converter.getIModelCoordinatesFromGeoCoordinates([geoOrigin]);
|
|
174095
174119
|
if (response.iModelCoords[0].s !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success) {
|
|
174096
174120
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, `Failed to compute orthometric height correction for point cloud (status ${response.iModelCoords[0].s}); heights will be treated as ellipsoidal`);
|
|
174097
174121
|
return 0;
|
|
@@ -174201,11 +174225,11 @@ async function computeOrthometricVerticalShift(geoOrigin, heightAsEllipsoidalDbZ
|
|
|
174201
174225
|
const response = await geoConverter.getIModelCoordinatesFromGeoCoordinates([geoOrigin]);
|
|
174202
174226
|
if (response.iModelCoords[0].s === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success) {
|
|
174203
174227
|
const dbOriginFromGcs = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(response.iModelCoords[0].p);
|
|
174204
|
-
// A projected CRS
|
|
174205
|
-
//
|
|
174206
|
-
//
|
|
174228
|
+
// A projected CRS doesn't say whether heights are ellipsoidal or orthometric, so assume they match the iModel.
|
|
174229
|
+
// pointCloudToEcef above treated them as ellipsoidal; shift by the difference if the iModel is geoid-based.
|
|
174230
|
+
// Compound CRSs can't currently be loaded, so they don't get here. If that changes, their heights are orthometric and need separate handling.
|
|
174207
174231
|
if (_itwin_core_orbitgt__WEBPACK_IMPORTED_MODULE_3__.CRSManager.ENGINE.isProjectedCRS(pointCloudCRS)) {
|
|
174208
|
-
const verticalShift = await
|
|
174232
|
+
const verticalShift = await computeVerticalDatumShift(geoOrigin, dbOriginFromGcs.z, iModel);
|
|
174209
174233
|
if (0 !== verticalShift) {
|
|
174210
174234
|
const upVector = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Vector3d.createStartEnd(cartographicOrigin.toEcef(), _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromRadians({ longitude: cartographicOrigin.longitude, latitude: cartographicOrigin.latitude, height: cartographicOrigin.height + 1 }).toEcef()).normalize();
|
|
174211
174235
|
if (undefined !== upVector) {
|
|
@@ -192456,7 +192480,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
192456
192480
|
/* harmony export */ collectMaskRefs: () => (/* reexport safe */ _internal_tile_PrimaryTileTree__WEBPACK_IMPORTED_MODULE_82__.collectMaskRefs),
|
|
192457
192481
|
/* harmony export */ compareMapLayer: () => (/* reexport safe */ _internal_render_webgl_MapLayerParams__WEBPACK_IMPORTED_MODULE_94__.compareMapLayer),
|
|
192458
192482
|
/* harmony export */ computeCesiumTokenTimeoutInterval: () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_68__.computeCesiumTokenTimeoutInterval),
|
|
192459
|
-
/* harmony export */
|
|
192483
|
+
/* harmony export */ computeVerticalDatumShift: () => (/* reexport safe */ _internal_tile_OrbitGtTileTree__WEBPACK_IMPORTED_MODULE_84__.computeVerticalDatumShift),
|
|
192460
192484
|
/* harmony export */ createClassifierTileTreeReference: () => (/* reexport safe */ _internal_tile_ClassifierTileTree__WEBPACK_IMPORTED_MODULE_83__.createClassifierTileTreeReference),
|
|
192461
192485
|
/* harmony export */ createDefaultViewFlagOverrides: () => (/* reexport safe */ _internal_tile_ViewFlagOverrides__WEBPACK_IMPORTED_MODULE_0__.createDefaultViewFlagOverrides),
|
|
192462
192486
|
/* harmony export */ createGraphicFromDescription: () => (/* reexport safe */ _internal_tile_ImdlGraphicsCreator__WEBPACK_IMPORTED_MODULE_37__.createGraphicFromDescription),
|
|
@@ -343417,7 +343441,7 @@ class TestContext {
|
|
|
343417
343441
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
343418
343442
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
343419
343443
|
await core_frontend_1.NoRenderApp.startup({
|
|
343420
|
-
applicationVersion: "5.14.0-dev.
|
|
343444
|
+
applicationVersion: "5.14.0-dev.20",
|
|
343421
343445
|
applicationId: this.settings.gprid,
|
|
343422
343446
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
343423
343447
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -370159,7 +370183,7 @@ class WMS {
|
|
|
370159
370183
|
(module) {
|
|
370160
370184
|
|
|
370161
370185
|
"use strict";
|
|
370162
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.
|
|
370186
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.20","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s build:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
|
|
370163
370187
|
|
|
370164
370188
|
/***/ },
|
|
370165
370189
|
|