[mapguide-commits] r6056 - in trunk/MgDev: Common/CoordinateSystem
Common/Geometry Common/Geometry/CoordinateSystem
Web/src/DotNetUnmanagedApi/Geometry
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Aug 10 11:23:09 EDT 2011
Author: NormOlsen
Date: 2011-08-10 08:23:09 -0700 (Wed, 10 Aug 2011)
New Revision: 6056
Added:
trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h
Modified:
trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemTransform.h
trunk/MgDev/Common/Geometry/GeometryCommon.h
trunk/MgDev/Web/src/DotNetUnmanagedApi/Geometry/GeometryConstants.xml
Log:
Correct Linux build errors introduced by submission which produced version 6055.
Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp 2011-08-10 06:20:57 UTC (rev 6055)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp 2011-08-10 15:23:09 UTC (rev 6056)
@@ -943,7 +943,7 @@
}
INT32 CCoordinateSystemTransform::GetGeodeticTransformationDirection (INT32 index)
{
- INT32 direction (GeodeticDirectionError);
+ INT32 direction (MgCoordinateSystemGeodeticDirection::GeodeticDirectionError);
cs_GxXform_ *xfrmPtr;
MgCoordinateSystemFactory csFactory;
@@ -957,15 +957,15 @@
{
if (xfrmPtr->userDirection == cs_DTCDIR_NONE)
{
- direction = GeodeticDirectionNone;
+ direction = MgCoordinateSystemGeodeticDirection::GeodeticDirectionNone;
}
else if (xfrmPtr->userDirection == cs_DTCDIR_FWD)
{
- direction = GeodeticDirectionForward;
+ direction = MgCoordinateSystemGeodeticDirection::GeodeticDirectionForward;
}
else if (xfrmPtr->userDirection == cs_DTCDIR_INV)
{
- direction = GeodeticDirectionInverse;
+ direction = MgCoordinateSystemGeodeticDirection::GeodeticDirectionInverse;
}
}
}
@@ -2185,7 +2185,7 @@
I/O error or something equally rare
for this to happen.
*/
-int CCoordinateSystemTransform::TransformPoint2D (double point[3])
+INT32 CCoordinateSystemTransform::TransformPoint2D (double point[3])
{
int srcStatus;
int dtmStatus (0);
@@ -2224,7 +2224,7 @@
}
/* The function that follows is identical to the previous function with the
exception that the 3D conversion methods are called. */
-int CCoordinateSystemTransform::TransformPoint3D (double point [3])
+INT32 CCoordinateSystemTransform::TransformPoint3D (double point [3])
{
int srcStatus;
int dtmStatus (0);
Added: trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h
===================================================================
--- trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h (rev 0)
+++ trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h 2011-08-10 15:23:09 UTC (rev 6056)
@@ -0,0 +1,68 @@
+//
+// Copyright (C) 2004-2011 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef _MGCOORDINATESYSTEMGEODETICDIRECTION_H_
+#define _MGCOORDINATESYSTEMGEODETICDIRECTION_H_
+
+/// \defgroup MgCoordinateSystemGeodeticDirection MgCoordinateSystemGeodeticDirection
+/// \ingroup Coordinate_System_classes
+/// \{
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// This class contains the constants for all current transformation definition types.
+///
+class MG_GEOMETRY_API MgCoordinateSystemGeodeticDirection
+{
+
+PUBLISHED_API:
+
+ ///////////////////////////////////////////////////////////////
+ /// \brief
+ /// Direction not been specified. This appears when the
+ /// direction member has not bee set, or in the case where
+ /// direction is not applicable, such as when the
+ /// is the null transformation.
+ static const INT32 GeodeticDirectionNone = 0;
+
+ ///////////////////////////////////////////////////////////////
+ /// \brief
+ /// Forward direction, the calculation the geodetic
+ /// transformation definitions natural calculation.
+ /// I.e. conversion from the definition's "source" datum to the
+ /// "target" datum.
+ static const INT32 GeodeticDirectionForward = 1;
+
+ ///////////////////////////////////////////////////////////////
+ /// \brief
+ /// Inverse direction, i.e. conversion from the definition's
+ /// "target" datum to the "source" datum. Often inmplies an
+ /// iterative technique using the forward technique as the
+ /// estimator.
+ static const INT32 GeodeticDirectionInverse = 2;
+
+ ///////////////////////////////////////////////////////////////
+ /// \brief
+ /// Use this value to indicate an error condition of some sort;
+ /// especially useful when this type is the return value of a
+ /// function.
+ static const INT32 GeodeticDirectionError = -1;
+};
+
+/// \}
+
+#endif //_MGCOORDINATESYSTEMGEODETICDIRECTION_H_
Property changes on: trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemTransform.h
===================================================================
--- trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemTransform.h 2011-08-10 06:20:57 UTC (rev 6055)
+++ trunk/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemTransform.h 2011-08-10 15:23:09 UTC (rev 6056)
@@ -400,21 +400,96 @@
virtual MgCoordinateSystem* GetSource()=0;
virtual MgCoordinateSystem* GetTarget()=0;
virtual void SetSourceAndTarget(MgCoordinateSystem* pSource, MgCoordinateSystem* pTarget)=0;
+
+ // Geodetic Transformation Information
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Returns the number of geodetic transformations used in the implicit or
+ /// explicit path used to convert the source datum to the target datum.
+ /// \return
+ /// Returns the number of geodetic transformations in the path. Zero is
+ /// an indication of the null transformation. A non-zero return value
+ /// should not be taken as meaning the transformation is not null. One
+ /// or transformation definitions of the null type may also exist thus
+ /// yielding a null transformation with a non-zero transformation count.
+ ///
+ virtual INT32 NumberOfGeodeticTransformations()=0;
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Returns a pointer to the geodetic transformation definition indicated
+ /// by the index parameter.
+ /// \param index
+ /// A zero based index indicating the specific transformation definition
+ /// which is to be returned.
+ /// \return
+ /// Returns a disposable pointer to the geodetic transformation definition
+ /// indicated by the index parameter. A null pointer is returned if the
+ /// index parameter is zero.
+ /// \remarks
+ /// No exceptions are thrown.
+ ///
+ virtual MgCoordinateSystemGeodeticTransformDef* GetGeodeticTransformation (INT32 index)=0;
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Returns the direction of the transformation definition indicated by
+ /// the index parameter.
+ /// \param index
+ /// A zero based index indicating the specific transformation definition
+ /// for which the direction is to be returned.
+ /// \return
+ /// Returns a memebr of the MgCoordinateSystemGeodeticDirection class:
+ /// * GeodeticDirectionForward for the forward direction,
+ /// * GeodeticDirectionInverse or the inverse direction,
+ /// * GeodeticDirectionNone if there is no specification (e.g. a null transformation), and
+ /// * GeodeticDirectionError if the index parameter is invalid.
+ /// \remarks
+ /// No exceptions are thrown.
+ ///
+ virtual INT32 GetGeodeticTransformationDirection (INT32 index)=0;
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Returns the definition of the geodetic path used to build the
+ /// transformation, but only if the path was explicitly obtained from the
+ /// Geodetic Path dictionary.
+ /// \return
+ /// Returns a disposable pointer to the Geodetic Path definition which
+ /// was used to build the conversion from the source to target datums.
+ /// Returns null is the path from source to taregt datums was implicitly
+ /// generated by CS-MAP.
+ /// \remarks
+ /// No exceptions are thrown.
+ ///
+ virtual MgCoordinateSystemGeodeticPath* GetExplicitGeodeticPath()=0;
+
// Transformation warnings
virtual void IgnoreDatumShiftWarning(bool bIgnoreDatumShiftWarning)=0;
virtual bool IsIgnoreDatumShiftWarning()=0;
virtual void IgnoreOutsideDomainWarning(bool bIgnoreOutsideDomainWarning)=0;
virtual bool IsIgnoreOutsideDomainWarning()=0;
+ // Status Accumulator
+ virtual INT32 GetSourceWarningCount (void)=0;
+ virtual INT32 GetdatumWarningCount (void)=0;
+ virtual INT32 GetTargetWarningCount (void)=0;
+
// Transformation status
static const INT32 TransformOk = 0;
- static const INT32 TransformDatumShiftWarning = 1;
- static const INT32 TransformOutsideDomainWarning = 2;
+ static const INT32 TransformOutsideDomainWarning = 1;
+ static const INT32 TransformDatumShiftWarning = 2;
static const INT32 TransformTotalFailure = 3;
+ // Status Accumulation Status bit map.
+ static const INT32 SourceCrsError = 1;
+ static const INT32 DatumShiftFallback = 2;
+ static const INT32 DatumShiftError = 4;
+ static const INT32 TargetCrsError = 8;
+
virtual INT32 GetLastTransformStatus()=0;
virtual void ResetLastTransformStatus()=0;
+ virtual bool IsReentrant()=0;
INTERNAL_API:
///////////////////////////////////////////////////////////////////////////
@@ -517,6 +592,54 @@
///////////////////////////////////////////////////////////////////////////
/// \brief
+ /// Transform 2D conversion on an array of 2D XY points.
+ ///
+ /// \param xy
+ /// The array of 2D XY points to be converted.
+ /// \param pointCount
+ /// The number of 2D points in the array which are to be converted.
+ /// \return
+ /// Nothing.
+ /// \remark
+ /// Use the Get...WarningCount functions above to determine the status of
+ /// the conversion. A conversion of all points will be attemted regardless
+ /// of the status of any specific point conversion. Warning counts will
+ /// accumulate on successive calls to this function unless the
+ /// ResetLastTransformStatus member function is called. This function
+ /// will throw an exception only in the case of what is considered a
+ /// total failure. That is, a condition which suggests that there is a
+ /// a problem with the conversion process (i.e. a physical I>O error on
+ /// disk) that is not related to the data being converted. In the case of
+ /// this function, GetConversionStatus will return the most serious (i.e.
+ /// highest value) warning condition encountered.
+ virtual void Transform2D (double xy[][2],INT32 pointCount)=0;
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Transforms a 3D conversion on an array of 3D XYZ points.
+ ///
+ /// \param xy
+ /// The array of 3D XYZ points to be converted.
+ /// \param pointCount
+ /// The number of 3D points in the array which are to be converted.
+ /// \return
+ /// Nothing.
+ /// \remark
+ /// Use the Get...WarningCount functions above to determine the status of
+ /// the conversion. A conversion of all points will be attemted regardless
+ /// of the status of any specific point conversion. Warning counts will
+ /// accumulate on successive calls to this function unless the
+ /// ResetLastTransformStatus member function is called. This function
+ /// will throw an exception only in the case of what is considered a
+ /// total failure. That is, a condition which suggests that there is a
+ /// a problem with the conversion process (i.e. a physical I>O error on
+ /// disk) that is not related to the data being converted. In the case of
+ /// this function, GetConversionStatus will return the most serious (i.e.
+ /// highest value) warning condition encountered.
+ virtual void Transform3D (double xy[][3],INT32 pointCount)=0;
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// \brief
/// Transforms the X, Y, Z ordinates and the measure.
///
/// \param x
Modified: trunk/MgDev/Common/Geometry/GeometryCommon.h
===================================================================
--- trunk/MgDev/Common/Geometry/GeometryCommon.h 2011-08-10 06:20:57 UTC (rev 6055)
+++ trunk/MgDev/Common/Geometry/GeometryCommon.h 2011-08-10 15:23:09 UTC (rev 6056)
@@ -115,6 +115,7 @@
#include "CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h"
#include "CoordinateSystem/CoordinateSystemGeodeticStandaloneTransformDefParams.h"
#include "CoordinateSystem/CoordinateSystemGeodeticTransformDefType.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticDirection.h"
#include "CoordinateSystem/CoordinateSystemGeodeticStandaloneTransformationMethod.h"
#include "CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h"
#include "CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h"
Modified: trunk/MgDev/Web/src/DotNetUnmanagedApi/Geometry/GeometryConstants.xml
===================================================================
--- trunk/MgDev/Web/src/DotNetUnmanagedApi/Geometry/GeometryConstants.xml 2011-08-10 06:20:57 UTC (rev 6055)
+++ trunk/MgDev/Web/src/DotNetUnmanagedApi/Geometry/GeometryConstants.xml 2011-08-10 15:23:09 UTC (rev 6056)
@@ -87,6 +87,7 @@
<Class name="MgCoordinateSystemUnitType" />
<Class name="MgCoordinateSystemWktFlavor" />
<Class name="MgCoordinateSystemGeodeticTransformDefType" />
+ <Class name="MgCoordinateSystemGeodeticDirection" />
<Class name="MgCoordinateSystemGeodeticAnalyticalTransformationMethod" />
<Class name="MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod" />
<Class name="MgCoordinateSystemGeodeticTransformGridFileFormat" />
@@ -122,6 +123,7 @@
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemUnitType.h" />
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemWktFlavor.h" />
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDefType.h" />
+ <Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticDirection.h" />
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h" />
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h" />
<Header path="../../../../Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticStandaloneTransformationMethod.h" />
More information about the mapguide-commits
mailing list