[mapguide-commits] r5140 - in sandbox/rfc94/Common: CoordinateSystem Geometry Geometry/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Sep 17 06:59:32 EDT 2010


Author: baertelchen
Date: 2010-09-17 10:59:32 +0000 (Fri, 17 Sep 2010)
New Revision: 5140

Added:
   sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h
   sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h
Modified:
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.h
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.h
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
   sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.h
   sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h
   sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h
   sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDef.h
   sandbox/rfc94/Common/Geometry/Geometry.vcproj
   sandbox/rfc94/Common/Geometry/GeometryCommon.h
Log:
Added 2 new enums: MgCoordinateSystemGeodeticAnalyticalTransformationMethod and MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod. When reading a transformation definition from the dictionary, the method code of the parameters(!) - not the transformation itself - is set to a value as found in one of the 2 enums.

Removed the Get/Set MethodCode from the TransformationDefinition, because the actual type is defined by the constants as found in MgCoordinateSystemGeodeticTransformDefType. That is, an API client first has to determine the type of the transformation he is currently dealing with via GetTransformDefType() and then retrieve the typed parameters. As the parameters do vary depending on the actual transformation method being used, e.g. Molodensky, x-parameter etc, the client will then have to call the GetTransformationMethod() method on the parameters object to see what the actual method is.

The GetTransformationMethod does NOT exist for the (grid file) interpolation transformation because there the method is determined by the file format(s) being used. Remember, that such a transformation can refer to multiple files where each is allowed to be of a different format.

The still existing MgCoordinateSystemGeodeticTransformationMethod class that contains all kind of transformation types / methods is kept as we need to read from older dictionary versions, too.

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.cpp	2010-09-17 10:59:32 UTC (rev 5140)
@@ -29,14 +29,16 @@
 
 using namespace CSLibrary;
 
-CCoordinateSystemGeodeticAnalyticalTransformDefParams::CCoordinateSystemGeodeticAnalyticalTransformDefParams(const csGeocentricXformParams& params, bool isProtected)
-    : CCoordinateSystemGeodeticTransformDefParams(isProtected), geocentricTransformParams(NULL)
+CCoordinateSystemGeodeticAnalyticalTransformDefParams::CCoordinateSystemGeodeticAnalyticalTransformDefParams(
+    const csGeocentricXformParams& params, INT32 analyticalTransformMethod, bool isProtected)
+    : CCoordinateSystemGeodeticTransformDefParams(isProtected)
+    , geocentricTransformParams(NULL), transformationMethod(analyticalTransformMethod)
 {
     this->geocentricTransformParams = (csGeocentricXformParams*) CS_malc(sizeof(csGeocentricXformParams));
     if (NULL == this->geocentricTransformParams)
         throw new MgOutOfMemoryException(L"CCoordinateSystemGeodeticAnalyticalTransformDefParams.Ctor", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    memset(this->geocentricTransformParams, 0, sizeof(csGeocentricXformParams));
+    *this->geocentricTransformParams = params;
 }
 
 CCoordinateSystemGeodeticAnalyticalTransformDefParams::~CCoordinateSystemGeodeticAnalyticalTransformDefParams()
@@ -77,6 +79,37 @@
     return CCoordinateSystemGeodeticTransformDefParams::IsProtected();
 }
 
