@itwin/core-backend 5.13.0-dev.2 → 5.13.0-dev.3

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.
Files changed (453) hide show
  1. package/lib/cjs/BackendHubAccess.js.map +1 -1
  2. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  3. package/lib/cjs/BisCoreSchema.js.map +1 -1
  4. package/lib/cjs/BlobContainerService.js.map +1 -1
  5. package/lib/cjs/BriefcaseManager.js.map +1 -1
  6. package/lib/cjs/CatalogDb.js.map +1 -1
  7. package/lib/cjs/Category.js.map +1 -1
  8. package/lib/cjs/ChangeSummaryManager.js +2 -2
  9. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  10. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  11. package/lib/cjs/ChangesetECAdaptor.js +248 -248
  12. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  13. package/lib/cjs/ChangesetReader.js +3 -3
  14. package/lib/cjs/ChangesetReader.js.map +1 -1
  15. package/lib/cjs/ChangesetReaderTypes.js.map +1 -1
  16. package/lib/cjs/ChannelControl.js.map +1 -1
  17. package/lib/cjs/CheckpointManager.js.map +1 -1
  18. package/lib/cjs/ClassRegistry.js +5 -5
  19. package/lib/cjs/ClassRegistry.js.map +1 -1
  20. package/lib/cjs/CloudSqlite.js.map +1 -1
  21. package/lib/cjs/CodeService.js.map +1 -1
  22. package/lib/cjs/CodeSpecs.js.map +1 -1
  23. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  24. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  25. package/lib/cjs/DevTools.js.map +1 -1
  26. package/lib/cjs/DisplayStyle.js.map +1 -1
  27. package/lib/cjs/ECDb.js.map +1 -1
  28. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  29. package/lib/cjs/ECSqlRowExecutor.js.map +1 -1
  30. package/lib/cjs/ECSqlStatement.js.map +1 -1
  31. package/lib/cjs/ECSqlSyncReader.js.map +1 -1
  32. package/lib/cjs/EditTxn.js.map +1 -1
  33. package/lib/cjs/Element.js.map +1 -1
  34. package/lib/cjs/ElementAspect.js.map +1 -1
  35. package/lib/cjs/ElementGraphics.js.map +1 -1
  36. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  37. package/lib/cjs/Entity.js.map +1 -1
  38. package/lib/cjs/EntityReferences.js.map +1 -1
  39. package/lib/cjs/ExportGraphics.js.map +1 -1
  40. package/lib/cjs/ExternalSource.js.map +1 -1
  41. package/lib/cjs/FontFile.js.map +1 -1
  42. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  43. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  44. package/lib/cjs/GeometrySummary.js +47 -47
  45. package/lib/cjs/GeometrySummary.js.map +1 -1
  46. package/lib/cjs/IModelDb.d.ts +10 -6
  47. package/lib/cjs/IModelDb.d.ts.map +1 -1
  48. package/lib/cjs/IModelDb.js +18 -14
  49. package/lib/cjs/IModelDb.js.map +1 -1
  50. package/lib/cjs/IModelDbFonts.js.map +1 -1
  51. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  52. package/lib/cjs/IModelHost.js.map +1 -1
  53. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  54. package/lib/cjs/IModelJsFs.js.map +1 -1
  55. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  56. package/lib/cjs/IpcHost.js.map +1 -1
  57. package/lib/cjs/LineStyle.js.map +1 -1
  58. package/lib/cjs/LocalHub.js +1 -1
  59. package/lib/cjs/LocalHub.js.map +1 -1
  60. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  61. package/lib/cjs/LockControl.js.map +1 -1
  62. package/lib/cjs/Material.js.map +1 -1
  63. package/lib/cjs/Model.js.map +1 -1
  64. package/lib/cjs/NativeAppStorage.js.map +1 -1
  65. package/lib/cjs/NativeHost.js.map +1 -1
  66. package/lib/cjs/NavigationRelationship.js.map +1 -1
  67. package/lib/cjs/PartialChangeUnifier.js +7 -7
  68. package/lib/cjs/PartialChangeUnifier.js.map +1 -1
  69. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  70. package/lib/cjs/PropertyStore.js.map +1 -1
  71. package/lib/cjs/Relationship.js.map +1 -1
  72. package/lib/cjs/RpcBackend.js.map +1 -1
  73. package/lib/cjs/SQLiteDb.js.map +1 -1
  74. package/lib/cjs/Schema.js.map +1 -1
  75. package/lib/cjs/SchemaSync.js.map +1 -1
  76. package/lib/cjs/SchemaUtils.js.map +1 -1
  77. package/lib/cjs/SheetIndex.js.map +1 -1
  78. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  79. package/lib/cjs/SqliteStatement.js.map +1 -1
  80. package/lib/cjs/StashManager.js.map +1 -1
  81. package/lib/cjs/Texture.js.map +1 -1
  82. package/lib/cjs/TileStorage.js.map +1 -1
  83. package/lib/cjs/TxnManager.js.map +1 -1
  84. package/lib/cjs/ViewDefinition.js.map +1 -1
  85. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  86. package/lib/cjs/ViewStore.js.map +1 -1
  87. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  88. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  89. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  90. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  91. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  92. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  93. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  94. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  95. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +36 -36
  96. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +28 -28
  97. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  98. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  99. package/lib/cjs/core-backend.js.map +1 -1
  100. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  101. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  102. package/lib/cjs/domains/GenericElements.js.map +1 -1
  103. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  104. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  105. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  106. package/lib/cjs/internal/ECSqlInstanceReshaper.js.map +1 -1
  107. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  108. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  109. package/lib/cjs/internal/HubMock.js.map +1 -1
  110. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  111. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  112. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  113. package/lib/cjs/internal/NoLocks.js.map +1 -1
  114. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  115. package/lib/cjs/internal/ServerBasedLocks.js +33 -33
  116. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  117. package/lib/cjs/internal/Symbols.js.map +1 -1
  118. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  119. package/lib/cjs/internal/cross-package.js.map +1 -1
  120. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  121. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  122. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  123. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  124. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  125. package/lib/cjs/rpc/multipart.js.map +1 -1
  126. package/lib/cjs/rpc/tracing.js.map +1 -1
  127. package/lib/cjs/rpc/web/logging.js.map +1 -1
  128. package/lib/cjs/rpc/web/request.js.map +1 -1
  129. package/lib/cjs/rpc/web/response.js.map +1 -1
  130. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  131. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  132. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  133. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  134. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  135. package/lib/cjs/workspace/Settings.js.map +1 -1
  136. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  137. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  138. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  139. package/lib/cjs/workspace/Workspace.js.map +1 -1
  140. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  141. package/lib/esm/BackendHubAccess.js.map +1 -1
  142. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  143. package/lib/esm/BisCoreSchema.js.map +1 -1
  144. package/lib/esm/BlobContainerService.js.map +1 -1
  145. package/lib/esm/BriefcaseManager.js.map +1 -1
  146. package/lib/esm/CatalogDb.js.map +1 -1
  147. package/lib/esm/Category.js.map +1 -1
  148. package/lib/esm/ChangeSummaryManager.js +2 -2
  149. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  150. package/lib/esm/ChangedElementsDb.js.map +1 -1
  151. package/lib/esm/ChangesetECAdaptor.js +248 -248
  152. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  153. package/lib/esm/ChangesetReader.js +3 -3
  154. package/lib/esm/ChangesetReader.js.map +1 -1
  155. package/lib/esm/ChangesetReaderTypes.js.map +1 -1
  156. package/lib/esm/ChannelControl.js.map +1 -1
  157. package/lib/esm/CheckpointManager.js.map +1 -1
  158. package/lib/esm/ClassRegistry.js +5 -5
  159. package/lib/esm/ClassRegistry.js.map +1 -1
  160. package/lib/esm/CloudSqlite.js.map +1 -1
  161. package/lib/esm/CodeService.js.map +1 -1
  162. package/lib/esm/CodeSpecs.js.map +1 -1
  163. package/lib/esm/ConcurrentQuery.js.map +1 -1
  164. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  165. package/lib/esm/DevTools.js.map +1 -1
  166. package/lib/esm/DisplayStyle.js.map +1 -1
  167. package/lib/esm/ECDb.js.map +1 -1
  168. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  169. package/lib/esm/ECSqlRowExecutor.js.map +1 -1
  170. package/lib/esm/ECSqlStatement.js.map +1 -1
  171. package/lib/esm/ECSqlSyncReader.js.map +1 -1
  172. package/lib/esm/EditTxn.js.map +1 -1
  173. package/lib/esm/Element.js.map +1 -1
  174. package/lib/esm/ElementAspect.js.map +1 -1
  175. package/lib/esm/ElementGraphics.js.map +1 -1
  176. package/lib/esm/ElementTreeWalker.js.map +1 -1
  177. package/lib/esm/Entity.js.map +1 -1
  178. package/lib/esm/EntityReferences.js.map +1 -1
  179. package/lib/esm/ExportGraphics.js.map +1 -1
  180. package/lib/esm/ExternalSource.js.map +1 -1
  181. package/lib/esm/FontFile.js.map +1 -1
  182. package/lib/esm/GeoCoordConfig.js.map +1 -1
  183. package/lib/esm/GeographicCRSServices.js.map +1 -1
  184. package/lib/esm/GeometrySummary.js +47 -47
  185. package/lib/esm/GeometrySummary.js.map +1 -1
  186. package/lib/esm/IModelDb.d.ts +10 -6
  187. package/lib/esm/IModelDb.d.ts.map +1 -1
  188. package/lib/esm/IModelDb.js +18 -14
  189. package/lib/esm/IModelDb.js.map +1 -1
  190. package/lib/esm/IModelDbFonts.js.map +1 -1
  191. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  192. package/lib/esm/IModelHost.js.map +1 -1
  193. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  194. package/lib/esm/IModelJsFs.js.map +1 -1
  195. package/lib/esm/ImageSourceConversion.js.map +1 -1
  196. package/lib/esm/IpcHost.js.map +1 -1
  197. package/lib/esm/LineStyle.js.map +1 -1
  198. package/lib/esm/LocalHub.js +1 -1
  199. package/lib/esm/LocalHub.js.map +1 -1
  200. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  201. package/lib/esm/LockControl.js.map +1 -1
  202. package/lib/esm/Material.js.map +1 -1
  203. package/lib/esm/Model.js.map +1 -1
  204. package/lib/esm/NativeAppStorage.js.map +1 -1
  205. package/lib/esm/NativeHost.js.map +1 -1
  206. package/lib/esm/NavigationRelationship.js.map +1 -1
  207. package/lib/esm/PartialChangeUnifier.js +7 -7
  208. package/lib/esm/PartialChangeUnifier.js.map +1 -1
  209. package/lib/esm/PromiseMemoizer.js.map +1 -1
  210. package/lib/esm/PropertyStore.js.map +1 -1
  211. package/lib/esm/Relationship.js.map +1 -1
  212. package/lib/esm/RpcBackend.js.map +1 -1
  213. package/lib/esm/SQLiteDb.js.map +1 -1
  214. package/lib/esm/Schema.js.map +1 -1
  215. package/lib/esm/SchemaSync.js.map +1 -1
  216. package/lib/esm/SchemaUtils.js.map +1 -1
  217. package/lib/esm/SheetIndex.js.map +1 -1
  218. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  219. package/lib/esm/SqliteStatement.js.map +1 -1
  220. package/lib/esm/StashManager.js.map +1 -1
  221. package/lib/esm/Texture.js.map +1 -1
  222. package/lib/esm/TileStorage.js.map +1 -1
  223. package/lib/esm/TxnManager.js.map +1 -1
  224. package/lib/esm/ViewDefinition.js.map +1 -1
  225. package/lib/esm/ViewStateHydrator.js.map +1 -1
  226. package/lib/esm/ViewStore.js.map +1 -1
  227. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  228. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  229. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  230. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  231. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  232. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  233. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  234. package/lib/esm/core-backend.js.map +1 -1
  235. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  236. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  237. package/lib/esm/domains/GenericElements.js.map +1 -1
  238. package/lib/esm/domains/GenericSchema.js.map +1 -1
  239. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  240. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  241. package/lib/esm/internal/ECSqlInstanceReshaper.js.map +1 -1
  242. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  243. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  244. package/lib/esm/internal/HubMock.js.map +1 -1
  245. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  246. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  247. package/lib/esm/internal/NativePlatform.js.map +1 -1
  248. package/lib/esm/internal/NoLocks.js.map +1 -1
  249. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  250. package/lib/esm/internal/ServerBasedLocks.js +33 -33
  251. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  252. package/lib/esm/internal/Symbols.js.map +1 -1
  253. package/lib/esm/internal/annotations/fields.js.map +1 -1
  254. package/lib/esm/internal/cross-package.js.map +1 -1
  255. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  256. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  257. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  258. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  259. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  260. package/lib/esm/rpc/multipart.js.map +1 -1
  261. package/lib/esm/rpc/tracing.js.map +1 -1
  262. package/lib/esm/rpc/web/logging.js.map +1 -1
  263. package/lib/esm/rpc/web/request.js.map +1 -1
  264. package/lib/esm/rpc/web/response.js.map +1 -1
  265. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  266. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  267. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  268. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  269. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  270. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  271. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  272. package/lib/esm/test/AttachDb.test.js +11 -11
  273. package/lib/esm/test/AttachDb.test.js.map +1 -1
  274. package/lib/esm/test/ElementDrivesElement.test.js +23 -23
  275. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  276. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  277. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  278. package/lib/esm/test/IModelHost.test.js.map +1 -1
  279. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  280. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  281. package/lib/esm/test/IpcHost.test.js.map +1 -1
  282. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  283. package/lib/esm/test/PrintElementTree.js.map +1 -1
  284. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  285. package/lib/esm/test/RevisionUtility.js.map +1 -1
  286. package/lib/esm/test/SchemaChangesetCanBeReversed.test.js +51 -51
  287. package/lib/esm/test/SchemaChangesetCanBeReversed.test.js.map +1 -1
  288. package/lib/esm/test/SchemaUtils.test.js +25 -25
  289. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  290. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  291. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +129 -129
  292. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  293. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  294. package/lib/esm/test/TestEditTxn.js.map +1 -1
  295. package/lib/esm/test/TestUtils.js.map +1 -1
  296. package/lib/esm/test/annotations/Fields.test.js +53 -53
  297. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  298. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  299. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  300. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  301. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  302. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  303. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  304. package/lib/esm/test/categories/Category.test.js.map +1 -1
  305. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  306. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  307. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  308. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  309. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  310. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  311. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  312. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  313. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  314. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  315. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  316. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  317. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  318. package/lib/esm/test/ecdb/ECSqlQuery.test.js +4 -4
  319. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  320. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
  321. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  322. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js +4 -4
  323. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -1
  324. package/lib/esm/test/ecdb/QueryReaders.test.js +31 -31
  325. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  326. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  327. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  328. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  329. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  330. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  331. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  332. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  333. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  334. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  335. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  336. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  337. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  338. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  339. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  340. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  341. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  342. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  343. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  344. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  345. package/lib/esm/test/example-code/EditTxn.test.d.ts +2 -0
  346. package/lib/esm/test/example-code/EditTxn.test.d.ts.map +1 -0
  347. package/lib/esm/test/example-code/EditTxn.test.js +47 -0
  348. package/lib/esm/test/example-code/EditTxn.test.js.map +1 -0
  349. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  350. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  351. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  352. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  353. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  354. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  355. package/lib/esm/test/hubaccess/CodeSwap.test.js.map +1 -1
  356. package/lib/esm/test/hubaccess/Rebase.test.js +56 -56
  357. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  358. package/lib/esm/test/hubaccess/SemanticRebase.test.js +345 -345
  359. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  360. package/lib/esm/test/imageData.js.map +1 -1
  361. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  362. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  363. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  364. package/lib/esm/test/imodel/IModel.test.js +291 -293
  365. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  366. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  367. package/lib/esm/test/imodel/SchemaXmlImport.test.js +21 -21
  368. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  369. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  370. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  371. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  372. package/lib/esm/test/index.js.map +1 -1
  373. package/lib/esm/test/internal/ECSqlInstanceReshaper.test.js +32 -32
  374. package/lib/esm/test/internal/ECSqlInstanceReshaper.test.js.map +1 -1
  375. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  376. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  377. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  378. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  379. package/lib/esm/test/rpc/response.test.js.map +1 -1
  380. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  381. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  382. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  383. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  384. package/lib/esm/test/schema/IModelSchemaContext.test.js +9 -9
  385. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  386. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +19 -19
  387. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  388. package/lib/esm/test/schema/SchemaViewFragmentLoading.test.js +21 -21
  389. package/lib/esm/test/schema/SchemaViewFragmentLoading.test.js.map +1 -1
  390. package/lib/esm/test/schema/SchemaViewHidden.test.js +109 -109
  391. package/lib/esm/test/schema/SchemaViewHidden.test.js.map +1 -1
  392. package/lib/esm/test/schema/SchemaViewKoQ.test.js +13 -13
  393. package/lib/esm/test/schema/SchemaViewKoQ.test.js.map +1 -1
  394. package/lib/esm/test/schema/SchemaViewLifecycle.test.js +15 -15
  395. package/lib/esm/test/schema/SchemaViewLifecycle.test.js.map +1 -1
  396. package/lib/esm/test/schema/SchemaViewValidation.test.js +8 -8
  397. package/lib/esm/test/schema/SchemaViewValidation.test.js.map +1 -1
  398. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  399. package/lib/esm/test/standalone/ChangeElementParentModel.test.js.map +1 -1
  400. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  401. package/lib/esm/test/standalone/ChangesetReader.test.js +313 -313
  402. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  403. package/lib/esm/test/standalone/CloudSqlite.test.js.map +1 -1
  404. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  405. package/lib/esm/test/standalone/DeleteElements.test.js.map +1 -1
  406. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  407. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  408. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -1
  409. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  410. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  411. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  412. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  413. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  414. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  415. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  416. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  417. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  418. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  419. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -1
  420. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  421. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  422. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  423. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  424. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  425. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  426. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  427. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.js +135 -135
  428. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.js.map +1 -1
  429. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  430. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  431. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  432. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  433. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  434. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  435. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  436. package/lib/esm/test/standalone/StandaloneDb.test.js +20 -20
  437. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  438. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  439. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  440. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  441. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  442. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  443. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  444. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  445. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -1
  446. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  447. package/lib/esm/workspace/Settings.js.map +1 -1
  448. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  449. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  450. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  451. package/lib/esm/workspace/Workspace.js.map +1 -1
  452. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  453. package/package.json +14 -13
