/////////////////////////////////////////////////////////////////////////////// // 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_ODVERTICALCOORDINATEREFERENCESYSTEMDEFINITION_INCLUDED_ #define _ODSPATIALREFERENCE_ODVERTICALCOORDINATEREFERENCESYSTEMDEFINITION_INCLUDED_ #include "OdDatumDefinition.h" #include "OdVerticalDatumDefinition.h" namespace OdSpatialReference { class OdVerticalCoordinateReferenceSystemDefinition; /** \details This template class is a specialization of the OdSmartPtr class for OdVerticalCoordinateReferenceSystemDefinition object pointers. */ typedef OdSmartPtr OdVerticalCoordinateReferenceSystemDefinitionPtr; /** \details This template class is a specialization of the OdArray class for OdVerticalCoordinateReferenceSystemDefinition object pointers. */ typedef OdArray OdVerticalCoordinateReferenceSystemDefinitionArray; class OdVerticalCoordinateReferenceSystemDefinitionImpl; /** \details This class represents a vertical coordinate reference system (CRS) definition. */ class TD_SPATIALREFERENCE_API OdVerticalCoordinateReferenceSystemDefinition : public OdDefinitionBase { ODSPREF_RX_DECLARE_MEMBERS(OdVerticalCoordinateReferenceSystemDefinition); public: /** \details This enumeration indicates the type of a vertical coordinate reference system. */ enum Type { /** The coordinate system is not set. */ kTypeUnknown = 0, /** The coordinate system is ellipsoidal. */ kTypeEllipsoidal = 1, /** The coordinate system is geoid model derived. */ kTypeGeoidModelDerived = 2 }; /** \details This enumeration indicates the axis direction of a vertical coordinate reference system. */ enum AxisDirection { /** The axis direction is not set. */ kAxisDirectionUnknown = 0, /** The positive direction of the axis is up. */ kAxisDirectionUp = 1, /** The positive direction of the axis is down. */ kAxisDirectionDown = 2 }; /** \details Loads and returns vertical coordinate reference system definition. \param sCode [in] Vertical coordinate system code. \param pCRSD [out] Pointer to an OdVerticalCoordinateReferenceSystemDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ static OdResult load(const OdString& sCode, OdVerticalCoordinateReferenceSystemDefinitionPtr& pVCRSD); /** \details Loads and returns all vertical coordinate reference system definitions. \param arrCRSD [out] Array of pointers to returned vertical coordinate reference system definitions. \returns Returns eOK if successful, or an appropriate error code if not. */ static OdResult loadAll(OdVerticalCoordinateReferenceSystemDefinitionArray& arrVCRSD); /** \details Returns this vertical coordinate reference system definition type. \param eType [out] Vertical coordinate reference system definition type. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getType(Type& eType) const; /** \details Sets the type of this vertical coordinate reference system definition. \param eType [in] Vertical coordinate reference system definition type. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setType(Type eType); /** \details Returns this vertical coordinate reference system definition axis direction. \param eAxisDirection [out] Axis direction. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getAxisDirection(AxisDirection& eAxisDirection) const; /** \details Sets the axis direction to this vertical coordinate reference system definition. \param eAxisDirection [in] Axis direction. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setAxisDirection(AxisDirection eAxisDirection); /** \details Returns the unit code of this vertical coordinate reference system definition. \param eUnitCode [out] Unit code. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getUnitCode(UnitCode& eUnitCode) const; /** \details Sets the unit code to this vertical coordinate reference system definition. \param eUnitCode [in] Unit code. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setUnitCode(UnitCode eUnitCode); /** \details Returns the unit scale factor of this vertical coordinate reference system definition. It is required for conversion from coordinate system units to meters by multiplication. \param dUnitScale [out] Unit scale factor. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getUnitScale(double& dUnitScale) const; /** \details Returns the datum code of this vertical coordinate reference system definition. \param sDatum [out] Datum code. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getDatum(OdString& sDatum) const; /** \details Sets the datum to this vertical coordinate reference system definition. \param sDatum [in] Datum code. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setDatum(const OdString& sDatum); /** \details Returns the datum definition of this vertical coordinate reference system definition. \param pDatum [out] Pointer to an OdDatumDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getDatumDefinition(OdDatumDefinitionPtr& pDatum) const; /** \details Sets the datum to this vertical coordinate reference system definition. \param pDatum [in] Pointer to an OdDatumDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setDatumDefinition(const OdDatumDefinition* pDatum); /** \details Returns the vertical datum definition of this vertical coordinate reference system definition. \param pVerticalDatum [out] Pointer to an OdVerticalDatumDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getVerticalDatumDefinition(OdVerticalDatumDefinitionPtr& pVerticalDatum) const; /** \details Sets the vertical datum to this vertical coordinate reference system definition. \param pVerticalDatum [in] Pointer to an OdVerticalDatumDefinition object. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setVerticalDatumDefinition(const OdVerticalDatumDefinition* pVerticalDatum); /** \details Returns the minumum longitude of the range of this vertical coordinate reference system definition. \param dValue [out] Minumum longitude in degrees. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getLonMin(double& dValue) const; /** \details Returns the maximum longitude of the range of this vertical coordinate reference system definition. \param dValue [out] Maximum longitude in degrees. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getLonMax(double& dValue) const; /** \details Returns the minumum latitude of the range of this vertical coordinate reference system definition. \param dValue [out] Minumum latitude in degrees. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getLatMin(double& dValue) const; /** \details Returns the maximum latitude of the range of this vertical coordinate reference system definition. \param dValue [out] Maximum latitude in degrees. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getLatMax(double& dValue) const; /** \details Returns the EPSG number of this vertical coordinate reference system definition. \param nEpsgCode [out] EPSG number. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getEpsgCode(OdInt32& nEpsgCode) const; /** \details Returns the group string of this vertical coordinate reference system definition. \param sGroup [out] Group string. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getGroup(OdString& sGroup) const; /** \details Sets the group string to this vertical coordinate reference system definition. \param sGroup [in] Group string. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setGroup(const OdString& sGroup); /** \details Sets the longitude/latitude ranges for this vertical coordinate reference system definition. \param dLonMin [in] Minumum longitude in degrees. \param dLatMin [in] Minumum latitude in degrees. \param dLonMax [in] Maximum longitude in degrees. \param dLatMax [in] Maximum latitude in degrees. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult setLonLatBounds(double dLonMin, double dLatMin, double dLonMax, double dLatMax); /** \details Returns the unit code of this vertical coordinate reference system definition. \param sUnits [out] Unit code. \returns Returns eOK if successful, or an appropriate error code if not. */ OdResult getUnits(OdString& sUnits) const; /** \details Checks whether the specified code string is legal for vertical coordinate reference system definition. \param sCode [in] Vertical coordinate reference system definition code string. \returns true - if specified code string is valid. */ static bool isLegalCode(const OdString& sCode); /** \details Checks whether the specified description string is legal for vertical coordinate reference system definition. \param sDescription [in] Vertical coordinate reference system definition description string. \returns true - if specified description string is valid. */ static bool isLegalDescription(const OdString& sDescription); /** \details Checks whether the specified source string is legal for vertical coordinate reference system definition. \param sSource [in] Vertical coordinate reference system definition source string. \returns true - if specified source string is valid. */ static bool isLegalSource(const OdString& sSource); /** \details Checks whether the specified group string is legal for vertical coordinate reference system definition. \param sGroup [in] Vertical coordinate reference system definition group string. \returns true - if specified group string is valid. */ static bool isLegalGroup(const OdString& sGroup); }; } #endif //_ODSPATIALREFERENCE_ODVERTICALCOORDINATEREFERENCESYSTEMDEFINITION_INCLUDED_