+INT32 CCoordinateSystemGeodeticAnalyticalTransformDefParams::GetTransformationMethod()
+{
+    return this->transformationMethod;
+}
+
+void CCoordinateSystemGeodeticAnalyticalTransformDefParams::SetTransformationMethod(INT32 analyticalMethodCode)
+{
+    VERIFY_NOT_PROTECTED(L"CCoordinateSystemGeodeticAnalyticalTransformDefParams::SetTransformationMethod");
+
+    switch(analyticalMethodCode)
+    {
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::None:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::ThreeParameter:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Molodensky:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::AbridgedMolodensky:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Geocentric:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::FourParameter:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::SixParameter:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Bursa:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::Frame:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::SevenParameter:
+    case MgCoordinateSystemGeodeticAnalyticalTransformationMethod::MolodenskyBadekas:
+        break;
+
+    default:
+        throw new MgInvalidArgumentException(L"CCoordinateSystemGeodeticAnalyticalTransformDefParams.SetTransformationMethod", __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    this->transformationMethod = analyticalMethodCode;
+}
+
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticAnalyticalTransformDefParams,DeltaX,double,this->geocentricTransformParams->deltaX)
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticAnalyticalTransformDefParams,DeltaY,double,this->geocentricTransformParams->deltaY)
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticAnalyticalTransformDefParams,DeltaZ,double,this->geocentricTransformParams->deltaZ)

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticAnalyticalTransformDefParams.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -27,7 +27,7 @@
         public CCoordinateSystemGeodeticTransformDefParams
     {
     public:
-        CCoordinateSystemGeodeticAnalyticalTransformDefParams(const csGeocentricXformParams& params, bool isProtected);
+        CCoordinateSystemGeodeticAnalyticalTransformDefParams(const csGeocentricXformParams& params, INT32 analyticalTransformMethod, bool isProtected);
         ~CCoordinateSystemGeodeticAnalyticalTransformDefParams();
 
         virtual void Dispose();
@@ -68,11 +68,15 @@
         virtual double GetTranslateZ();
         virtual void SetTranslateZ(double translateZ);
 
+        virtual INT32 GetTransformationMethod();
+        virtual void SetTransformationMethod(INT32 analyticalMethodCode);
+
     private:
         void ReleaseInstance();
 
     private:
         csGeocentricXformParams* geocentricTransformParams;
+        INT32 transformationMethod;
     };
 
 } //namespace CSLibrary

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.cpp	2010-09-17 10:59:32 UTC (rev 5140)
@@ -34,8 +34,9 @@
 using namespace CSLibrary;
 
 CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::CCoordinateSystemGeodeticMultipleRegressionTransformDefParams(
-    const csMultipleRegressionXformParams& params, bool isProtected)
-    : CCoordinateSystemGeodeticTransformDefParams(isProtected), mulRegParams(NULL)
+    const csMultipleRegressionXformParams& params, INT32 mulRegTransformMethod, bool isProtected)
+    : CCoordinateSystemGeodeticTransformDefParams(isProtected)
+    , mulRegParams(NULL), transformationMethod(mulRegTransformMethod)
 {
     this->Reset();
     *this->mulRegParams = params;
@@ -90,6 +91,29 @@
     return CCoordinateSystemGeodeticTransformDefParams::IsProtected();
 }
 
+INT32 CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::GetTransformationMethod()
+{
+    return this->transformationMethod;
+}
+
+void CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::SetTransformationMethod(INT32 mulRegTransformationMethod)
+{
+    VERIFY_NOT_PROTECTED(L"CCoordinateSystemGeodeticMultipleRegressionTransformDefParams::SetTransformationMethod");
+
+    switch(mulRegTransformationMethod)
+    {
+    case MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::None:
+    case MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::GeneralPolynomialEpsg:
+    case MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod::MultipleRegression:
+        break;
+
+    default:
+        throw new MgInvalidArgumentException(L"CCoordinateSystemGeodeticMultipleRegressionTransformDefParams.SetTransformationMethod", __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    this->transformationMethod = mulRegTransformationMethod;
+}
+
 //DEFINE_GET_SET_NUMERIC_IDX(CCoordinateSystemGeodeticMultipleRegressionTransformDefParams,PhiBitmap,UINT32,this->mulRegParams->phiBitMap,3)
 //DEFINE_GET_SET_NUMERIC_IDX(CCoordinateSystemGeodeticMultipleRegressionTransformDefParams,LambdaBitmap,UINT32,this->mulRegParams->lambdaBitMap,3)
 //DEFINE_GET_SET_NUMERIC_IDX(CCoordinateSystemGeodeticMultipleRegressionTransformDefParams,HeightBitmap,UINT32,this->mulRegParams->heightBitMap,3)

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticMultipleRegressionTransformDefParams.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -29,7 +29,8 @@
     {
     public:
 
-        CCoordinateSystemGeodeticMultipleRegressionTransformDefParams(const csMultipleRegressionXformParams& mulRegParams, bool isProtected);
+        CCoordinateSystemGeodeticMultipleRegressionTransformDefParams(const csMultipleRegressionXformParams& mulRegParams,
+            INT32 mulRegTransformMethod, bool isProtected);
         ~CCoordinateSystemGeodeticMultipleRegressionTransformDefParams();
 
         virtual void Dispose();
@@ -81,6 +82,9 @@
         virtual double GetCoefficientHeight(INT32 index /* range [0..104]*/);
         virtual void SetCoefficientHeight(INT32 index, double value);
 
+        virtual INT32 GetTransformationMethod();
+        virtual void SetTransformationMethod(INT32 mulRegTransformationMethod);
+
     private:
         void CopyTo(void* target) const;
         
@@ -89,6 +93,7 @@
     
     private:
         csMultipleRegressionXformParams* mulRegParams;
+        INT32 transformationMethod;
     };
 
 } //namespace CSLibrary

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp	2010-09-17 10:59:32 UTC (rev 5140)
@@ -101,13 +101,13 @@
 
     MG_CATCH(L"CCoordinateSystemGeodeticTransformDef.Reset")
 
-    if (NULL != newEmptyDef)
+    if (NULL != newEmptyDef) //will have been set to NULL before
         CS_free(newEmptyDef);
 
     MG_THROW()
 }
 
