@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.5
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/CHANGELOG.md +12 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA6H;AAC7H,sDAA6C;AAiB7C;;GAEG;AACH,MAAa,YAAY;IAMI;IAA8B;IAA6B;IALtF;;;;OAIG;IACH,YAA2B,YAAoB,CAAC,EAAS,WAAmB,CAAC,EAAS,SAAiB,CAAC;QAA7E,cAAS,GAAT,SAAS,CAAY;QAAS,aAAQ,GAAR,QAAQ,CAAY;QAAS,WAAM,GAAN,MAAM,CAAY;IA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e,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,uBAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF;AA3ED,8CA2EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\n\n/** The JSON representation of a Cartographic object.\n * @public\n * @extensions\n **/\nexport interface CartographicProps {\n /** The longitude, specified in radians. */\n longitude: number;\n /** The latitude, specified in radians. */\n latitude: number;\n /** The height, specified in meters above the ellipsoid. */\n height: number;\n}\n\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\n * @public\n */\nexport class Cartographic implements CartographicProps {\n /**\n * @param longitude longitude, in radians.\n * @param latitude latitude, in radians.\n * @param height The height, in meters, above the ellipsoid.\n */\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\n\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\n public static createZero() {\n return new Cartographic(0, 0, 0);\n }\n\n /** Create a new Cartographic from longitude and latitude specified in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n if (!result)\n return new Cartographic(args.longitude, args.latitude, args.height);\n\n result.longitude = args.longitude;\n result.latitude = args.latitude;\n result.height = args.height !== undefined ? args.height : 0;\n return result;\n }\n\n /** Create a JSON representation of a Cartographic object. */\n public toJSON(): CartographicProps {\n return {\n latitude: this.latitude,\n longitude: this.longitude,\n height: this.height,\n };\n }\n\n /** Freeze this Cartographic */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n\n /** longitude, in degrees */\n public get longitudeDegrees() {\n return Angle.radiansToDegrees(this.longitude);\n }\n\n /** latitude, in degrees */\n public get latitudeDegrees() {\n return Angle.radiansToDegrees(this.latitude);\n }\n\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\n }\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\n * is appropriate for input to the Ellipsoid methods.\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\n }\n\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\n }\n\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object into which to store the result (optional)\n */\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\n }\n\n private static _cartesianToCartographicN = new Point3d();\n private static _cartesianToCartographicP = new Point3d();\n private static _cartesianToCartographicH = new Vector3d();\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\n private static _wgs84CenterToleranceSquared = 0.1;\n private static _scratchN = new Vector3d();\n private static _scratchK = new Vector3d();\n\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\n * @param [result] The object onto which to store the result.\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\n\n if (!p)\n return undefined;\n\n const n = Cartographic._cartesianToCartographicN;\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\n Cartographic.normalize(n, n);\n\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\n\n if (!result)\n return new Cartographic(longitude, latitude, height);\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n }\n\n /** Scale point to geodetic surface\n * @param point in ECEF to scale to the surface\n * @param [result] The object onto which to store the result.\n * @returns a point on the geodetic surface\n */\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\n }\n\n /** Duplicates a Cartographic. */\n public clone(result?: Cartographic): Cartographic {\n if (!result)\n return new Cartographic(this.longitude, this.latitude, this.height);\n\n result.longitude = this.longitude;\n result.latitude = this.latitude;\n result.height = this.height;\n return result;\n }\n\n /** Return true if this Cartographic is the same as right */\n public equals(right: CartographicProps): boolean {\n return (this === right) ||\n ((this.longitude === right.longitude) &&\n (this.latitude === right.latitude) &&\n (this.height === right.height));\n }\n\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\n return (this === right) ||\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\n (Math.abs(this.height - right.height) <= epsilon));\n }\n\n private static normalize(cartesian: XYZ, result: XYZ) {\n const magnitude = cartesian.magnitude();\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n }\n\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n }\n\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n }\n\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n }\n\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\n\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\n Cartographic.scalePoint(cartesian, ratio, intersection);\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\n let correction = 0.0;\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > 0.01);\n\n if (!result)\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n }\n\n /** Return an ECEF point from a Cartographic point */\n public toEcef(result?: Point3d): Point3d {\n const cosLatitude = Math.cos(this.latitude);\n const scratchN = Cartographic._scratchN;\n const scratchK = Cartographic._scratchK;\n scratchN.x = cosLatitude * Math.cos(this.longitude);\n scratchN.y = cosLatitude * Math.sin(this.longitude);\n scratchN.z = Math.sin(this.latitude);\n Cartographic.normalize(scratchN, scratchN);\n\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\n Cartographic.scalePoint(scratchN, this.height, scratchN);\n\n result = result ? result : new Point3d();\n Cartographic.addPoints(scratchK, scratchN, result);\n return result;\n }\n}\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\n * @public\n */\nexport class CartographicRange {\n private _ranges: Range2d[] = [];\n\n // These following are used to preserve the min/max latitude and longitudes.\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\n private _minLongitude = 0;\n private _maxLongitude = 0;\n private _minLatitude = 0;\n private _maxLatitude = 0;\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\n // Compute 8 corners in spatial coordinate system before converting to ECEF\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\n const spatialCorners = spatialRange.corners();\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\n let low: Cartographic | undefined, high: Cartographic | undefined;\n\n for (const ecefCorner of ecefCorners) {\n const geoPt = Cartographic.fromEcef(ecefCorner);\n if (!geoPt)\n continue;\n if (undefined === low || undefined === high) {\n low = geoPt;\n high = geoPt.clone();\n continue;\n }\n low.latitude = Math.min(low.latitude, geoPt.latitude);\n low.longitude = Math.min(low.longitude, geoPt.longitude);\n high.latitude = Math.max(high.latitude, geoPt.latitude);\n high.longitude = Math.max(high.longitude, geoPt.longitude);\n }\n\n if (!low || !high) {\n assert(false);\n return;\n }\n\n const longitudeRanges = [];\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\n } else {\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\n }\n\n for (const longitudeRange of longitudeRanges) {\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\n } else {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\n }\n }\n }\n\n public intersectsRange(other: CartographicRange): boolean {\n for (const range of this._ranges)\n for (const otherRange of other._ranges)\n if (range.intersectsRange(otherRange))\n return true;\n return false;\n }\n\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\n * The X value represents the longitude and the Y value the latitudes.\n * Y values are kept between -PI and +PI while\n * longitude values can be expressed in any range between -2PI to +2PI\n * given the minimum longitude is always smaller numerically than the maximum longitude.\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\n */\n public getLongitudeLatitudeBoundingBox(): Range2d {\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;A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,CAAC,CAAC;YACrH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAO,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACvH,CAAC;QACH,CAAC;IACH,CAAC;IAEM,eAAe,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,uBAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF;AA3ED,8CA2EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\n\r\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\r\n\r\n/** The JSON representation of a Cartographic object.\r\n * @public\r\n * @extensions\r\n **/\r\nexport interface CartographicProps {\r\n /** The longitude, specified in radians. */\r\n longitude: number;\r\n /** The latitude, specified in radians. */\r\n latitude: number;\r\n /** The height, specified in meters above the ellipsoid. */\r\n height: number;\r\n}\r\n\r\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\r\n * @public\r\n */\r\nexport class Cartographic implements CartographicProps {\r\n /**\r\n * @param longitude longitude, in radians.\r\n * @param latitude latitude, in radians.\r\n * @param height The height, in meters, above the ellipsoid.\r\n */\r\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\r\n\r\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\r\n public static createZero() {\r\n return new Cartographic(0, 0, 0);\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude specified in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object onto which to store the result.\r\n */\r\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\r\n if (!result)\r\n return new Cartographic(args.longitude, args.latitude, args.height);\r\n\r\n result.longitude = args.longitude;\r\n result.latitude = args.latitude;\r\n result.height = args.height !== undefined ? args.height : 0;\r\n return result;\r\n }\r\n\r\n /** Create a JSON representation of a Cartographic object. */\r\n public toJSON(): CartographicProps {\r\n return {\r\n latitude: this.latitude,\r\n longitude: this.longitude,\r\n height: this.height,\r\n };\r\n }\r\n\r\n /** Freeze this Cartographic */\r\n public freeze(): Readonly<this> {\r\n return Object.freeze(this);\r\n }\r\n\r\n /** longitude, in degrees */\r\n public get longitudeDegrees() {\r\n return Angle.radiansToDegrees(this.longitude);\r\n }\r\n\r\n /** latitude, in degrees */\r\n public get latitudeDegrees() {\r\n return Angle.radiansToDegrees(this.latitude);\r\n }\r\n\r\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\r\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\r\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\r\n * @param geodeticLatitude geodetic latitude angle in radians\r\n */\r\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\r\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\r\n }\r\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\r\n * is appropriate for input to the Ellipsoid methods.\r\n * @param geodeticLatitude geodetic latitude angle in radians\r\n */\r\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\r\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object onto which to store the result.\r\n */\r\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\r\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\r\n }\r\n\r\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\r\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\r\n * @param result The object into which to store the result (optional)\r\n */\r\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\r\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\r\n }\r\n\r\n private static _cartesianToCartographicN = new Point3d();\r\n private static _cartesianToCartographicP = new Point3d();\r\n private static _cartesianToCartographicH = new Vector3d();\r\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\r\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\r\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\r\n private static _wgs84CenterToleranceSquared = 0.1;\r\n private static _scratchN = new Vector3d();\r\n private static _scratchK = new Vector3d();\r\n\r\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\r\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\r\n * @param [result] The object onto which to store the result.\r\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\r\n */\r\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\r\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\r\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\r\n\r\n if (!p)\r\n return undefined;\r\n\r\n const n = Cartographic._cartesianToCartographicN;\r\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\r\n Cartographic.normalize(n, n);\r\n\r\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\r\n const longitude = Math.atan2(n.y, n.x);\r\n const latitude = Math.asin(n.z);\r\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\r\n\r\n if (!result)\r\n return new Cartographic(longitude, latitude, height);\r\n\r\n result.longitude = longitude;\r\n result.latitude = latitude;\r\n result.height = height;\r\n return result;\r\n }\r\n\r\n /** Scale point to geodetic surface\r\n * @param point in ECEF to scale to the surface\r\n * @param [result] The object onto which to store the result.\r\n * @returns a point on the geodetic surface\r\n */\r\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\r\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\r\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\r\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\r\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\r\n }\r\n\r\n /** Duplicates a Cartographic. */\r\n public clone(result?: Cartographic): Cartographic {\r\n if (!result)\r\n return new Cartographic(this.longitude, this.latitude, this.height);\r\n\r\n result.longitude = this.longitude;\r\n result.latitude = this.latitude;\r\n result.height = this.height;\r\n return result;\r\n }\r\n\r\n /** Return true if this Cartographic is the same as right */\r\n public equals(right: CartographicProps): boolean {\r\n return (this === right) ||\r\n ((this.longitude === right.longitude) &&\r\n (this.latitude === right.latitude) &&\r\n (this.height === right.height));\r\n }\r\n\r\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\r\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\r\n return (this === right) ||\r\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\r\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\r\n (Math.abs(this.height - right.height) <= epsilon));\r\n }\r\n\r\n private static normalize(cartesian: XYZ, result: XYZ) {\r\n const magnitude = cartesian.magnitude();\r\n result.x = cartesian.x / magnitude;\r\n result.y = cartesian.y / magnitude;\r\n result.z = cartesian.z / magnitude;\r\n }\r\n\r\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\r\n result.x = left.x * right.x;\r\n result.y = left.y * right.y;\r\n result.z = left.z * right.z;\r\n }\r\n\r\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\r\n result.x = cartesian.x * scalar;\r\n result.y = cartesian.y * scalar;\r\n result.z = cartesian.z * scalar;\r\n }\r\n\r\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\r\n result.x = left.x + right.x;\r\n result.y = left.y + right.y;\r\n result.z = left.z + right.z;\r\n }\r\n\r\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\r\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\r\n\r\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\r\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\r\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\r\n const positionX = cartesian.x;\r\n const positionY = cartesian.y;\r\n const positionZ = cartesian.z;\r\n\r\n const oneOverRadiiX = oneOverRadii.x;\r\n const oneOverRadiiY = oneOverRadii.y;\r\n const oneOverRadiiZ = oneOverRadii.z;\r\n\r\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\r\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\r\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\r\n\r\n // Compute the squared ellipsoid norm.\r\n const squaredNorm = x2 + y2 + z2;\r\n const ratio = Math.sqrt(1.0 / squaredNorm);\r\n\r\n // As an initial approximation, assume that the radial intersection is the projection point.\r\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\r\n Cartographic.scalePoint(cartesian, ratio, intersection);\r\n\r\n // If the position is near the center, the iteration will not converge.\r\n if (squaredNorm < centerToleranceSquared) {\r\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\r\n }\r\n\r\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\r\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\r\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\r\n\r\n // Use the gradient at the intersection point in place of the true unit normal.\r\n // The difference in magnitude will be absorbed in the multiplier.\r\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\r\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\r\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\r\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\r\n\r\n // Compute the initial guess at the normal vector multiplier, lambda.\r\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\r\n let correction = 0.0;\r\n let func;\r\n let denominator;\r\n let xMultiplier;\r\n let yMultiplier;\r\n let zMultiplier;\r\n let xMultiplier2;\r\n let yMultiplier2;\r\n let zMultiplier2;\r\n let xMultiplier3;\r\n let yMultiplier3;\r\n let zMultiplier3;\r\n\r\n do {\r\n lambda -= correction;\r\n\r\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\r\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\r\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\r\n\r\n xMultiplier2 = xMultiplier * xMultiplier;\r\n yMultiplier2 = yMultiplier * yMultiplier;\r\n zMultiplier2 = zMultiplier * zMultiplier;\r\n\r\n xMultiplier3 = xMultiplier2 * xMultiplier;\r\n yMultiplier3 = yMultiplier2 * yMultiplier;\r\n zMultiplier3 = zMultiplier2 * zMultiplier;\r\n\r\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\r\n\r\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\r\n // computations in the sections to follow.\r\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\r\n\r\n const derivative = -2.0 * denominator;\r\n\r\n correction = func / derivative;\r\n } while (Math.abs(func) > 0.01);\r\n\r\n if (!result)\r\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\r\n\r\n result.x = positionX * xMultiplier;\r\n result.y = positionY * yMultiplier;\r\n result.z = positionZ * zMultiplier;\r\n return result;\r\n }\r\n\r\n /** Return an ECEF point from a Cartographic point */\r\n public toEcef(result?: Point3d): Point3d {\r\n const cosLatitude = Math.cos(this.latitude);\r\n const scratchN = Cartographic._scratchN;\r\n const scratchK = Cartographic._scratchK;\r\n scratchN.x = cosLatitude * Math.cos(this.longitude);\r\n scratchN.y = cosLatitude * Math.sin(this.longitude);\r\n scratchN.z = Math.sin(this.latitude);\r\n Cartographic.normalize(scratchN, scratchN);\r\n\r\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\r\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\r\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\r\n Cartographic.scalePoint(scratchN, this.height, scratchN);\r\n\r\n result = result ? result : new Point3d();\r\n Cartographic.addPoints(scratchK, scratchN, result);\r\n return result;\r\n }\r\n}\r\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\r\n * @public\r\n */\r\nexport class CartographicRange {\r\n private _ranges: Range2d[] = [];\r\n\r\n // These following are used to preserve the min/max latitude and longitudes.\r\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\r\n private _minLongitude = 0;\r\n private _maxLongitude = 0;\r\n private _minLatitude = 0;\r\n private _maxLatitude = 0;\r\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\r\n // Compute 8 corners in spatial coordinate system before converting to ECEF\r\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\r\n const spatialCorners = spatialRange.corners();\r\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\r\n let low: Cartographic | undefined, high: Cartographic | undefined;\r\n\r\n for (const ecefCorner of ecefCorners) {\r\n const geoPt = Cartographic.fromEcef(ecefCorner);\r\n if (!geoPt)\r\n continue;\r\n if (undefined === low || undefined === high) {\r\n low = geoPt;\r\n high = geoPt.clone();\r\n continue;\r\n }\r\n low.latitude = Math.min(low.latitude, geoPt.latitude);\r\n low.longitude = Math.min(low.longitude, geoPt.longitude);\r\n high.latitude = Math.max(high.latitude, geoPt.latitude);\r\n high.longitude = Math.max(high.longitude, geoPt.longitude);\r\n }\r\n\r\n if (!low || !high) {\r\n assert(false);\r\n return;\r\n }\r\n\r\n const longitudeRanges = [];\r\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\r\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\r\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\r\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\r\n } else {\r\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\r\n }\r\n\r\n for (const longitudeRange of longitudeRanges) {\r\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\r\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\r\n } else {\r\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\r\n }\r\n }\r\n }\r\n\r\n public intersectsRange(other: CartographicRange): boolean {\r\n for (const range of this._ranges)\r\n for (const otherRange of other._ranges)\r\n if (range.intersectsRange(otherRange))\r\n return true;\r\n return false;\r\n }\r\n\r\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\r\n * The X value represents the longitude and the Y value the latitudes.\r\n * Y values are kept between -PI and +PI while\r\n * longitude values can be expressed in any range between -2PI to +2PI\r\n * given the minimum longitude is always smaller numerically than the maximum longitude.\r\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\r\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\r\n */\r\n public getLongitudeLatitudeBoundingBox(): Range2d {\r\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateReferenceSystem.js","sourceRoot":"","sources":["../../../src/geometry/CoordinateReferenceSystem.ts"],"names":[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E/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC;YAC5E,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,aAAc,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAY,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,mBAAmB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAoB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnED,sCAmEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore NAVD, NGVD, NSRS, Helmert\n\nimport { GeodeticDatum, GeodeticDatumProps } from \"./GeodeticDatum\";\nimport { GeodeticEllipsoid, GeodeticEllipsoidProps } from \"./GeodeticEllipsoid\";\nimport { Carto2DDegrees, Carto2DDegreesProps, Projection, ProjectionProps } from \"./Projection\";\nimport { AdditionalTransform, AdditionalTransformProps } from \"./AdditionalTransform\";\n/** This type indicates possible linear and angular units supported.\n * @public\n * @extensions\n*/\nexport type UnitType = \"Meter\" | \"InternationalFoot\" | \"USSurveyFoot\" | \"Degree\" | \"Unsupported\";\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n * @extensions\n*/\nexport interface HorizontalCRSExtentProps {\n /** The South West point in latitude and longitude in degrees for the user-defined extent of the CRS */\n southWest: Carto2DDegreesProps;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n northEast: Carto2DDegreesProps;\n}\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n */\nexport class HorizontalCRSExtent implements HorizontalCRSExtentProps {\n /** The latitude minimum and maximum for the user-defined extent of the CRS */\n public readonly southWest: Carto2DDegrees;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n public readonly northEast: Carto2DDegrees;\n\n public constructor(data?: HorizontalCRSExtentProps) {\n if (data) {\n this.southWest = Carto2DDegrees.fromJSON(data.southWest);\n this.northEast = Carto2DDegrees.fromJSON(data.northEast);\n if (this.northEast.latitude < this.southWest.latitude)\n this.northEast.latitude = this.southWest.latitude;\n } else {\n this.southWest = new Carto2DDegrees();\n this.northEast = new Carto2DDegrees();\n }\n }\n\n /** Creates an extent object from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSExtentProps): HorizontalCRSExtent {\n return new HorizontalCRSExtent(data);\n }\n\n /** Creates a JSON from the Extent definition\n * @public */\n public toJSON(): HorizontalCRSExtentProps {\n return { southWest: this.southWest.toJSON(), northEast: this.northEast.toJSON() };\n }\n\n /** Compares two Extents. It applies a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: HorizontalCRSExtent): boolean {\n return this.southWest.equals(other.southWest) && this.northEast.equals(other.northEast);\n }\n}\n\n/** Horizontal Geographic Coordinate Reference System definition\n * @public\n * @extensions\n */\nexport interface HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n * a human to understand the nature of the definition\n */\n name?: string;\n /** Description */\n description?: string;\n /** A textual description of the source of the CRS definition. */\n source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false or undefined then the definition is not deprecated.\n */\n deprecated?: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n datum?: GeodeticDatumProps;\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n ellipsoidId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary\n */\n ellipsoid?: GeodeticEllipsoidProps;\n /** The text indicating the unit used. */\n unit?: UnitType;\n /** Projection including projection parameters. */\n projection?: ProjectionProps;\n /** Extent representing the domain of application of the CRS. */\n extent?: HorizontalCRSExtentProps;\n}\n\n/** Horizontal Geographic Coordinate reference System implementation.\n * An horizontal CRS defines the portion which is horizontal to the Earth surface (within the deformation brought by the projection process).\n * There are two major classes of Horizontal Coordinate Reference Systems:\n * - The projected CRS which rely on a projection to flatten the coordinate system space into axises using linear\n * units (meter, US Survey Feet, ...) relative to some origin.\n * - The non projected CRS (also named geographic CRS by EPSG nomenclature) that does\n * not require a projection (projection method = None) and horizontal coordinates are expressed\n * as longitude and latitude (see [[Cartographic]])\n * Horizontal Coordinate Systems rely on a projection to flatten the surface of an ellipsoid (see [[GeodeticEllipsoid]]) which is\n * the mathematical model of the Earth surface.\n * Explanations in more details of the various concepts can be obtained from other sources including the page on the subject\n * on itwinJS.org (see https://www.itwinjs.org/learning/geolocation/?term=coordinate+system).\n * A few details are still required to grasp the model. Geographic Coordinate Reference Systems rely on the concept of geodetic datums\n * (see [[GeodeticDatum]]) to convert latitude/longitude from one frame of reference to another. Such geodetic datum will bind the ellipsoid\n * and possibly define transformation steps required to convert from the currently used geodetic datum to the common datum WGS84\n * used for worldwide data (such as most popular imagery data sources). If there are no rules established to convert to WGS84\n * or if those rules are secret then the horizontal CRS can be datum-less and must make direct use of the ellipsoid\n * to define the earth surface.\n * For this purpose either the geodetic datum must be specified using either datumId or datum properties or both. If\n * both these values are undefined then it is possible to define the ellipsoid using properties ellipsoidId or ellipsoid or both.\n * These two pairs of properties are mutually exclusive with datum related properties having precedence. If a datum or datumId is set then\n * ellipsoid properties will automatically be undefined. If datumId or datum is defined then attempts to set ellipsoidId or ellipsoid\n * will fail silently, the values remaining undefined. The ellipsoidId will not be a repeat of the ellipsoidId property part of the\n * geodetic datum definition.\n * @public\n */\nexport class HorizontalCRS implements HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n public readonly id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n ** a human to understand the nature of the definition\n */\n public readonly name?: string;\n /** Description */\n public readonly description?: string;\n /** The source of the CRS definition. */\n public readonly source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false then the definition is not deprecated. Default is false.\n */\n public readonly deprecated: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n public readonly epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n public readonly datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n public readonly datum?: GeodeticDatum;\n\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoidId?: string;\n /** The complete definition of the geodetic ellipsoid referred to by ellipsoidId. It can also be used if the ellipsoid is not stored\n * in either service or dictionary. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoid?: GeodeticEllipsoid;\n /** The text indicating the unit used. */\n public readonly unit?: UnitType;\n /** Projection including projection parameters. */\n public readonly projection?: Projection;\n /** Extent representing the domain of application of the CRS. */\n public readonly extent?: HorizontalCRSExtent;\n\n public constructor(_data?: HorizontalCRSProps) {\n this.deprecated = false;\n if (_data) {\n this.id = _data.id;\n this.description = _data.description;\n this.source = _data.source;\n this.deprecated = _data.deprecated ?? false;\n this.epsg = _data.epsg;\n this.datumId = _data.datumId;\n this.datum = _data.datum ? GeodeticDatum.fromJSON(_data.datum) : undefined;\n if (!this.datumId && !this.datum) {\n this.ellipsoidId = _data.ellipsoidId;\n this.ellipsoid = _data.ellipsoid ? GeodeticEllipsoid.fromJSON(_data.ellipsoid) : undefined;\n }\n this.unit = _data.unit;\n this.projection = _data.projection ? Projection.fromJSON(_data.projection) : undefined;\n this.extent = _data.extent ? HorizontalCRSExtent.fromJSON(_data.extent) : undefined;\n }\n }\n\n /** Creates an Horizontal CRS from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSProps): HorizontalCRS {\n return new HorizontalCRS(data);\n }\n\n /** Creates a JSON from the Horizontal CRS definition\n * @public */\n public toJSON(): HorizontalCRSProps {\n const data: HorizontalCRSProps = {};\n data.id = this.id;\n data.description = this.description;\n data.source = this.source;\n /* We prefer to use the default undef instead of false value for deprecated in Json */\n if (this.deprecated)\n data.deprecated = true;\n\n data.epsg = this.epsg;\n data.datumId = this.datumId;\n if (this.datum)\n data.datum = this.datum.toJSON();\n\n data.ellipsoidId = this.ellipsoidId;\n if (this.ellipsoid)\n data.ellipsoid = this.ellipsoid.toJSON();\n\n data.unit = this.unit;\n if (this.projection)\n data.projection = this.projection.toJSON();\n\n if (this.extent)\n data.extent = this.extent.toJSON();\n\n return data;\n }\n\n /** Compares two horizontal CRS. It is not an equivalence test as descriptive properties are also compared\n * but number compares are applied a minuscule tolerance.\n * @public */\n public equals(other: HorizontalCRS): boolean {\n if (this.id !== other.id ||\n this.description !== other.description ||\n this.source !== other.source ||\n this.deprecated !== other.deprecated ||\n this.epsg !== other.epsg ||\n this.datumId !== other.datumId ||\n this.ellipsoidId !== other.ellipsoidId ||\n this.unit !== other.unit)\n return false;\n\n if ((this.datum === undefined) !== (other.datum === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.datum && !this.datum.equals(other.datum!))\n return false;\n\n if ((this.ellipsoid === undefined) !== (other.ellipsoid === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.ellipsoid && !this.ellipsoid.equals(other.ellipsoid!))\n return false;\n\n if ((this.projection === undefined) !== (other.projection === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.projection && !this.projection.equals(other.projection!))\n return false;\n\n if ((this.extent === undefined) !== (other.extent === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.extent && !this.extent.equals(other.extent!))\n return false;\n\n return true;\n }\n}\n\n/** Vertical Geographic Coordinate reference System definition\n * @public\n * @extensions\n */\nexport interface VerticalCRSProps {\n /** Vertical CRS Key name.\n * @see [[VerticalCRS.id]]\n */\n id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n}\n\n/** Vertical Coordinate reference System implementation.\n * The VerticalCRS contains currently a single identifier property of string type. Although\n * we currently only support five distinct key values \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\"\n * we expect to support a broader set in the future including, eventually, user defined vertical CRS\n * which will require additional parameters to be added.\n * @public\n*/\nexport class VerticalCRS implements VerticalCRSProps {\n /** Vertical CRS Key name. The only supported values are currently \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\".\n * GEOID indicates elevations are to be interpreted relative to the local Geoid of the dataset. It can also be considered to be Mean Sea Level.\n * NAVD88 is the local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * NGVD29 is the former local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * ELLIPSOID indicates that elevations are relative to the surface of the WGS84(or current coincident) ellipsoid.\n * LOCAL_ELLIPSOID indicates that elevations are relative to the surface of the local ellipsoid used by the horizontal CRS. It can only\n * be used for datums that are not considered coincident vertically with WGS84. Use of this vertical datum is strongly discouraged.\n */\n public readonly id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n\n public constructor(data?: VerticalCRSProps) {\n this.id = \"GEOID\";\n if (data)\n this.id = data.id;\n }\n\n /** Creates a Vertical CRS from JSON representation.\n * @public */\n public static fromJSON(data: VerticalCRSProps): VerticalCRS {\n return new VerticalCRS(data);\n }\n\n /** Creates a JSON from the Vertical CRS definition\n * @public */\n public toJSON(): VerticalCRSProps {\n return { id: this.id };\n }\n\n /** Compares two vertical CRS.\n * @public */\n public equals(other: VerticalCRS): boolean {\n return (this.id === other.id);\n }\n}\n\n/** Geographic Coordinate Reference System definition that includes the horizontal and vertical definitions as well as an optional\n * additional transformation.\n * @see [[GeographicCRS]].\n * @public\n * @extensions\n */\nexport interface GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n horizontalCRS?: HorizontalCRSProps;\n /** The vertical portion of the geographic coordinate reference system. */\n verticalCRS?: VerticalCRSProps;\n /** The optional additional transform the geographic coordinate reference system. */\n additionalTransform?: AdditionalTransformProps;\n}\n\n/** Geographic Coordinate Reference System implementation. This is the class that indicates the definition of a Geographic\n * coordinate reference system comprised of three components: Horizontal and Vertical and an optional additional transform.\n * The vertical component (see [[VerticalCRS]]) is the simplest portion containing a simple identifier as a string.\n * The optional additional transform of which, currently, only the type Helmert 2D with Z offset [[Helmert2DWithZOffset]] is supported\n * defines a transformation of x,y, and z cartesian coordinate of the projection to the final\n * Geographic Coordinate Reference System cartesian coordinates.\n * The horizontal component contains a list of identification and documentation properties as well as\n * defining details possibly including the projection with method and parameters, the definition of the datum, ellipsoid, extent and so on.\n * The principle of describing a Geographic CRS is that the definition may be incomplete. The whole set of classes related to geographic\n * coordinate reference system classes ([[GeodeticEllipsoid]], [[GeodeticDatum]], [[Projection]], [[GeodeticTransform]], ...) are designed\n * so that they can be parsed from incomplete JSON fragments, or produce incomplete JSON fragments such as would be\n * generated from a request to a REST API to a server when select OData clauses are used.\n * Often GeographicCRS would knowingly be created incomplete but with sufficient information to perform conversion from some\n * reprojection engine (the present set of classes do not provide any GeographicCRS conversion).\n * For example the following definitions are quite sufficient to request conversion to or from by a reprojection engine:\n * { horizontalCRS: {id: \"LL84\"}, verticalCRS: {id:\"GEOID\"}\n * or\n * { horizontalCRS: {datumId: \"WGS84\", projection: {method: \"None\"}}, verticalCRS: \"ELLIPSOID\"}\n * The reprojection engine will use the engine internal dictionary to obtain the details if it can.\n * Some definitions will originate from other sources (a parsed WKT for example) and the reprojection engine will require\n * all mathematical and operational details to perform any conversion (descriptive information are ignored in the conversion process).\n * @note see important detailed explanation in the [[HorizontalCRS]], [[VerticalCRS]] and [[AdditionalTransform]] documentation.\n * @note Earth Centered, Earth Fixed coordinate system (ECEF) is a full 3D cartesian system that unambiguously\n * expressed coordinates relative to the Earth Center. Since there is no horizontal portion independent from\n * the vertical portion this system cannot be represented by a GeographicCRS and remains a separate concept.\n * @public\n*/\nexport class GeographicCRS implements GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n public readonly horizontalCRS?: HorizontalCRS;\n /** The vertical portion of the geographic coordinate reference system. */\n public readonly verticalCRS?: VerticalCRS;\n /** The optional additional transform the geographic coordinate reference system. */\n public readonly additionalTransform?: AdditionalTransform;\n\n public constructor(data?: GeographicCRSProps) {\n if (data) {\n this.horizontalCRS = data.horizontalCRS ? HorizontalCRS.fromJSON(data.horizontalCRS) : undefined;\n this.verticalCRS = data.verticalCRS ? VerticalCRS.fromJSON(data.verticalCRS) : undefined;\n this.additionalTransform = data.additionalTransform ? AdditionalTransform.fromJSON(data.additionalTransform) : undefined;\n }\n }\n\n /** Creates a Geographic CRS from JSON representation.\n * @public */\n public static fromJSON(data: GeographicCRSProps): GeographicCRS {\n return new GeographicCRS(data);\n }\n\n /** Creates a JSON from the Geographic CRS definition\n * @public */\n public toJSON(): GeographicCRSProps {\n const data: GeographicCRSProps = {};\n if (this.horizontalCRS)\n data.horizontalCRS = this.horizontalCRS.toJSON();\n\n if (this.verticalCRS)\n data.verticalCRS = this.verticalCRS.toJSON();\n\n if (this.additionalTransform)\n data.additionalTransform = this.additionalTransform.toJSON();\n\n return data;\n }\n\n /** Compares two Geographic CRS. It is a strict compare operation not an equivalence test though\n * number compares are applied a minuscule tolerance.\n * It takes into account descriptive properties not only mathematical definition properties.\n * @public\n */\n public equals(other: GeographicCRS): boolean {\n if ((this.horizontalCRS === undefined) !== (other.horizontalCRS === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.horizontalCRS && !this.horizontalCRS.equals(other.horizontalCRS!))\n return false;\n\n if ((this.verticalCRS === undefined) !== (other.verticalCRS === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.verticalCRS && !this.verticalCRS.equals(other.verticalCRS!))\n return false;\n\n if ((this.additionalTransform === undefined) !== (other.additionalTransform === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.additionalTransform && !this.additionalTransform.equals(other.additionalTransform!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"CoordinateReferenceSystem.js","sourceRoot":"","sources":["../../../src/geometry/CoordinateReferenceSystem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,0CAA0C;;;AAE1C,mDAAoE;AACpE,2DAAgF;AAChF,6CAAgG;AAChG,+DAAsF;AAsBtF;;GAEG;AACH,MAAa,mBAAmB;IAC9B,8EAA8E;IAC9D,SAAS,CAAiB;IAC1C;;;;+CAI2C;IAC3B,SAAS,CAAiB;IAE1C,YAAmB,IAA+B;QAChD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,SAAS,GAAG,2BAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzD,IAAI,CAAC,SAAS,GAAG,2BAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzD,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ;gBACnD,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,SAAS,GAAG,IAAI,2BAAc,EAAE,CAAC;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,2BAAc,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;IACpF,CAAC;IAED;kBACc;IACP,MAAM,C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AW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAE/C,IAAI,IAAI,CAAC,mBAAmB;YAC1B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC;YAC5E,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,aAAc,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAY,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,mBAAmB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAoB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnED,sCAmEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n// cspell:ignore NAVD, NGVD, NSRS, Helmert\r\n\r\nimport { GeodeticDatum, GeodeticDatumProps } from \"./GeodeticDatum\";\r\nimport { GeodeticEllipsoid, GeodeticEllipsoidProps } from \"./GeodeticEllipsoid\";\r\nimport { Carto2DDegrees, Carto2DDegreesProps, Projection, ProjectionProps } from \"./Projection\";\r\nimport { AdditionalTransform, AdditionalTransformProps } from \"./AdditionalTransform\";\r\n/** This type indicates possible linear and angular units supported.\r\n * @public\r\n * @extensions\r\n*/\r\nexport type UnitType = \"Meter\" | \"InternationalFoot\" | \"USSurveyFoot\" | \"Degree\" | \"Unsupported\";\r\n\r\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\r\n * @public\r\n * @extensions\r\n*/\r\nexport interface HorizontalCRSExtentProps {\r\n /** The South West point in latitude and longitude in degrees for the user-defined extent of the CRS */\r\n southWest: Carto2DDegreesProps;\r\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\r\n The latitude of the North East must be greater or equal to the latitude of the South West point\r\n It is possible, however, for the longitude of the South West corner to have greater value than the\r\n longitude of the North East point such as when the west longitude is located on the other side\r\n of the -180/180 degree longitude line.*/\r\n northEast: Carto2DDegreesProps;\r\n}\r\n\r\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\r\n * @public\r\n */\r\nexport class HorizontalCRSExtent implements HorizontalCRSExtentProps {\r\n /** The latitude minimum and maximum for the user-defined extent of the CRS */\r\n public readonly southWest: Carto2DDegrees;\r\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\r\n The latitude of the North East must be greater or equal to the latitude of the South West point\r\n It is possible, however, for the longitude of the South West corner to have greater value than the\r\n longitude of the North East point such as when the west longitude is located on the other side\r\n of the -180/180 degree longitude line.*/\r\n public readonly northEast: Carto2DDegrees;\r\n\r\n public constructor(data?: HorizontalCRSExtentProps) {\r\n if (data) {\r\n this.southWest = Carto2DDegrees.fromJSON(data.southWest);\r\n this.northEast = Carto2DDegrees.fromJSON(data.northEast);\r\n if (this.northEast.latitude < this.southWest.latitude)\r\n this.northEast.latitude = this.southWest.latitude;\r\n } else {\r\n this.southWest = new Carto2DDegrees();\r\n this.northEast = new Carto2DDegrees();\r\n }\r\n }\r\n\r\n /** Creates an extent object from JSON representation.\r\n * @public */\r\n public static fromJSON(data: HorizontalCRSExtentProps): HorizontalCRSExtent {\r\n return new HorizontalCRSExtent(data);\r\n }\r\n\r\n /** Creates a JSON from the Extent definition\r\n * @public */\r\n public toJSON(): HorizontalCRSExtentProps {\r\n return { southWest: this.southWest.toJSON(), northEast: this.northEast.toJSON() };\r\n }\r\n\r\n /** Compares two Extents. It applies a minuscule tolerance to comparing numbers.\r\n * @public */\r\n public equals(other: HorizontalCRSExtent): boolean {\r\n return this.southWest.equals(other.southWest) && this.northEast.equals(other.northEast);\r\n }\r\n}\r\n\r\n/** Horizontal Geographic Coordinate Reference System definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface HorizontalCRSProps {\r\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\r\n id?: string;\r\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\r\n * a human to understand the nature of the definition\r\n */\r\n name?: string;\r\n /** Description */\r\n description?: string;\r\n /** A textual description of the source of the CRS definition. */\r\n source?: string;\r\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\r\n * If false or undefined then the definition is not deprecated.\r\n */\r\n deprecated?: boolean;\r\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\r\n epsg?: number;\r\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\r\n datumId?: string;\r\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\r\n * in either service or dictionary.\r\n */\r\n datum?: GeodeticDatumProps;\r\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\r\n * of having datumId and datum properties undefined.\r\n */\r\n ellipsoidId?: string;\r\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\r\n * in either service or dictionary\r\n */\r\n ellipsoid?: GeodeticEllipsoidProps;\r\n /** The text indicating the unit used. */\r\n unit?: UnitType;\r\n /** Projection including projection parameters. */\r\n projection?: ProjectionProps;\r\n /** Extent representing the domain of application of the CRS. */\r\n extent?: HorizontalCRSExtentProps;\r\n}\r\n\r\n/** Horizontal Geographic Coordinate reference System implementation.\r\n * An horizontal CRS defines the portion which is horizontal to the Earth surface (within the deformation brought by the projection process).\r\n * There are two major classes of Horizontal Coordinate Reference Systems:\r\n * - The projected CRS which rely on a projection to flatten the coordinate system space into axises using linear\r\n * units (meter, US Survey Feet, ...) relative to some origin.\r\n * - The non projected CRS (also named geographic CRS by EPSG nomenclature) that does\r\n * not require a projection (projection method = None) and horizontal coordinates are expressed\r\n * as longitude and latitude (see [[Cartographic]])\r\n * Horizontal Coordinate Systems rely on a projection to flatten the surface of an ellipsoid (see [[GeodeticEllipsoid]]) which is\r\n * the mathematical model of the Earth surface.\r\n * Explanations in more details of the various concepts can be obtained from other sources including the page on the subject\r\n * on itwinJS.org (see https://www.itwinjs.org/learning/geolocation/?term=coordinate+system).\r\n * A few details are still required to grasp the model. Geographic Coordinate Reference Systems rely on the concept of geodetic datums\r\n * (see [[GeodeticDatum]]) to convert latitude/longitude from one frame of reference to another. Such geodetic datum will bind the ellipsoid\r\n * and possibly define transformation steps required to convert from the currently used geodetic datum to the common datum WGS84\r\n * used for worldwide data (such as most popular imagery data sources). If there are no rules established to convert to WGS84\r\n * or if those rules are secret then the horizontal CRS can be datum-less and must make direct use of the ellipsoid\r\n * to define the earth surface.\r\n * For this purpose either the geodetic datum must be specified using either datumId or datum properties or both. If\r\n * both these values are undefined then it is possible to define the ellipsoid using properties ellipsoidId or ellipsoid or both.\r\n * These two pairs of properties are mutually exclusive with datum related properties having precedence. If a datum or datumId is set then\r\n * ellipsoid properties will automatically be undefined. If datumId or datum is defined then attempts to set ellipsoidId or ellipsoid\r\n * will fail silently, the values remaining undefined. The ellipsoidId will not be a repeat of the ellipsoidId property part of the\r\n * geodetic datum definition.\r\n * @public\r\n */\r\nexport class HorizontalCRS implements HorizontalCRSProps {\r\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\r\n public readonly id?: string;\r\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\r\n ** a human to understand the nature of the definition\r\n */\r\n public readonly name?: string;\r\n /** Description */\r\n public readonly description?: string;\r\n /** The source of the CRS definition. */\r\n public readonly source?: string;\r\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\r\n * If false then the definition is not deprecated. Default is false.\r\n */\r\n public readonly deprecated: boolean;\r\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\r\n public readonly epsg?: number;\r\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\r\n public readonly datumId?: string;\r\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\r\n * in either service or dictionary.\r\n */\r\n public readonly datum?: GeodeticDatum;\r\n\r\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\r\n * of having datumId and datum properties undefined.\r\n */\r\n public readonly ellipsoidId?: string;\r\n /** The complete definition of the geodetic ellipsoid referred to by ellipsoidId. It can also be used if the ellipsoid is not stored\r\n * in either service or dictionary. This property is exclusive\r\n * of having datumId and datum properties undefined.\r\n */\r\n public readonly ellipsoid?: GeodeticEllipsoid;\r\n /** The text indicating the unit used. */\r\n public readonly unit?: UnitType;\r\n /** Projection including projection parameters. */\r\n public readonly projection?: Projection;\r\n /** Extent representing the domain of application of the CRS. */\r\n public readonly extent?: HorizontalCRSExtent;\r\n\r\n public constructor(_data?: HorizontalCRSProps) {\r\n this.deprecated = false;\r\n if (_data) {\r\n this.id = _data.id;\r\n this.description = _data.description;\r\n this.source = _data.source;\r\n this.deprecated = _data.deprecated ?? false;\r\n this.epsg = _data.epsg;\r\n this.datumId = _data.datumId;\r\n this.datum = _data.datum ? GeodeticDatum.fromJSON(_data.datum) : undefined;\r\n if (!this.datumId && !this.datum) {\r\n this.ellipsoidId = _data.ellipsoidId;\r\n this.ellipsoid = _data.ellipsoid ? GeodeticEllipsoid.fromJSON(_data.ellipsoid) : undefined;\r\n }\r\n this.unit = _data.unit;\r\n this.projection = _data.projection ? Projection.fromJSON(_data.projection) : undefined;\r\n this.extent = _data.extent ? HorizontalCRSExtent.fromJSON(_data.extent) : undefined;\r\n }\r\n }\r\n\r\n /** Creates an Horizontal CRS from JSON representation.\r\n * @public */\r\n public static fromJSON(data: HorizontalCRSProps): HorizontalCRS {\r\n return new HorizontalCRS(data);\r\n }\r\n\r\n /** Creates a JSON from the Horizontal CRS definition\r\n * @public */\r\n public toJSON(): HorizontalCRSProps {\r\n const data: HorizontalCRSProps = {};\r\n data.id = this.id;\r\n data.description = this.description;\r\n data.source = this.source;\r\n /* We prefer to use the default undef instead of false value for deprecated in Json */\r\n if (this.deprecated)\r\n data.deprecated = true;\r\n\r\n data.epsg = this.epsg;\r\n data.datumId = this.datumId;\r\n if (this.datum)\r\n data.datum = this.datum.toJSON();\r\n\r\n data.ellipsoidId = this.ellipsoidId;\r\n if (this.ellipsoid)\r\n data.ellipsoid = this.ellipsoid.toJSON();\r\n\r\n data.unit = this.unit;\r\n if (this.projection)\r\n data.projection = this.projection.toJSON();\r\n\r\n if (this.extent)\r\n data.extent = this.extent.toJSON();\r\n\r\n return data;\r\n }\r\n\r\n /** Compares two horizontal CRS. It is not an equivalence test as descriptive properties are also compared\r\n * but number compares are applied a minuscule tolerance.\r\n * @public */\r\n public equals(other: HorizontalCRS): boolean {\r\n if (this.id !== other.id ||\r\n this.description !== other.description ||\r\n this.source !== other.source ||\r\n this.deprecated !== other.deprecated ||\r\n this.epsg !== other.epsg ||\r\n this.datumId !== other.datumId ||\r\n this.ellipsoidId !== other.ellipsoidId ||\r\n this.unit !== other.unit)\r\n return false;\r\n\r\n if ((this.datum === undefined) !== (other.datum === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.datum && !this.datum.equals(other.datum!))\r\n return false;\r\n\r\n if ((this.ellipsoid === undefined) !== (other.ellipsoid === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.ellipsoid && !this.ellipsoid.equals(other.ellipsoid!))\r\n return false;\r\n\r\n if ((this.projection === undefined) !== (other.projection === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.projection && !this.projection.equals(other.projection!))\r\n return false;\r\n\r\n if ((this.extent === undefined) !== (other.extent === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.extent && !this.extent.equals(other.extent!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/** Vertical Geographic Coordinate reference System definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface VerticalCRSProps {\r\n /** Vertical CRS Key name.\r\n * @see [[VerticalCRS.id]]\r\n */\r\n id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\r\n}\r\n\r\n/** Vertical Coordinate reference System implementation.\r\n * The VerticalCRS contains currently a single identifier property of string type. Although\r\n * we currently only support five distinct key values \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\"\r\n * we expect to support a broader set in the future including, eventually, user defined vertical CRS\r\n * which will require additional parameters to be added.\r\n * @public\r\n*/\r\nexport class VerticalCRS implements VerticalCRSProps {\r\n /** Vertical CRS Key name. The only supported values are currently \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\".\r\n * GEOID indicates elevations are to be interpreted relative to the local Geoid of the dataset. It can also be considered to be Mean Sea Level.\r\n * NAVD88 is the local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\r\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\r\n * NGVD29 is the former local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\r\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\r\n * ELLIPSOID indicates that elevations are relative to the surface of the WGS84(or current coincident) ellipsoid.\r\n * LOCAL_ELLIPSOID indicates that elevations are relative to the surface of the local ellipsoid used by the horizontal CRS. It can only\r\n * be used for datums that are not considered coincident vertically with WGS84. Use of this vertical datum is strongly discouraged.\r\n */\r\n public readonly id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\r\n\r\n public constructor(data?: VerticalCRSProps) {\r\n this.id = \"GEOID\";\r\n if (data)\r\n this.id = data.id;\r\n }\r\n\r\n /** Creates a Vertical CRS from JSON representation.\r\n * @public */\r\n public static fromJSON(data: VerticalCRSProps): VerticalCRS {\r\n return new VerticalCRS(data);\r\n }\r\n\r\n /** Creates a JSON from the Vertical CRS definition\r\n * @public */\r\n public toJSON(): VerticalCRSProps {\r\n return { id: this.id };\r\n }\r\n\r\n /** Compares two vertical CRS.\r\n * @public */\r\n public equals(other: VerticalCRS): boolean {\r\n return (this.id === other.id);\r\n }\r\n}\r\n\r\n/** Geographic Coordinate Reference System definition that includes the horizontal and vertical definitions as well as an optional\r\n * additional transformation.\r\n * @see [[GeographicCRS]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeographicCRSProps {\r\n /** The horizontal portion of the geographic coordinate reference system. */\r\n horizontalCRS?: HorizontalCRSProps;\r\n /** The vertical portion of the geographic coordinate reference system. */\r\n verticalCRS?: VerticalCRSProps;\r\n /** The optional additional transform the geographic coordinate reference system. */\r\n additionalTransform?: AdditionalTransformProps;\r\n}\r\n\r\n/** Geographic Coordinate Reference System implementation. This is the class that indicates the definition of a Geographic\r\n * coordinate reference system comprised of three components: Horizontal and Vertical and an optional additional transform.\r\n * The vertical component (see [[VerticalCRS]]) is the simplest portion containing a simple identifier as a string.\r\n * The optional additional transform of which, currently, only the type Helmert 2D with Z offset [[Helmert2DWithZOffset]] is supported\r\n * defines a transformation of x,y, and z cartesian coordinate of the projection to the final\r\n * Geographic Coordinate Reference System cartesian coordinates.\r\n * The horizontal component contains a list of identification and documentation properties as well as\r\n * defining details possibly including the projection with method and parameters, the definition of the datum, ellipsoid, extent and so on.\r\n * The principle of describing a Geographic CRS is that the definition may be incomplete. The whole set of classes related to geographic\r\n * coordinate reference system classes ([[GeodeticEllipsoid]], [[GeodeticDatum]], [[Projection]], [[GeodeticTransform]], ...) are designed\r\n * so that they can be parsed from incomplete JSON fragments, or produce incomplete JSON fragments such as would be\r\n * generated from a request to a REST API to a server when select OData clauses are used.\r\n * Often GeographicCRS would knowingly be created incomplete but with sufficient information to perform conversion from some\r\n * reprojection engine (the present set of classes do not provide any GeographicCRS conversion).\r\n * For example the following definitions are quite sufficient to request conversion to or from by a reprojection engine:\r\n * { horizontalCRS: {id: \"LL84\"}, verticalCRS: {id:\"GEOID\"}\r\n * or\r\n * { horizontalCRS: {datumId: \"WGS84\", projection: {method: \"None\"}}, verticalCRS: \"ELLIPSOID\"}\r\n * The reprojection engine will use the engine internal dictionary to obtain the details if it can.\r\n * Some definitions will originate from other sources (a parsed WKT for example) and the reprojection engine will require\r\n * all mathematical and operational details to perform any conversion (descriptive information are ignored in the conversion process).\r\n * @note see important detailed explanation in the [[HorizontalCRS]], [[VerticalCRS]] and [[AdditionalTransform]] documentation.\r\n * @note Earth Centered, Earth Fixed coordinate system (ECEF) is a full 3D cartesian system that unambiguously\r\n * expressed coordinates relative to the Earth Center. Since there is no horizontal portion independent from\r\n * the vertical portion this system cannot be represented by a GeographicCRS and remains a separate concept.\r\n * @public\r\n*/\r\nexport class GeographicCRS implements GeographicCRSProps {\r\n /** The horizontal portion of the geographic coordinate reference system. */\r\n public readonly horizontalCRS?: HorizontalCRS;\r\n /** The vertical portion of the geographic coordinate reference system. */\r\n public readonly verticalCRS?: VerticalCRS;\r\n /** The optional additional transform the geographic coordinate reference system. */\r\n public readonly additionalTransform?: AdditionalTransform;\r\n\r\n public constructor(data?: GeographicCRSProps) {\r\n if (data) {\r\n this.horizontalCRS = data.horizontalCRS ? HorizontalCRS.fromJSON(data.horizontalCRS) : undefined;\r\n this.verticalCRS = data.verticalCRS ? VerticalCRS.fromJSON(data.verticalCRS) : undefined;\r\n this.additionalTransform = data.additionalTransform ? AdditionalTransform.fromJSON(data.additionalTransform) : undefined;\r\n }\r\n }\r\n\r\n /** Creates a Geographic CRS from JSON representation.\r\n * @public */\r\n public static fromJSON(data: GeographicCRSProps): GeographicCRS {\r\n return new GeographicCRS(data);\r\n }\r\n\r\n /** Creates a JSON from the Geographic CRS definition\r\n * @public */\r\n public toJSON(): GeographicCRSProps {\r\n const data: GeographicCRSProps = {};\r\n if (this.horizontalCRS)\r\n data.horizontalCRS = this.horizontalCRS.toJSON();\r\n\r\n if (this.verticalCRS)\r\n data.verticalCRS = this.verticalCRS.toJSON();\r\n\r\n if (this.additionalTransform)\r\n data.additionalTransform = this.additionalTransform.toJSON();\r\n\r\n return data;\r\n }\r\n\r\n /** Compares two Geographic CRS. It is a strict compare operation not an equivalence test though\r\n * number compares are applied a minuscule tolerance.\r\n * It takes into account descriptive properties not only mathematical definition properties.\r\n * @public\r\n */\r\n public equals(other: GeographicCRS): boolean {\r\n if ((this.horizontalCRS === undefined) !== (other.horizontalCRS === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.horizontalCRS && !this.horizontalCRS.equals(other.horizontalCRS!))\r\n return false;\r\n\r\n if ((this.verticalCRS === undefined) !== (other.verticalCRS === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.verticalCRS && !this.verticalCRS.equals(other.verticalCRS!))\r\n return false;\r\n\r\n if ((this.additionalTransform === undefined) !== (other.additionalTransform === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.additionalTransform && !this.additionalTransform.equals(other.additionalTransform!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n"]}
|