@itwin/ecschema-rpcinterface-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 +39 -15
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -153762,7 +153762,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153762
153762
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
153763
153763
|
/* harmony export */ OrbitGtTileTree: () => (/* binding */ OrbitGtTileTree),
|
|
153764
153764
|
/* harmony export */ OrbitGtTreeReference: () => (/* binding */ OrbitGtTreeReference),
|
|
153765
|
-
/* harmony export */
|
|
153765
|
+
/* harmony export */ computeVerticalDatumShift: () => (/* binding */ computeVerticalDatumShift),
|
|
153766
153766
|
/* harmony export */ createOrbitGtTileTreeReference: () => (/* binding */ createOrbitGtTileTreeReference)
|
|
153767
153767
|
/* harmony export */ });
|
|
153768
153768
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
@@ -154069,20 +154069,44 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
154069
154069
|
}
|
|
154070
154070
|
}
|
|
154071
154071
|
/** Computes the vertical shift, in meters along geodetic up, to correctly place a point cloud whose CRS does not
|
|
154072
|
-
*
|
|
154072
|
+
* say whether its heights are ellipsoidal or orthometric. We assume they use the same vertical datum as the iModel.
|
|
154073
154073
|
*
|
|
154074
|
-
* The
|
|
154075
|
-
*
|
|
154076
|
-
*
|
|
154074
|
+
* The caller already placed the point cloud assuming its heights are ellipsoidal
|
|
154075
|
+
* (`heightAsEllipsoidalDbZ`). This function checks whether that assumption needs correcting:
|
|
154076
|
+
*
|
|
154077
|
+
* - If the iModel uses a geoid-based vertical datum (GEOID, NAVD88, or NGVD29), the cloud's
|
|
154078
|
+
* heights are assumed to be geoid-based too, so we compute how far off the ellipsoidal
|
|
154079
|
+
* placement is from the correct (geoid-based) one, and return that difference as a shift.
|
|
154080
|
+
* - If the iModel is ellipsoidal (or the datum is unknown), no correction is needed -
|
|
154081
|
+
* the original ellipsoidal placement was already right, so this returns zero.
|
|
154082
|
+
* - If the shift can't be computed (e.g. conversion fails), also returns zero.
|
|
154077
154083
|
* Exported strictly for tests.
|
|
154078
154084
|
* @internal
|
|
154079
154085
|
*/
|
|
154080
|
-
async function
|
|
154081
|
-
|
|
154082
|
-
|
|
154086
|
+
async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iModel) {
|
|
154087
|
+
if (iModel.noGcsDefined)
|
|
154088
|
+
return 0;
|
|
154089
|
+
// The backend always resolves the vertical datum id. Convert against the iModel's own datum.
|
|
154090
|
+
let source;
|
|
154091
|
+
const verticalDatum = iModel.geographicCoordinateSystem?.verticalCRS?.id;
|
|
154092
|
+
switch (verticalDatum) {
|
|
154093
|
+
// Pair GEOID with a WGS84 horizontal CRS (EPSG:4326).
|
|
154094
|
+
case "GEOID":
|
|
154095
|
+
source = { horizontalCRS: { epsg: 4326 }, verticalCRS: { id: "GEOID" } };
|
|
154096
|
+
break;
|
|
154097
|
+
// Native rejects NAVD88 and NGVD29 with WGS84; pair them with NAD83 (EPSG:4269).
|
|
154098
|
+
case "NAVD88":
|
|
154099
|
+
case "NGVD29":
|
|
154100
|
+
source = { horizontalCRS: { epsg: 4269 }, verticalCRS: { id: verticalDatum } };
|
|
154101
|
+
break;
|
|
154102
|
+
default:
|
|
154103
|
+
return 0;
|
|
154104
|
+
}
|
|
154105
|
+
const converter = iModel.geoServices.getConverter(source);
|
|
154106
|
+
if (undefined === converter)
|
|
154083
154107
|
return 0;
|
|
154084
154108
|
try {
|
|
154085
|
-
const response = await
|
|
154109
|
+
const response = await converter.getIModelCoordinatesFromGeoCoordinates([geoOrigin]);
|
|
154086
154110
|
if (response.iModelCoords[0].s !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success) {
|
|
154087
154111
|
_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`);
|
|
154088
154112
|
return 0;
|
|
@@ -154192,11 +154216,11 @@ async function computeOrthometricVerticalShift(geoOrigin, heightAsEllipsoidalDbZ
|
|
|
154192
154216
|
const response = await geoConverter.getIModelCoordinatesFromGeoCoordinates([geoOrigin]);
|
|
154193
154217
|
if (response.iModelCoords[0].s === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success) {
|
|
154194
154218
|
const dbOriginFromGcs = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(response.iModelCoords[0].p);
|
|
154195
|
-
// A projected CRS
|
|
154196
|
-
//
|
|
154197
|
-
//
|
|
154219
|
+
// A projected CRS doesn't say whether heights are ellipsoidal or orthometric, so assume they match the iModel.
|
|
154220
|
+
// pointCloudToEcef above treated them as ellipsoidal; shift by the difference if the iModel is geoid-based.
|
|
154221
|
+
// Compound CRSs can't currently be loaded, so they don't get here. If that changes, their heights are orthometric and need separate handling.
|
|
154198
154222
|
if (_itwin_core_orbitgt__WEBPACK_IMPORTED_MODULE_3__.CRSManager.ENGINE.isProjectedCRS(pointCloudCRS)) {
|
|
154199
|
-
const verticalShift = await
|
|
154223
|
+
const verticalShift = await computeVerticalDatumShift(geoOrigin, dbOriginFromGcs.z, iModel);
|
|
154200
154224
|
if (0 !== verticalShift) {
|
|
154201
154225
|
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();
|
|
154202
154226
|
if (undefined !== upVector) {
|
|
@@ -172447,7 +172471,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
172447
172471
|
/* harmony export */ collectMaskRefs: () => (/* reexport safe */ _internal_tile_PrimaryTileTree__WEBPACK_IMPORTED_MODULE_82__.collectMaskRefs),
|
|
172448
172472
|
/* harmony export */ compareMapLayer: () => (/* reexport safe */ _internal_render_webgl_MapLayerParams__WEBPACK_IMPORTED_MODULE_94__.compareMapLayer),
|
|
172449
172473
|
/* harmony export */ computeCesiumTokenTimeoutInterval: () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_68__.computeCesiumTokenTimeoutInterval),
|
|
172450
|
-
/* harmony export */
|
|
172474
|
+
/* harmony export */ computeVerticalDatumShift: () => (/* reexport safe */ _internal_tile_OrbitGtTileTree__WEBPACK_IMPORTED_MODULE_84__.computeVerticalDatumShift),
|
|
172451
172475
|
/* harmony export */ createClassifierTileTreeReference: () => (/* reexport safe */ _internal_tile_ClassifierTileTree__WEBPACK_IMPORTED_MODULE_83__.createClassifierTileTreeReference),
|
|
172452
172476
|
/* harmony export */ createDefaultViewFlagOverrides: () => (/* reexport safe */ _internal_tile_ViewFlagOverrides__WEBPACK_IMPORTED_MODULE_0__.createDefaultViewFlagOverrides),
|
|
172453
172477
|
/* harmony export */ createGraphicFromDescription: () => (/* reexport safe */ _internal_tile_ImdlGraphicsCreator__WEBPACK_IMPORTED_MODULE_37__.createGraphicFromDescription),
|
|
@@ -336997,7 +337021,7 @@ class WMS {
|
|
|
336997
337021
|
(module) {
|
|
336998
337022
|
|
|
336999
337023
|
"use strict";
|
|
337000
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.
|
|
337024
|
+
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"}}');
|
|
337001
337025
|
|
|
337002
337026
|
/***/ }
|
|
337003
337027
|
|