-INT32 CCoordinateSystemGeodeticTransformDef::GetTransformationDefType(INT32 methodCode /* method code as read from the dictionary entry; this is not */)
+INT32 CCoordinateSystemGeodeticTransformDef::GetTransformationDefType(INT32 methodCode /* method code as read from the dictionary entry */)
 {
     INT32 transformationType;
     switch(methodCode)
@@ -138,33 +138,25 @@
         transformationType = MgCoordinateSystemGeodeticTransformDefType::Analytical;
         break;
 
-    //grid file interpolation methods
+    //grid file interpolation methods; if a transformation uses grid file(s), this is the actual
+    //type - the ones below are the format of the grid file(s) being used. For example,
+    //the dictionary does then contains something like
+    //GRID_FILE: NTv2,FWD,.\Australia\Agd66\A66National(13.09.01).gsb
     case cs_DTCMTH_FILE:
-    case cs_DTCMTH_NTv1:  
+        transformationType = MgCoordinateSystemGeodeticTransformDefType::Interpolation;
+        break;
+    
+    //the next entries are not expected; we're mapping them to the interpolation transformation type
+    case cs_DTCMTH_NTv1:
     case cs_DTCMTH_NTv2:
     case cs_DTCMTH_NADCON:
     case cs_DTCMTH_RGF:
     case cs_DTCMTH_PAR:
     case cs_DTCMTH_ATS77:
-
+        _ASSERT(false);
         transformationType = MgCoordinateSystemGeodeticTransformDefType::Interpolation;
         break;
 
-    //ABA: ???
-    //unknown: Not listed in case in CS_gxio.c
-    /*
-    static const INT32 NAD83 = 5;
-    static const INT32 WGS84 = 6;
-    static const INT32 WGS72 = 7;
-    static const INT32 Lclgrf = 99;
-    */
-
-    //unknown: No call to CS_bswap in CS_gxio.c
-    /*
-    static const INT32 GDA94 = 17;
-    static const INT32 NZGD2K = 18;
-    static const INT32 ETRF89 = 24;
-    */
     default: //invalid / unknown [methodCode] given; don't know how to proceed here
         throw new MgInvalidArgumentException(L"CCoordinateSystemGeodeticTransformDef.Initialize", __LINE__, __WFILE__, NULL, L"", NULL);
     }
@@ -229,16 +221,16 @@
         return NULL;
 
     case MgCoordinateSystemGeodeticTransformDefType::Analytical:
