[mapguide-commits] r5158 - sandbox/rfc94/Common/CoordinateSystem
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Sep 20 03:26:19 EDT 2010
Author: baertelchen
Date: 2010-09-20 07:26:19 +0000 (Mon, 20 Sep 2010)
New Revision: 5158
Modified:
sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp
sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp
sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.h
Log:
Due to the latest changes made to the CS Map RFC2 sandbox, the CS RFC 94 sandbox didn't compile anymore. Applies some changes and did a quick test run. No additional functionality added.
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp 2010-09-20 07:08:58 UTC (rev 5157)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticInterpolationTransformDefParams.cpp 2010-09-20 07:26:19 UTC (rev 5158)
@@ -83,12 +83,12 @@
throw new MgInvalidArgumentException(L"CCoordinateSystemGeodeticInterpolationTransformDefParams.SetGridFiles", __LINE__, __WFILE__, NULL, L"", NULL);
bool emptyFileCollection = (0 == fileNamesCount);
- csGridFileXFormat* allFiles = emptyFileCollection ? NULL : new csGridFileXFormat[fileNamesCount];
+ csGeodeticXfromParmsFile_* allFiles = emptyFileCollection ? NULL : new csGeodeticXfromParmsFile_[fileNamesCount];
MG_TRY()
if (!emptyFileCollection)
- memset(allFiles, 0, fileNamesCount * sizeof(csGridFileXFormat));
+ memset(allFiles, 0, fileNamesCount * sizeof(csGeodeticXfromParmsFile_));
for(INT32 i = 0; i < fileNamesCount; i++)
{
@@ -109,10 +109,10 @@
this->gridFileParams->fileReferenceCount = fileNamesCount;
//wipe out all memory where the filenames are stored...
- memset(this->gridFileParams->fileNames, 0, csGRIDI1_FILEMAX * sizeof(csGridFileXFormat));
+ memset(this->gridFileParams->fileNames, 0, csGRIDI1_FILEMAX * sizeof(csGeodeticXfromParmsFile_));
//...and copy our values in case we've been given a non-empty list
if (!emptyFileCollection)
- memcpy(this->gridFileParams->fileNames, allFiles, fileNamesCount * sizeof(csGridFileXFormat));
+ memcpy(this->gridFileParams->fileNames, allFiles, fileNamesCount * sizeof(csGeodeticXfromParmsFile_));
MG_CATCH(L"CCoordinateSystemGeodeticInterpolationTransformDefParams.SetGridFileNames");
@@ -131,7 +131,7 @@
for(INT32 i = 0; i < fileCount && i < csGRIDI1_FILEMAX; i++)
{
- csGridFileXFormat& singleGridFile = this->gridFileParams->fileNames[i];
+ csGeodeticXfromParmsFile_& singleGridFile = this->gridFileParams->fileNames[i];
Ptr<CCoordinateSystemGeodeticTransformGridFile> gridFileSetting =
new CCoordinateSystemGeodeticTransformGridFile(&singleGridFile, this->IsProtected());
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp 2010-09-20 07:08:58 UTC (rev 5157)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformDef.cpp 2010-09-20 07:26:19 UTC (rev 5158)
@@ -142,17 +142,18 @@
//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_GFILE:
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_CNTv1:
+ case cs_DTCMTH_CNTv2:
+ case cs_DTCMTH_FRNCH:
+ case cs_DTCMTH_JAPAN:
case cs_DTCMTH_ATS77:
+ case cs_DTCMTH_OST97:
+ case cs_DTCMTH_OST02:
_ASSERT(false);
transformationType = MgCoordinateSystemGeodeticTransformDefType::Interpolation;
break;
@@ -277,7 +278,7 @@
//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;
+ paramsMethodCode = cs_DTCMTH_GFILE;
break;
case MgCoordinateSystemGeodeticTransformDefType::MultipleRegression:
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp 2010-09-20 07:08:58 UTC (rev 5157)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.cpp 2010-09-20 07:26:19 UTC (rev 5158)
@@ -32,14 +32,14 @@
using namespace CSLibrary;
-CCoordinateSystemGeodeticTransformGridFile::CCoordinateSystemGeodeticTransformGridFile(const csGridFileXFormat* const fileFormatParam, bool isProtected)
+CCoordinateSystemGeodeticTransformGridFile::CCoordinateSystemGeodeticTransformGridFile(const csGeodeticXfromParmsFile_* const fileFormatParam, bool isProtected)
: gridFileDesc(NULL), isProtected(isProtected)
{
- this->gridFileDesc = (csGridFileXFormat*)CS_malc(sizeof(csGridFileXFormat));
+ this->gridFileDesc = (csGeodeticXfromParmsFile_*)CS_malc(sizeof(csGeodeticXfromParmsFile_));
if (NULL == this->gridFileDesc)
throw new MgOutOfMemoryException(L"CCoordinateSystemGeodeticAnalyticalTransformDefParams.ctor", __LINE__, __WFILE__, NULL, L"", NULL);
- ::memset(this->gridFileDesc, 0, sizeof(csGridFileXFormat));
+ ::memset(this->gridFileDesc, 0, sizeof(csGeodeticXfromParmsFile_));
if (NULL != fileFormatParam)
*this->gridFileDesc = *fileFormatParam;
//else: keep the 0'ed memory
@@ -64,7 +64,7 @@
}
}
-void CCoordinateSystemGeodeticTransformGridFile::CopyTo(csGridFileXFormat* destGridFile) const
+void CCoordinateSystemGeodeticTransformGridFile::CopyTo(csGeodeticXfromParmsFile_* destGridFile) const
{
ENSURE_NOT_NULL(destGridFile, CCoordinateSystemGeodeticTransformGridFile::CopyTo);
*destGridFile = *this->gridFileDesc;
@@ -87,16 +87,21 @@
switch(this->gridFileDesc->fileFormat)
{
- case cs_DTCFRMTTYP_NTv1:
- case cs_DTCFRMTTYP_NTv2:
- case cs_DTCFRMTTYP_NADCON:
- case cs_DTCFRMTTYP_RGF:
- case cs_DTCFRMTTYP_PAR:
- case cs_DTCFRMTTYP_ATS77:
+ case cs_DTCFRMT_CNTv1:
+ case cs_DTCFRMT_CNTv2:
+ case cs_DTCFRMT_NADCN:
+ case cs_DTCFRMT_FRNCH:
+ case cs_DTCFRMT_JAPAN:
+ case cs_DTCFRMT_ATS77:
+ case cs_DTCFRMT_OST97:
+ case cs_DTCFRMT_OST02:
break;
+ case cs_DTCFRMT_NONE:
+ _ASSERT(false);
+ break;
+
//unsupported file formats
- case cs_DTCFRMTTYP_NONE:
default:
return false;
}
Modified: sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.h
===================================================================
--- sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.h 2010-09-20 07:08:58 UTC (rev 5157)
+++ sandbox/rfc94/Common/CoordinateSystem/CoordSysGeodeticTransformGridFile.h 2010-09-20 07:26:19 UTC (rev 5158)
@@ -20,13 +20,11 @@
namespace CSLibrary
{
- typedef cs_GeodeticTransform_::csGeodeticXformParameters::csGeodeticXformParmsGridFiles_::csGeodeticXfromParmsFile_ csGridFileXFormat;
-
class CCoordinateSystemGeodeticTransformGridFile :
public MgCoordinateSystemGeodeticTransformGridFile
{
public:
- CCoordinateSystemGeodeticTransformGridFile(const csGridFileXFormat* const fileFormatParam, bool isProtected);
+ CCoordinateSystemGeodeticTransformGridFile(const csGeodeticXfromParmsFile_* const fileFormatParam, bool isProtected);
~CCoordinateSystemGeodeticTransformGridFile();
// >>> MgCoordinateSystemGeodeticTransformGridFile
@@ -46,13 +44,13 @@
virtual void Dispose();
- virtual void CopyTo(csGridFileXFormat* destGridFile) const;
+ virtual void CopyTo(csGeodeticXfromParmsFile_* destGridFile) const;
private:
void ReleaseInstance();
private:
- csGridFileXFormat* gridFileDesc;
+ csGeodeticXfromParmsFile_* gridFileDesc;
bool isProtected;
};
}
More information about the mapguide-commits
mailing list