@@ -58,7 +58,7 @@ import { assert, expect } from "chai";
58
58
  import * as path from "path";
59
59
  import * as semver from "semver";
60
60
  import * as sinon from "sinon";
61
- import { DbResult, Guid, Id64, IModelStatus, Logger, OpenMode, ProcessDetector } from "@itwin/core-bentley";
61
+ import { DbResult, Guid, Id64, IModelStatus, Logger, OpenMode } from "@itwin/core-bentley";
62
62
  import { EditTxn, withEditTxn } from "../../EditTxn";
63
63
  import { BisCodeSpec, BriefcaseIdValue, Code, CodeScopeSpec, CodeSpec, ColorByName, ColorDef, DisplayStyleSettings, EcefLocation, FontMap, FontType, GeoCoordStatus, GeographicCRS, GeometryParams, GeometryStreamBuilder, ImageSourceFormat, IModel, IModelError, QueryBinder, RelatedElement, RenderMode, SchemaState, SubCategoryAppearance, TextureMapping, TextureMapUnits, ViewFlags, } from "@itwin/core-common";
64
64
  import { Geometry, LineString3d, Loop, Matrix4d, Point3d, PolyfaceBuilder, Range3d, StrokeOptions, Transform, YawPitchRollAngles, } from "@itwin/core-geometry";