-        return static_cast<MgCoordinateSystemGeodeticAnalyticalTransformDefParams*>(
-            new CCoordinateSystemGeodeticAnalyticalTransformDefParams(this->transformDefinition->parameters.geocentricParameters, this->IsProtected()));
+        return static_cast<MgCoordinateSystemGeodeticAnalyticalTransformDefParams*>(new CCoordinateSystemGeodeticAnalyticalTransformDefParams(
+            this->transformDefinition->parameters.geocentricParameters, this->transformDefinition->methodCode, this->IsProtected()));
     
     case MgCoordinateSystemGeodeticTransformDefType::Interpolation:
         return static_cast<MgCoordinateSystemGeodeticInterpolationTransformDefParams*>(
             new CCoordinateSystemGeodeticInterpolationTransformDefParams(this->transformDefinition->parameters.fileParameters, this->IsProtected()));
     
     case MgCoordinateSystemGeodeticTransformDefType::MultipleRegression:
-        return static_cast<MgCoordinateSystemGeodeticMultipleRegressionTransformDefParams*>(
-            new CCoordinateSystemGeodeticMultipleRegressionTransformDefParams(this->transformDefinition->parameters.dmaMulRegParameters, this->IsProtected()));
+        return static_cast<MgCoordinateSystemGeodeticMultipleRegressionTransformDefParams*>(new CCoordinateSystemGeodeticMultipleRegressionTransformDefParams(
+            this->transformDefinition->parameters.dmaMulRegParameters, this->transformDefinition->methodCode, this->IsProtected()));
     
     default: //invalid state; why's that?
         _ASSERT(false);
@@ -262,20 +254,40 @@
     //otherwise: make sure, we've been passed non null paramaters...
     ENSURE_NOT_NULL(parameters, CCoordinateSystemGeodeticTransformDef::SetParameters);
     
+    INT32 paramsMethodCode = 0x0;
+
     //...and the parameters are actually of the correct type, i.e. match whatever we've stored in [this->transformationDefType]
     CCoordinateSystemGeodeticTransformDefParams* transformDefParams = NULL;
+    CCoordinateSystemGeodeticMultipleRegressionTransformDefParams* mulRegParams = NULL;
+    CCoordinateSystemGeodeticAnalyticalTransformDefParams* analyticalParams = NULL;
+
     switch(this->transformationDefType)
     {
     case MgCoordinateSystemGeodeticTransformDefType::Analytical:
-        transformDefParams = dynamic_cast<CCoordinateSystemGeodeticAnalyticalTransformDefParams*>(parameters);
+        analyticalParams = dynamic_cast<CCoordinateSystemGeodeticAnalyticalTransformDefParams*>(parameters);
+        if (NULL != analyticalParams)
+        {
+            paramsMethodCode = analyticalParams->GetTransformationMethod();
+            transformDefParams = analyticalParams;
+        }
         break;
 
     case MgCoordinateSystemGeodeticTransformDefType::Interpolation:
         transformDefParams = dynamic_cast<CCoordinateSystemGeodeticInterpolationTransformDefParams*>(parameters);
+        //the transformation method is "grid file"; the actual type doesn't matter as this
+        //is specified through the [MgCoordinateSystemGeodeticInterpolationTransformDefParams] object;
+        //such a transformation can use multiple grid files where each can have a different format
+        paramsMethodCode = cs_DTCMTH_FILE;
         break;
     
     case MgCoordinateSystemGeodeticTransformDefType::MultipleRegression:
-        transformDefParams = dynamic_cast<CCoordinateSystemGeodeticMultipleRegressionTransformDefParams*>(parameters);
+        mulRegParams = dynamic_cast<CCoordinateSystemGeodeticMultipleRegressionTransformDefParams*>(parameters);
+        if (NULL != mulRegParams)
+        {
+            paramsMethodCode = mulRegParams->GetTransformationMethod();
+            transformDefParams = mulRegParams;
+        }
+
         break;
 
     default:
@@ -288,6 +300,7 @@
 
     //copy the values from the parameter we've been passed into our own [parameters] section
     transformDefParams->CopyTo(&this->transformDefinition->parameters);
+    this->transformDefinition->methodCode = paramsMethodCode;
 }
 
 bool CCoordinateSystemGeodeticTransformDef::IsProtected()
