/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _ODSPATIALREFERENCE_ODCOMPOUNDCOORDINATEREFERENCESYSTEMTRANSFORMATION_INCLUDED_ #define _ODSPATIALREFERENCE_ODCOMPOUNDCOORDINATEREFERENCESYSTEMTRANSFORMATION_INCLUDED_ #include "SpatialReference/OdCompoundDatumShift.h" namespace OdSpatialReference { class OdCompoundCoordinateReferenceSystemTransformation; /** \details This template class is a specialization of the OdSmartPtr class for OdCompoundCoordinateReferenceSystemTransformation object pointers. */ typedef OdSmartPtr OdCompoundCoordinateReferenceSystemTransformationPtr; class OdCompoundCoordinateReferenceSystemTransformationImpl; /** \details This class represents a compound coordinate reference system (CRS) transformation. */ class TD_SPATIALREFERENCE_API OdCompoundCoordinateReferenceSystemTransformation : public OdRxObject { ODSPREF_RX_WITH_IMPL_DECLARE_MEMBERS(OdCompoundCoordinateReferenceSystemTransformation); public: /** \details Loads and returns compound coordinate reference system transformation. \param pSourceCRSD [in] Pointer to the source OdCoordinateReferenceSystemDefinition object. \param pSourceVCRSD [in] Pointer to the source OdVerticalCoordinateReferenceSystemDefinition object. \param pTargetCRSD [in] Pointer to the target OdCoordinateReferenceSystemDefinition object. \param pTargetVCRSD [in] Pointer to the target OdVerticalCoordinateReferenceSystemDefinition object. \param pTransformation [out] Pointer to an OdCompoundCoordinateReferenceSystemTransformation object. \returns Returns eOK if successful, or an appropriate error code if not. */ static OdResult load( const OdCoordinateReferenceSystemDefinition* pSourceCRSD, const OdVerticalCoordinateReferenceSystemDefinition* pSourceVCRSD, const OdCoordinateReferenceSystemDefinition* pTargetCRSD, const OdVerticalCoordinateReferenceSystemDefinition* pTargetVCRSD, OdCompoundCoordinateReferenceSystemTransformationPtr& pTransformation ); /** \details Loads and returns compound coordinate reference system transformation. \param sCodeSource [in] Source code of coordinate reference system definition. \param sCodeSourceVertical [in] Source code of vertical coordinate reference system definition. \param sCodeTarget [in] Target code of coordinate reference system definition. \param sCodeTargetVertical [in] Target code of vertical coordinate reference system definition. \param pTransformation [out] Pointer to an OdCompoundCoordinateReferenceSystemTransformation object. \returns Returns eOK if successful, or an appropriate error code if not. */ static OdResult load( const OdString& sCodeSource, const OdString& sCodeSourceVertical, const OdString& sCodeTarget, const OdString& sCodeTargetVertical, OdCompoundCoordinateReferenceSystemTransformationPtr& pTransformation ); /** \details Transforms (X,Y,Z) coordinate from source to target compound coordinate reference system definition. \param dX [in/out] X - coordinate of source compound CRS definition as input, X - coordinate of target compound CRS definition as output. \param dY [in/out] Y - coordinate of source compound CRS definition as input, Y - coordinate of target compound CRS definition as output. \param dZ [in/out] Z - coordinate of source compound CRS definition as input, Z - coordinate of target compound CRS definition as output. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult transform(double& dX, double& dY, double& dZ) const; /** \details Transforms (X,Y,Z,M) coordinate from source to target compound coordinate reference system definition, for M - coordinate scale ratio between source/target compound CRS definitions is applied. \param dX [in/out] X - coordinate of source compound CRS definition as input, X - coordinate of target compound CRS definition as output. \param dY [in/out] Y - coordinate of source compound CRS definition as input, Y - coordinate of target compound CRS definition as output. \param dZ [in/out] Z - coordinate of source compound CRS definition as input, Z - coordinate of target compound CRS definition as output. \param dZ [in/out] M - coordinate of source compound CRS definition as input, M - coordinate of target compound CRS definition as output. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult transformM(double& dX, double& dY, double& dZ, double& dM) const; /** \details Returns the source coordinate reference system definition of this compound coordinate reference system transformation object. \param pSource [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getSource(OdCoordinateReferenceSystemDefinitionPtr& pCRSD) const; /** \details Returns the source vertical coordinate reference system definition of this compound coordinate reference system transformation object. \param pSource [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getVerticalSource(OdVerticalCoordinateReferenceSystemDefinitionPtr& pVCRSD) const; /** \details Returns the target coordinate reference system definition of this compound coordinate reference system transformation object. \param pTarget [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getTarget(OdCoordinateReferenceSystemDefinitionPtr& pCRSD) const; /** \details Returns the target vertical coordinate reference system definition of this compound coordinate reference system transformation object. \param pTarget [out] Pointer to an OdCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getVerticalTarget(OdVerticalCoordinateReferenceSystemDefinitionPtr& pVCRSD) const; /** \details Returns the compound datum shift of this compound coordinate reference system transformation object. \param pDatumShift [out] Pointer to an OdCompoundDatumShift object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getCompoundDatumShift(OdCompoundDatumShiftPtr& pDatumShift) const; }; } #endif //_ODSPATIALREFERENCE_ODCOMPOUNDCOORDINATEREFERENCESYSTEMTRANSFORMATION_INCLUDED_