@@ -1754,267 +1754,265 @@ describe("iModel", () => {
1754
1754
  }
1755
1755
  });
1756
1756
  });
1757
- if (!ProcessDetector.isIOSAppBackend) {
1758
- it("should be able to reproject with iModel coordinates to or from any other GeographicCRS", async () => {
1759
- const convertTest = async (fileName, fileGCS, datum, inputCoord, outputCoord) => {
1760
- const args = {
1761
- rootSubject: { name: "TestSubject", description: "test project" },
1762
- client: "ABC Engineering",
1763
- globalOrigin: { x: 0.0, y: 0.0 },
1764
- projectExtents: { low: { x: -300, y: -300, z: -20 }, high: { x: 500, y: 500, z: 400 } },
1765
- guid: Guid.createValue(),
1766
- };
1767
- let datumOrGCS;
1768
- if (typeof datum === "object")
1769
- datumOrGCS = JSON.stringify(datum);
1770
- else
1771
- datumOrGCS = datum;
1772
- const testFile = IModelTestUtils.prepareOutputFile("IModel", fileName);
1773
- const iModel = SnapshotDb.createEmpty(testFile, args);
1774
- withEditTxn(iModel, (txn) => {
1775
- iModel.setGeographicCoordinateSystem(fileGCS);
1776
- txn.updateIModelProps();
1777
- });
1778
- const testPoint1 = [];
1779
- testPoint1.push(inputCoord);
1780
- const requestProps1 = { target: datumOrGCS, iModelCoords: testPoint1 };
1781
- const response1 = await iModel.getGeoCoordinatesFromIModelCoordinates(requestProps1);
1782
- expect(response1.geoCoords[0].s === outputCoord.s).to.be.true;
1783
- // If success or warning we compare result
1784
- if (outputCoord.s === GeoCoordStatus.Success || outputCoord.s === GeoCoordStatus.OutOfUsefulRange) {
1785
- const expectedPt1 = Point3d.fromJSON(outputCoord.p);
1786
- const outPt1 = Point3d.fromJSON(response1.geoCoords[0].p);
1787
- expect(Geometry.isSamePoint3dXY(expectedPt1, outPt1, 0.001)).to.be.true;
1788
- expect(Math.abs(expectedPt1.z - outPt1.z) < 0.0001).to.be.true;
1789
- // No point testing reversal when Out of useful range since reversibility is doubtful
1790
- if (outputCoord.s !== GeoCoordStatus.OutOfUsefulRange) {
1791
- const testPoint2 = [];
1792
- testPoint2.push(outputCoord.p);
1793
- const requestProps2 = { source: datumOrGCS, geoCoords: testPoint2 };
1794
- const response2 = await iModel.getIModelCoordinatesFromGeoCoordinates(requestProps2);
1795
- const expectedPt2 = Point3d.fromJSON(inputCoord);
1796
- const outPt2 = Point3d.fromJSON(response2.iModelCoords[0].p);
1797
- expect(expectedPt2.distanceXY(outPt2) < 0.001).to.be.true;
1798
- expect(Math.abs(expectedPt2.z - outPt2.z) < 0.001).to.be.true;
1799
- }
1800
- }
1801
- iModel.close();
1757
+ it("should be able to reproject with iModel coordinates to or from any other GeographicCRS", async () => {
1758
+ const convertTest = async (fileName, fileGCS, datum, inputCoord, outputCoord) => {
1759
+ const args = {
1760
+ rootSubject: { name: "TestSubject", description: "test project" },
1761
+ client: "ABC Engineering",
1762
+ globalOrigin: { x: 0.0, y: 0.0 },
1763
+ projectExtents: { low: { x: -300, y: -300, z: -20 }, high: { x: 500, y: 500, z: 400 } },
1764
+ guid: Guid.createValue(),
1802
1765
  };
1803
- const EWRGCS = {
1804
- horizontalCRS: {
1805
- id: "EPSG:27700",
1806
- description: "OSGB 1936 / British National Grid",
1807
- source: "EPSG V6 [Large and medium scale topographic mapping and engin]",
1808
- datumId: "EPSG:6277",
1809
- datum: {
1810
- id: "EPSG:6277",
1811
- description: "OSGB36 - Use OSGB-7P-2. Consider OSGB/OSTN15 instead",
1812
- deprecated: true,
1813
- source: "EPSG V6.12 operation EPSG:1314 [EPSG]",
1814
- ellipsoidId: "EPSG:7001",
1815
- ellipsoid: {
1816
- equatorialRadius: 6377563.396,
1817
- polarRadius: 6356256.909237,
1818
- id: "EPSG:7001",
1819
- description: "Airy 1830",
1820
- source: "EPSG, Version 6 [EPSG]",
1821
- },
1822
- transforms: [
1823
- {
1824
- method: "PositionalVector",
1825
- sourceEllipsoid: {
1826
- equatorialRadius: 6377563.396,
1827
- polarRadius: 6356256.909237,
1828
- id: "EPSG:7001",
1829
- },
1830
- targetEllipsoid: {
1831
- equatorialRadius: 6378137,
1832
- polarRadius: 6356752.3142,
1833
- id: "WGS84",
1766
+ let datumOrGCS;
1767
+ if (typeof datum === "object")
1768
+ datumOrGCS = JSON.stringify(datum);
1769
+ else
1770
+ datumOrGCS = datum;
1771
+ const testFile = IModelTestUtils.prepareOutputFile("IModel", fileName);
1772
+ const iModel = SnapshotDb.createEmpty(testFile, args);
1773
+ withEditTxn(iModel, (txn) => {
1774
+ iModel.setGeographicCoordinateSystem(fileGCS);
1775
+ txn.updateIModelProps();
1776
+ });
1777
+ const testPoint1 = [];
1778
+ testPoint1.push(inputCoord);
1779
+ const requestProps1 = { target: datumOrGCS, iModelCoords: testPoint1 };
1780
+ const response1 = await iModel.getGeoCoordinatesFromIModelCoordinates(requestProps1);
1781
+ expect(response1.geoCoords[0].s === outputCoord.s).to.be.true;
1782
+ // If success or warning we compare result
1783
+ if (outputCoord.s === GeoCoordStatus.Success || outputCoord.s === GeoCoordStatus.OutOfUsefulRange) {
1784
+ const expectedPt1 = Point3d.fromJSON(outputCoord.p);
1785
+ const outPt1 = Point3d.fromJSON(response1.geoCoords[0].p);
1786
+ expect(Geometry.isSamePoint3dXY(expectedPt1, outPt1, 0.001)).to.be.true;
1787
+ expect(Math.abs(expectedPt1.z - outPt1.z) < 0.0001).to.be.true;
1788
+ // No point testing reversal when Out of useful range since reversibility is doubtful
1789
+ if (outputCoord.s !== GeoCoordStatus.OutOfUsefulRange) {
1790
+ const testPoint2 = [];
1791
+ testPoint2.push(outputCoord.p);
1792
+ const requestProps2 = { source: datumOrGCS, geoCoords: testPoint2 };
1793
+ const response2 = await iModel.getIModelCoordinatesFromGeoCoordinates(requestProps2);
1794
+ const expectedPt2 = Point3d.fromJSON(inputCoord);
1795
+ const outPt2 = Point3d.fromJSON(response2.iModelCoords[0].p);
1796
+ expect(expectedPt2.distanceXY(outPt2) < 0.001).to.be.true;
1797
+ expect(Math.abs(expectedPt2.z - outPt2.z) < 0.001).to.be.true;
1798
+ }
1799
+ }
1800
+ iModel.close();
1801
+ };
1802
+ const EWRGCS = {
1803
+ horizontalCRS: {
1804
+ id: "EPSG:27700",
1805
+ description: "OSGB 1936 / British National Grid",
1806
+ source: "EPSG V6 [Large and medium scale topographic mapping and engin]",
1807
+ datumId: "EPSG:6277",
1808
+ datum: {
1809
+ id: "EPSG:6277",
1810
+ description: "OSGB36 - Use OSGB-7P-2. Consider OSGB/OSTN15 instead",
1811
+ deprecated: true,
1812
+ source: "EPSG V6.12 operation EPSG:1314 [EPSG]",
1813
+ ellipsoidId: "EPSG:7001",
1814
+ ellipsoid: {
1815
+ equatorialRadius: 6377563.396,
1816
+ polarRadius: 6356256.909237,
1817
+ id: "EPSG:7001",
1818
+ description: "Airy 1830",
1819
+ source: "EPSG, Version 6 [EPSG]",
1820
+ },
1821
+ transforms: [
1822
+ {
1823
+ method: "PositionalVector",
1824
+ sourceEllipsoid: {
1825
+ equatorialRadius: 6377563.396,
1826
+ polarRadius: 6356256.909237,
1827
+ id: "EPSG:7001",
1828
+ },
1829
+ targetEllipsoid: {
1830
+ equatorialRadius: 6378137,
1831
+ polarRadius: 6356752.3142,
1832
+ id: "WGS84",
1833
+ },
1834
+ positionalVector: {
1835
+ delta: {
1836
+ x: 446.448,
1837
+ y: -125.157,
1838
+ z: 542.06,
1834
1839
  },
1835
- positionalVector: {
1836
- delta: {
1837
- x: 446.448,
1838
- y: -125.157,
1839
- z: 542.06,
1840
- },
1841
- rotation: {
1842
- x: 0.15,
1843
- y: 0.247,
1844
- z: 0.842,
1845
- },
1846
- scalePPM: -20.489,
1840
+ rotation: {
1841
+ x: 0.15,
1842
+ y: 0.247,
1843
+ z: 0.842,
1847
1844
  },
1848
- }
1849
- ],
1850
- },
1851
- unit: "Meter",
1852
- projection: {
1853
- method: "TransverseMercator",
1854
- falseEasting: 400000,
1855
- falseNorthing: -100000,
1856
- centralMeridian: -2,
1857
- latitudeOfOrigin: 49,
1858
- scaleFactor: 0.999601272737422,
1859
- },
1860
- extent: {
1861
- southWest: {
1862
- latitude: 49.96,
1863
- longitude: -7.56,
1864
- },
1865
- northEast: {
1866
- latitude: 60.84,
1867
- longitude: 1.78,
1868
- },
1869
- },
1845
+ scalePPM: -20.489,
1846
+ },
1847
+ }
1848
+ ],
1870
1849
  },
1871
- verticalCRS: {
1872
- id: "ELLIPSOID",
1850
+ unit: "Meter",
1851
+ projection: {
1852
+ method: "TransverseMercator",
1853
+ falseEasting: 400000,
1854
+ falseNorthing: -100000,
1855
+ centralMeridian: -2,
1856
+ latitudeOfOrigin: 49,
1857
+ scaleFactor: 0.999601272737422,
1873
1858
  },
1874
- additionalTransform: {
1875
- helmert2DWithZOffset: {
1876
- translationX: 284597.3343,
1877
- translationY: 79859.4651,
1878
- translationZ: 0,
1879
- rotDeg: 0.5263624458992088,
1880
- scale: 0.9996703340508721,
1859
+ extent: {
1860
+ southWest: {
1861
+ latitude: 49.96,
1862
+ longitude: -7.56,
1881
1863
  },
1882
- },
1883
- };
1884
- await convertTest("ExtonCampus1.bim", { horizontalCRS: { id: "EPSG:2272" }, verticalCRS: { id: "NAVD88" } }, "WGS84", { x: 775970.3155166894, y: 83323.24543981979, z: 130.74977547686285 }, { p: { x: -75.68712011112366, y: 40.06524845273591, z: 95.9769083 }, s: GeoCoordStatus.Success });
1885
- await convertTest("UTM83-10-NGVD29-10.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NAVD88" } }, { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "NGVD29" } }, { x: 548296.472, y: 4179414.470, z: 0.8457 }, { p: { x: 548392.9689991799, y: 4179217.683834238, z: -0.0006774162750405877 }, s: GeoCoordStatus.Success });
1886
- await convertTest("BritishNatGrid-EllipsoidHelmert1.bim", EWRGCS, "WGS84", { x: 199247.08883859176, y: 150141.68625139236, z: 0.0 }, { p: { x: -0.80184489371471, y: 51.978341907041205, z: 0.0 }, s: GeoCoordStatus.Success });
1887
- await convertTest("BritishNatGrid-Ellipsoid1.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2020119082059511, y: 49.959453295440234, z: 0.0 }, s: GeoCoordStatus.Success });
1888
- await convertTest("BritishNatGrid-Ellipsoid2.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "ETRF89", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2030365061523707, y: 49.960007477936202, z: 0.0 }, s: GeoCoordStatus.Success });
1889
- await convertTest("BritishNatGrid-Ellipsoid3.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "OSGB", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2020119082059511, y: 49.959453295440234, z: 0.0 }, s: GeoCoordStatus.Success });
1890
- await convertTest("GermanyDHDN-3-Ellipsoid1.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.035413954488630, y: 50.575070810112159, z: 0.0 }, s: GeoCoordStatus.Success });
1891
- await convertTest("GermanyDHDN-3-Ellipsoid2.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "DHDN/3", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.035413954488630, y: 50.575070810112159, z: 0.0 }, s: GeoCoordStatus.Success });
1892
- await convertTest("GermanyDHDN-3-Ellipsoid3.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "WGS84", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.034215937440818, y: 50.573862480894853, z: 0.0 }, s: GeoCoordStatus.Success });
1893
- await convertTest("UTM83-10-NGVD29-1.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: 0.0 }, s: GeoCoordStatus.Success });
1894
- await convertTest("UTM83-10-NGVD29-2.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "NAD83", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1895
- await convertTest("UTM83-10-NGVD29-3.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "WGS84", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1896
- await convertTest("UTM27-10-Ellipsoid1.bim", { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 623075.328, y: 4265650.532, z: 0.0 }, { p: { x: -121.58798236995744, y: 38.532616292207997, z: 0.0 }, s: GeoCoordStatus.Success });
1897
- await convertTest("UTM27-10-Ellipsoid2.bim", { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "ELLIPSOID" } }, "NAD83", { x: 623075.328, y: 4265650.532, z: 0.0 }, { p: { x: -121.58905088839697, y: 38.532522753851708, z: 0.0 }, s: GeoCoordStatus.Success });
1898
- await convertTest("UTM83-10-NGVD29-4.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "LL84" }, verticalCRS: { id: "ELLIPSOID" } }, { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1899
- await convertTest("UTM83-10-NGVD29-5.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "LL84" }, verticalCRS: { id: "GEOID" } }, { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: 0.7621583779125531 }, s: GeoCoordStatus.Success });
1900
- await convertTest("UTM83-10-NGVD29-6.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "NAVD88" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1901
- await convertTest("UTM83-10-NGVD29-7.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "GEOID" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1902
- await convertTest("UTM83-10-NGVD29-8.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "NGVD29" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.0 }, s: GeoCoordStatus.Success });
1903
- await convertTest("UTM83-10-NGVD29-9.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { epsg: 26942 }, verticalCRS: { id: "NAVD88" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1904
- await convertTest("UTM83-10-NGVD29-10.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NAVD88" } }, { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "NGVD29" } }, { x: 548296.472, y: 4179414.470, z: 0.8457 }, { p: { x: 548392.9689991799, y: 4179217.683834238, z: -0.0006774162750405877 }, s: GeoCoordStatus.Success });
1905
- await convertTest("BritishNatGrid-Ellipsoid4.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "HS2_Snake_2015" }, verticalCRS: { id: "GEOID" } }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 237732.58101946692, y: 364048.01547843055, z: -47.874172425966336 }, s: GeoCoordStatus.Success });
1906
- await convertTest("BritishNatGrid-Ellipsoid5.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, {
1907
- horizontalCRS: {
1908
- id: "HS2-MOCK",
1909
- description: "USES CUSTOM DATUM",
1910
- source: "Test",
1911
- deprecated: false,
1912
- datumId: "HS2SD_2015",
1913
- unit: "Meter",
1914
- projection: {
1915
- method: "TransverseMercator",
1916
- centralMeridian: -1.5,
1917
- latitudeOfOrigin: 52.30,
1918
- scaleFactor: 1.0,
1919
- falseEasting: 198873.0046,
1920
- falseNorthing: 375064.3871,
1864
+ northEast: {
1865
+ latitude: 60.84,
1866
+ longitude: 1.78,
1921
1867
  },
1922
1868
  },
1923
- verticalCRS: {
1924
- id: "GEOID",
1869
+ },
1870
+ verticalCRS: {
1871
+ id: "ELLIPSOID",
1872
+ },
1873
+ additionalTransform: {
1874
+ helmert2DWithZOffset: {
1875
+ translationX: 284597.3343,
1876
+ translationY: 79859.4651,
1877
+ translationZ: 0,
1878
+ rotDeg: 0.5263624458992088,
1879
+ scale: 0.9996703340508721,
1925
1880
  },
1926
- }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 237732.58101952373, y: 364048.01548327296, z: -47.874172425966336 }, s: GeoCoordStatus.Success });
1927
- await convertTest("BritishNatGrid-Ellipsoid.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.Success });
1928
- await convertTest("UTM83-10-NGVD29-12.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, {
1929
- horizontalCRS: {
1930
- id: "California2",
1931
- description: "USES CUSTOM DATUM",
1932
- source: "Test",
1933
- deprecated: false,
1934
- datumId: "NAD83",
1935
- unit: "Meter",
1936
- projection: {
1937
- method: "LambertConformalConicTwoParallels",
1938
- longitudeOfOrigin: -122,
1939
- latitudeOfOrigin: 37.66666666667,
1940
- standardParallel1: 39.833333333333336,
1941
- standardParallel2: 38.333333333333336,
1942
- falseEasting: 2000000.0,
1943
- falseNorthing: 500000.0,
1944
- },
1945
- extent: {
1946
- southWest: {
1947
- latitude: 35,
1948
- longitude: -125,
1949
- },
1950
- northEast: {
1951
- latitude: 39.1,
1952
- longitude: -120.45,
1953
- },
1954
- },
1881
+ },
1882
+ };
1883
+ await convertTest("ExtonCampus1.bim", { horizontalCRS: { id: "EPSG:2272" }, verticalCRS: { id: "NAVD88" } }, "WGS84", { x: 775970.3155166894, y: 83323.24543981979, z: 130.74977547686285 }, { p: { x: -75.68712011112366, y: 40.06524845273591, z: 95.9769083 }, s: GeoCoordStatus.Success });
1884
+ await convertTest("UTM83-10-NGVD29-10.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NAVD88" } }, { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "NGVD29" } }, { x: 548296.472, y: 4179414.470, z: 0.8457 }, { p: { x: 548392.9689991799, y: 4179217.683834238, z: -0.0006774162750405877 }, s: GeoCoordStatus.Success });
1885
+ await convertTest("BritishNatGrid-EllipsoidHelmert1.bim", EWRGCS, "WGS84", { x: 199247.08883859176, y: 150141.68625139236, z: 0.0 }, { p: { x: -0.80184489371471, y: 51.978341907041205, z: 0.0 }, s: GeoCoordStatus.Success });
1886
+ await convertTest("BritishNatGrid-Ellipsoid1.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2020119082059511, y: 49.959453295440234, z: 0.0 }, s: GeoCoordStatus.Success });
1887
+ await convertTest("BritishNatGrid-Ellipsoid2.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "ETRF89", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2030365061523707, y: 49.960007477936202, z: 0.0 }, s: GeoCoordStatus.Success });
1888
+ await convertTest("BritishNatGrid-Ellipsoid3.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, "OSGB", { x: 170370.718, y: 11572.405, z: 0.0 }, { p: { x: -5.2020119082059511, y: 49.959453295440234, z: 0.0 }, s: GeoCoordStatus.Success });
1889
+ await convertTest("GermanyDHDN-3-Ellipsoid1.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.035413954488630, y: 50.575070810112159, z: 0.0 }, s: GeoCoordStatus.Success });
1890
+ await convertTest("GermanyDHDN-3-Ellipsoid2.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "DHDN/3", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.035413954488630, y: 50.575070810112159, z: 0.0 }, s: GeoCoordStatus.Success });
1891
+ await convertTest("GermanyDHDN-3-Ellipsoid3.bim", { horizontalCRS: { id: "DHDN/3.GK3d-4/EN" }, verticalCRS: { id: "ELLIPSOID" } }, "WGS84", { x: 4360857.005, y: 5606083.067, z: 0.0 }, { p: { x: 10.034215937440818, y: 50.573862480894853, z: 0.0 }, s: GeoCoordStatus.Success });
1892
+ await convertTest("UTM83-10-NGVD29-1.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: 0.0 }, s: GeoCoordStatus.Success });
1893
+ await convertTest("UTM83-10-NGVD29-2.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "NAD83", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1894
+ await convertTest("UTM83-10-NGVD29-3.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, "WGS84", { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1895
+ await convertTest("UTM27-10-Ellipsoid1.bim", { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: 623075.328, y: 4265650.532, z: 0.0 }, { p: { x: -121.58798236995744, y: 38.532616292207997, z: 0.0 }, s: GeoCoordStatus.Success });
1896
+ await convertTest("UTM27-10-Ellipsoid2.bim", { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "ELLIPSOID" } }, "NAD83", { x: 623075.328, y: 4265650.532, z: 0.0 }, { p: { x: -121.58905088839697, y: 38.532522753851708, z: 0.0 }, s: GeoCoordStatus.Success });
1897
+ await convertTest("UTM83-10-NGVD29-4.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "LL84" }, verticalCRS: { id: "ELLIPSOID" } }, { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: -30.12668428839329 }, s: GeoCoordStatus.Success });
1898
+ await convertTest("UTM83-10-NGVD29-5.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "LL84" }, verticalCRS: { id: "GEOID" } }, { x: 632748.112, y: 4263868.307, z: 0.0 }, { p: { x: -121.47738265889652, y: 38.513305313793019, z: 0.7621583779125531 }, s: GeoCoordStatus.Success });
1899
+ await convertTest("UTM83-10-NGVD29-6.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "NAVD88" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1900
+ await convertTest("UTM83-10-NGVD29-7.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "GEOID" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1901
+ await convertTest("UTM83-10-NGVD29-8.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { id: "CA83-II" }, verticalCRS: { id: "NGVD29" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.0 }, s: GeoCoordStatus.Success });
1902
+ await convertTest("UTM83-10-NGVD29-9.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, { horizontalCRS: { epsg: 26942 }, verticalCRS: { id: "NAVD88" } }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1903
+ await convertTest("UTM83-10-NGVD29-10.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NAVD88" } }, { horizontalCRS: { id: "UTM27-10" }, verticalCRS: { id: "NGVD29" } }, { x: 548296.472, y: 4179414.470, z: 0.8457 }, { p: { x: 548392.9689991799, y: 4179217.683834238, z: -0.0006774162750405877 }, s: GeoCoordStatus.Success });
1904
+ await convertTest("BritishNatGrid-Ellipsoid4.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "HS2_Snake_2015" }, verticalCRS: { id: "GEOID" } }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 237732.58101946692, y: 364048.01547843055, z: -47.874172425966336 }, s: GeoCoordStatus.Success });
1905
+ await convertTest("BritishNatGrid-Ellipsoid5.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, {
1906
+ horizontalCRS: {
1907
+ id: "HS2-MOCK",
1908
+ description: "USES CUSTOM DATUM",
1909
+ source: "Test",
1910
+ deprecated: false,
1911
+ datumId: "HS2SD_2015",
1912
+ unit: "Meter",
1913
+ projection: {
1914
+ method: "TransverseMercator",
1915
+ centralMeridian: -1.5,
1916
+ latitudeOfOrigin: 52.30,
1917
+ scaleFactor: 1.0,
1918
+ falseEasting: 198873.0046,
1919
+ falseNorthing: 375064.3871,
1955
1920
  },
1956
- verticalCRS: {
1957
- id: "GEOID",
1921
+ },
1922
+ verticalCRS: {
1923
+ id: "GEOID",
1924
+ },
1925
+ }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 237732.58101952373, y: 364048.01548327296, z: -47.874172425966336 }, s: GeoCoordStatus.Success });
1926
+ await convertTest("BritishNatGrid-Ellipsoid.bim", { horizontalCRS: { id: "BritishNatGrid" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 473327.251, y: 257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.Success });
1927
+ await convertTest("UTM83-10-NGVD29-12.bim", { horizontalCRS: { id: "UTM83-10" }, verticalCRS: { id: "NGVD29" } }, {
1928
+ horizontalCRS: {
1929
+ id: "California2",
1930
+ description: "USES CUSTOM DATUM",
1931
+ source: "Test",
1932
+ deprecated: false,
1933
+ datumId: "NAD83",
1934
+ unit: "Meter",
1935
+ projection: {
1936
+ method: "LambertConformalConicTwoParallels",
1937
+ longitudeOfOrigin: -122,
1938
+ latitudeOfOrigin: 37.66666666667,
1939
+ standardParallel1: 39.833333333333336,
1940
+ standardParallel2: 38.333333333333336,
1941
+ falseEasting: 2000000.0,
1942
+ falseNorthing: 500000.0,
1958
1943
  },
1959
- }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1960
- // Do some test that return errors
1961
- // First test uses one GCS in Eastern USA and the other in UK. This will produce a hard domain error
1962
- await convertTest("Error1.bim", { horizontalCRS: { id: "UTM84-17N" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.OutOfMathematicalDomain });
1963
- // This test performs conversion in a region outside normal use of GCS but still mathematically valid (soft domain error)
1964
- await convertTest("Error2.bim", { horizontalCRS: { id: "DanishS34-S99" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: -6618.5925260757449, y: 36058.097489683532, z: 0.0 }, { p: { x: 13.53250346041385, y: 54.71216475341563, z: 0.0 }, s: GeoCoordStatus.OutOfUsefulRange });
1965
- // -6618.5925260757449, 36058.097489683532
1966
- // { x: -221748.034, y: -10012.784, z: 0.0 } { p: { x: 10.36481105, y: 54.38462506, z: 0.0 }
1967
- // This test makes use of a GCS using a grid file that does not even exist and will return a datum conversion error.
1968
- const userGCSWithinexistentGridFile = {
1969
- horizontalCRS: {
1970
- id: "User1",
1971
- datumId: "UserDatum1",
1972
- datum: {
1973
- id: "UserDatum1",
1974
- ellipsoidId: "CLRK66",
1975
- transforms: [
1976
- {
1977
- method: "GridFiles",
1978
- sourceEllipsoid: {
1979
- id: "CLRK66",
1980
- equatorialRadius: 6378160.0,
1981
- polarRadius: 6356774.719195306,
1982
- },
1983
- targetEllipsoid: {
1984
- id: "WGS84",
1985
- equatorialRadius: 6378160.0,
1986
- polarRadius: 6356774.719195306,
1987
- },
1988
- gridFile: {
1989
- files: [
1990
- { fileName: "./user/inexistent.gdc", format: "NTv2", direction: "Direct" },
1991
- ],
1992
- },
1993
- },
1994
- ],
1995
- },
1996
- unit: "Meter",
1997
- projection: {
1998
- method: "TransverseMercator",
1999
- centralMeridian: -115,
2000
- latitudeOfOrigin: 0,
2001
- scaleFactor: 0.9992,
2002
- falseEasting: 1.0,
2003
- falseNorthing: 2.0,
1944
+ extent: {
1945
+ southWest: {
1946
+ latitude: 35,
1947
+ longitude: -125,
2004
1948
  },
2005
- extent: {
2006
- southWest: { latitude: 48, longitude: -120.5 },
2007
- northEast: { latitude: 84, longitude: -109.5 },
1949
+ northEast: {
1950
+ latitude: 39.1,
1951
+ longitude: -120.45,
2008
1952
  },
2009
- }, verticalCRS: { id: "ELLIPSOID" },
2010
- };
2011
- await convertTest("Error3.bim", userGCSWithinexistentGridFile, "WGS84", { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoDatumConverter });
2012
- // The model GCS is not valid
2013
- await convertTest("Error4.bim", { horizontalCRS: { id: "badfood" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoGCSDefined });
2014
- // The given GCS is not valid
2015
- await convertTest("Error5.bim", { horizontalCRS: { id: "UTM84-17N" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "badfood" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoGCSDefined });
2016
- });
2017
- }
1953
+ },
1954
+ },
1955
+ verticalCRS: {
1956
+ id: "GEOID",
1957
+ },
1958
+ }, { x: 569024.940, y: 4386341.752, z: 0.0 }, { p: { x: 1983192.529823256, y: 717304.0311293667, z: 0.745910484422781 }, s: GeoCoordStatus.Success });
1959
+ // Do some test that return errors
1960
+ // First test uses one GCS in Eastern USA and the other in UK. This will produce a hard domain error
1961
+ await convertTest("Error1.bim", { horizontalCRS: { id: "UTM84-17N" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.OutOfMathematicalDomain });
1962
+ // This test performs conversion in a region outside normal use of GCS but still mathematically valid (soft domain error)
1963
+ await convertTest("Error2.bim", { horizontalCRS: { id: "DanishS34-S99" }, verticalCRS: { id: "ELLIPSOID" } }, "", { x: -6618.5925260757449, y: 36058.097489683532, z: 0.0 }, { p: { x: 13.53250346041385, y: 54.71216475341563, z: 0.0 }, s: GeoCoordStatus.OutOfUsefulRange });
1964
+ // -6618.5925260757449, 36058.097489683532
1965
+ // { x: -221748.034, y: -10012.784, z: 0.0 } { p: { x: 10.36481105, y: 54.38462506, z: 0.0 }
1966
+ // This test makes use of a GCS using a grid file that does not even exist and will return a datum conversion error.
1967
+ const userGCSWithinexistentGridFile = {
1968
+ horizontalCRS: {
1969
+ id: "User1",
1970
+ datumId: "UserDatum1",
1971
+ datum: {
1972
+ id: "UserDatum1",
1973
+ ellipsoidId: "CLRK66",
1974
+ transforms: [
1975
+ {
1976
+ method: "GridFiles",
1977
+ sourceEllipsoid: {
1978
+ id: "CLRK66",
1979
+ equatorialRadius: 6378160.0,
1980
+ polarRadius: 6356774.719195306,
1981
+ },
1982
+ targetEllipsoid: {
1983
+ id: "WGS84",
1984
+ equatorialRadius: 6378160.0,
1985
+ polarRadius: 6356774.719195306,
1986
+ },
1987
+ gridFile: {
1988
+ files: [
1989
+ { fileName: "./user/inexistent.gdc", format: "NTv2", direction: "Direct" },
1990
+ ],
1991
+ },
1992
+ },
1993
+ ],
1994
+ },
1995
+ unit: "Meter",
1996
+ projection: {
1997
+ method: "TransverseMercator",
1998
+ centralMeridian: -115,
1999
+ latitudeOfOrigin: 0,
2000
+ scaleFactor: 0.9992,
2001
+ falseEasting: 1.0,
2002
+ falseNorthing: 2.0,
2003
+ },
2004
+ extent: {
2005
+ southWest: { latitude: 48, longitude: -120.5 },
2006
+ northEast: { latitude: 84, longitude: -109.5 },
2007
+ },
2008
+ }, verticalCRS: { id: "ELLIPSOID" },
2009
+ };
2010
+ await convertTest("Error3.bim", userGCSWithinexistentGridFile, "WGS84", { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoDatumConverter });
2011
+ // The model GCS is not valid
2012
+ await convertTest("Error4.bim", { horizontalCRS: { id: "badfood" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "OSGB-GPS-2015" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoGCSDefined });
2013
+ // The given GCS is not valid
2014
+ await convertTest("Error5.bim", { horizontalCRS: { id: "UTM84-17N" }, verticalCRS: { id: "ELLIPSOID" } }, { horizontalCRS: { id: "badfood" }, verticalCRS: { id: "GEOID" } }, { x: 1473327.251, y: 1257049.636, z: 0.0 }, { p: { x: 473325.6830048648, y: 257049.77062273448, z: -47.87643904264457 }, s: GeoCoordStatus.NoGCSDefined });
2015
+ });
2018
2016
  it("should be able to create a snapshot IModel and set geolocation by ECEF", async () => {
2019
2017
  const args = {
2020
2018
  rootSubject: { name: "TestSubject", description: "test iTwin" },
@@ -2968,50 +2966,50 @@ describe("iModel", () => {
2968
2966
  IModelJsFs.unlinkSync(imodelPath);
2969
2967
  const testImodel = SnapshotDb.createEmpty(imodelPath, { rootSubject: { name: "invalidRelationshipClass" } });
2970
2968
  await testImodel.importSchemaStrings([
2971
- `<?xml version="1.0" encoding="UTF-8"?>
2972
- <ECSchema schemaName="TestRelationSchema" alias="trs" version="01.00" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.1">
2973
- <ECSchemaReference name="BisCore" version="01.00" alias="bis"/>
2974
- <ECEntityClass typeName="TestElement">
2975
- <BaseClass>bis:PhysicalElement</BaseClass>
2976
- <ECProperty propertyName="Name" typeName="string" />
2977
- </ECEntityClass>
2978
-
2979
- <ECEntityClass typeName="ChildA" >
2980
- <BaseClass>TestElement</BaseClass>
2981
- <ECNavigationProperty propertyName="NavPropChildB" relationshipName="ADrivesB" direction="Forward" readOnly="True">
2982
- </ECNavigationProperty>
2983
- </ECEntityClass>
2984
-
2985
- <ECEntityClass typeName="ChildB" >
2986
- <BaseClass>TestElement</BaseClass>
2987
- </ECEntityClass>
2988
-
2989
- <ECRelationshipClass typeName="ADrivesB" strengthDirection="Backward" strength="referencing" modifier="Sealed">
2990
- <Source multiplicity="(0..*)" polymorphic="true" roleLabel="drives">
2991
- <Class class="ChildA"/>
2992
- </Source>
2993
- <Target multiplicity="(0..1)" polymorphic="true" roleLabel="is driven by">
2994
- <Class class="ChildB"/>
2995
- </Target>
2996
- </ECRelationshipClass>
2997
-
2998
- <ECEntityClass typeName="ChildC">
2999
- <BaseClass>TestElement</BaseClass>
3000
- </ECEntityClass>
3001
-
3002
- <ECEntityClass typeName="ChildD">
3003
- <BaseClass>TestElement</BaseClass>
3004
- </ECEntityClass>
3005
-
3006
- <ECRelationshipClass typeName="CIsRelatedToD" strength="referencing" modifier="Sealed">
3007
- <BaseClass>bis:ElementRefersToElements</BaseClass>
3008
- <Source multiplicity="(0..*)" roleLabel="IsRelatedTo" polymorphic="true">
3009
- <Class class="ChildC"/>
3010
- </Source>
3011
- <Target multiplicity="(0..*)" roleLabel="IsRelatedTo (Reversed)" polymorphic="true">
3012
- <Class class="ChildD"/>
3013
- </Target>
3014
- </ECRelationshipClass>
2969
+ `<?xml version="1.0" encoding="UTF-8"?>
2970
+ <ECSchema schemaName="TestRelationSchema" alias="trs" version="01.00" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.1">
2971
+ <ECSchemaReference name="BisCore" version="01.00" alias="bis"/>
2972
+ <ECEntityClass typeName="TestElement">
2973
+ <BaseClass>bis:PhysicalElement</BaseClass>
2974
+ <ECProperty propertyName="Name" typeName="string" />
2975
+ </ECEntityClass>
2976
+
2977
+ <ECEntityClass typeName="ChildA" >
2978
+ <BaseClass>TestElement</BaseClass>
2979
+ <ECNavigationProperty propertyName="NavPropChildB" relationshipName="ADrivesB" direction="Forward" readOnly="True">
2980
+ </ECNavigationProperty>
2981
+ </ECEntityClass>
2982
+
2983
+ <ECEntityClass typeName="ChildB" >
2984
+ <BaseClass>TestElement</BaseClass>
2985
+ </ECEntityClass>
2986
+
2987
+ <ECRelationshipClass typeName="ADrivesB" strengthDirection="Backward" strength="referencing" modifier="Sealed">
2988
+ <Source multiplicity="(0..*)" polymorphic="true" roleLabel="drives">
2989
+ <Class class="ChildA"/>
2990
+ </Source>
2991
+ <Target multiplicity="(0..1)" polymorphic="true" roleLabel="is driven by">
2992
+ <Class class="ChildB"/>
2993
+ </Target>
2994
+ </ECRelationshipClass>
2995
+
2996
+ <ECEntityClass typeName="ChildC">
2997
+ <BaseClass>TestElement</BaseClass>
2998
+ </ECEntityClass>
2999
+
3000
+ <ECEntityClass typeName="ChildD">
3001
+ <BaseClass>TestElement</BaseClass>
3002
+ </ECEntityClass>
3003
+
3004
+ <ECRelationshipClass typeName="CIsRelatedToD" strength="referencing" modifier="Sealed">
3005
+ <BaseClass>bis:ElementRefersToElements</BaseClass>
3006
+ <Source multiplicity="(0..*)" roleLabel="IsRelatedTo" polymorphic="true">
3007
+ <Class class="ChildC"/>
3008
+ </Source>
3009
+ <Target multiplicity="(0..*)" roleLabel="IsRelatedTo (Reversed)" polymorphic="true">
3010
+ <Class class="ChildD"/>
3011
+ </Target>
3012
+ </ECRelationshipClass>
3015
3013
  </ECSchema>`
3016
3014
  ]);
3017
3015
  // Enable ECSQL write validation and verify it's set