@@ -331,7 +344,6 @@
 DEFINE_GET_SET_STRING(CCoordinateSystemGeodeticTransformDef,Description,this->transformDefinition->description)
 DEFINE_GET_SET_STRING(CCoordinateSystemGeodeticTransformDef,Source,this->transformDefinition->source)
 
-DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticTransformDef,MethodCode,INT32,this->transformDefinition->methodCode)
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticTransformDef,EpsgCode,INT32,this->transformDefinition->epsgCode)
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticTransformDef,EpsgVariation,INT32,this->transformDefinition->epsgVariation)
 DEFINE_GET_SET_NUMERIC(CCoordinateSystemGeodeticTransformDef,InverseSupported,bool,this->transformDefinition->inverseSupported)

Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -55,9 +55,6 @@
     virtual STRING GetSource();
     virtual void SetSource(CREFSTRING source);
 
-    virtual INT32 GetMethodCode();
-    virtual void SetMethodCode(INT32 methodCode);
-
     virtual INT32 GetEpsgCode();
     virtual void SetEpsgCode(INT32 epsgCode);
 

Modified: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -64,6 +64,9 @@
     virtual void SetTranslateZ(double translateZ) = 0;
     
     //END: struct csGeodeticXformParmsGeocentric
+
+    virtual INT32 GetTransformationMethod() = 0;
+    virtual void SetTransformationMethod(INT32 analyticalMethodCode) = 0;
 			
 protected:
     /////////////////////////////////////////////////////////////////

Added: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h	                        (rev 0)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -0,0 +1,53 @@
+//
+//  Copyright (C) 2004-2010 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 _MGCOORDINATESYSTEMGEODETICANALYTICALTRANSFORMATIONMETHOD_H_
+#define _MGCOORDINATESYSTEMGEODETICANALYTICALTRANSFORMATIONMETHOD_H_
+
+/// \defgroup MgCoordinateSystemGeodeticAnalyticalTransformationMethod MgCoordinateSystemGeodeticAnalyticalTransformationMethod
+/// \ingroup Coordinate_System_classes
+/// \{
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// This class defines the currently supported transformation methods for
+/// analytical geodetic transformations as they can be read via the
+/// MgCoordinateSystemGeodeticTransformDefDictionary. That is, the constants
+/// defined below are only valid for MgCoordinateSystemGeodeticTransformDef instances
+/// of type MgCoordinateSystemGeodeticTransformDefType.Analytical.
+///
+class MG_GEOMETRY_API MgCoordinateSystemGeodeticAnalyticalTransformationMethod
+{
+PUBLISHED_API:
+
+    static const INT32 None = 0;
+
+    static const INT32 ThreeParameter =     (8192 + 1);     //cs_DTCMTH_3PARM
+    static const INT32 Molodensky =         (8192 + 2);     //cs_DTCMTH_MOLOD
+    static const INT32 AbridgedMolodensky = (8192 + 3);     //cs_DTCMTH_AMOLO
+    static const INT32 Geocentric =         (8192 + 4);     //cs_DTCMTH_GEOCT
+    static const INT32 FourParameter =      (8192 + 5);     //cs_DTCMTH_4PARM
+    static const INT32 SixParameter =       (8192 + 6);     //cs_DTCMTH_6PARM
+    static const INT32 Bursa =              (8192 + 7);     //cs_DTCMTH_BURSA
+    static const INT32 Frame =              (8192 + 8);     //cs_DTCMTH_FRAME
+    static const INT32 SevenParameter =     (8192 + 9);     //cs_DTCMTH_7PARM
+    static const INT32 MolodenskyBadekas =  (8192 + 10);    //cs_DTCMTH_BDKAS
+
+};
+/// \}
+
+#endif //_MGCOORDINATESYSTEMGEODETICANALYTICALTRANSFORMATIONMETHOD_H_

Modified: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -80,6 +80,9 @@
 
     //END: struct csGeodeticXformParmsDmaMulReg
 
+    virtual INT32 GetTransformationMethod() = 0;
+    virtual void SetTransformationMethod(INT32 mulRegTransformationMethod) = 0;
+
 protected:
     /////////////////////////////////////////////////////////////////
     /// \brief

Added: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h	                        (rev 0)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -0,0 +1,45 @@
+//
+//  Copyright (C) 2004-2010 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 _MGCOORDINATESYSTEMGEODETICMULTIPLEREGRESSIONTRANSFORMATIONMETHOD_H_
+#define _MGCOORDINATESYSTEMGEODETICMULTIPLEREGRESSIONTRANSFORMATIONMETHOD_H_
+
+/// \defgroup MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod
+/// \ingroup Coordinate_System_classes
+/// \{
+
+///////////////////////////////////////////////////////////////
+/// \brief
+/// This class defines the currently supported transformation methods for
+/// multiple regression geodetic transformations as they can be read via the
+/// MgCoordinateSystemGeodeticTransformDefDictionary. That is, the constants
+/// defined below are only valid for MgCoordinateSystemGeodeticTransformDef instances
+/// of type MgCoordinateSystemGeodeticTransformDefType.MultipleRegression.
+///
+class MG_GEOMETRY_API MgCoordinateSystemGeodeticMultipleRegressionTransformationMethod
+{
+PUBLISHED_API:
+
+    static const INT32 None = 0;
+
+    static const INT32 MultipleRegression =     (20480 + 1); //cs_DTCMTH_MULRG
+    static const INT32 GeneralPolynomialEpsg =  (20480 + 2); //cs_DTCMTH_PLYNM
+
+};
+/// \}
+
+#endif //_MGCOORDINATESYSTEMGEODETICMULTIPLEREGRESSIONTRANSFORMATIONMETHOD_H_

Modified: sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDef.h
===================================================================
--- sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDef.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/Geometry/CoordinateSystem/CoordinateSystemGeodeticTransformDef.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -54,9 +54,6 @@
     virtual STRING GetSource() = 0;
     virtual void SetSource(CREFSTRING source) = 0;
 
-    virtual INT32 GetMethodCode() = 0;
-    virtual void SetMethodCode(INT32 methodCode) = 0;
-
     virtual INT32 GetEpsgCode() = 0;
     virtual void SetEpsgCode(INT32 epsgCode) = 0;
 

Modified: sandbox/rfc94/Common/Geometry/Geometry.vcproj
===================================================================
--- sandbox/rfc94/Common/Geometry/Geometry.vcproj	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/Geometry/Geometry.vcproj	2010-09-17 10:59:32 UTC (rev 5140)
@@ -2643,6 +2643,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\CoordinateSystem\CoordinateSystemGeodeticAnalyticalTransformationMethod.h"
+				>
+			</File>
+			<File
 				RelativePath=".\CoordinateSystem\CoordinateSystemGeodeticAnalyticalTransformDefParams.h"
 				>
 			</File>
@@ -2651,6 +2655,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\CoordinateSystem\CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h"
+				>
+			</File>
+			<File
 				RelativePath=".\CoordinateSystem\CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h"
 				>
 			</File>

Modified: sandbox/rfc94/Common/Geometry/GeometryCommon.h
===================================================================
--- sandbox/rfc94/Common/Geometry/GeometryCommon.h	2010-09-17 08:00:59 UTC (rev 5139)
+++ sandbox/rfc94/Common/Geometry/GeometryCommon.h	2010-09-17 10:59:32 UTC (rev 5140)
@@ -114,6 +114,8 @@
 #include "CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformDefParams.h"
 #include "CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformDefParams.h"
 #include "CoordinateSystem/CoordinateSystemGeodeticTransformDefType.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticAnalyticalTransformationMethod.h"
+#include "CoordinateSystem/CoordinateSystemGeodeticMultipleRegressionTransformationMethod.h"
 #include "CoordinateSystem/CoordinateSystemGeodeticTransformDef.h"
 #include "CoordinateSystem/CoordinateSystemGeodeticPathElement.h"
 #include "CoordinateSystem/CoordinateSystemGeodeticPath.h"



More information about the mapguide-commits mailing list