[mapguide-commits] r4777 - in sandbox/rfc90/MgDev/Common: CoordinateSystem Foundation Foundation/Exception Foundation/System Geometry Geometry/CoordinateSystem Geometry/Spatial MapGuideCommon MapGuideCommon/MapLayer MapGuideCommon/Resources MapGuideCommon/Services MapGuideCommon/System MdfModel MdfParser PlatformBase PlatformBase/MapLayer PlatformBase/Services Renderers Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Apr 9 23:18:47 EDT 2010


Author: uvlite
Date: 2010-04-09 23:18:47 -0400 (Fri, 09 Apr 2010)
New Revision: 4777

Removed:
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h
Modified:
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.h
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.h
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.h
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysFormatConverter.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformation.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
   sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysUtil.h
   sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.cpp
   sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.h
   sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.cpp
   sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.h
   sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.cpp
   sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.h
   sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.cpp
   sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.h
   sandbox/rfc90/MgDev/Common/Foundation/Foundation.h
   sandbox/rfc90/MgDev/Common/Foundation/Makefile.am
   sandbox/rfc90/MgDev/Common/Foundation/System/Resources.cpp
   sandbox/rfc90/MgDev/Common/Foundation/System/Resources.h
   sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystem.h
   sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h
   sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h
   sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp
   sandbox/rfc90/MgDev/Common/Geometry/Geometry.vcproj
   sandbox/rfc90/MgDev/Common/Geometry/Makefile.am
   sandbox/rfc90/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp
   sandbox/rfc90/MgDev/Common/MapGuideCommon/Makefile.am
   sandbox/rfc90/MgDev/Common/MapGuideCommon/MapLayer/Map.h
   sandbox/rfc90/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res
   sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/PackageStatusInformation.cpp
   sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
   sandbox/rfc90/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
   sandbox/rfc90/MgDev/Common/MdfModel/Makefile.am
   sandbox/rfc90/MgDev/Common/MdfParser/Makefile.am
   sandbox/rfc90/MgDev/Common/PlatformBase/Makefile.am
   sandbox/rfc90/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
   sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.cpp
   sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.h
   sandbox/rfc90/MgDev/Common/Renderers/Makefile.am
   sandbox/rfc90/MgDev/Common/Stylization/DefaultStylizer.cpp
   sandbox/rfc90/MgDev/Common/Stylization/Makefile.am
Log:
rfc90 Common dir merged with trunk 


Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -934,7 +934,7 @@
 //
 //Corresponds to cs_Csdef_::key_nm.
 //
-STRING CCoordinateSystem::GetCode()
+STRING CCoordinateSystem::GetCsCode()
 {
     STRING sName;
 
@@ -942,11 +942,11 @@
     wchar_t* pName = Convert_Ascii_To_Wide(m_csprm.csdef.key_nm);
     if (NULL == pName)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystem.GetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystem.GetCsCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     sName=pName;
     delete[] pName;
-    MG_CATCH_AND_THROW(L"MgCoordinateSystem.GetCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystem.GetCsCode")
 
     return sName;
 }
@@ -956,27 +956,27 @@
 //Throws an exception MgInvalidArgumentException if the provided string is not
 //a legal coordinate system name.
 //
-void CCoordinateSystem::SetCode(CREFSTRING sCode)
+void CCoordinateSystem::SetCsCode(CREFSTRING sCode)
 {
     MG_TRY()
 
     if (Protected())
     {
         //Can't modify a read-only object.
-        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystem.SetCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL);
+        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystem.SetCsCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemProtectedException", NULL);
     }
 
     if (sCode.empty())
     {
         //null pointer is obviously not legal...
-        throw new MgInvalidArgumentException(L"MgCoordinateSystem.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystem.SetCsCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Convert to a C++ string, for Mentor's sake
     char *pStr = Convert_Wide_To_Ascii(sCode.c_str()); //need to delete[] pStr
     if (NULL == pStr)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystem.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystem.SetCsCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Try to make a legal name.  CS_nampp() legalizes the
@@ -988,7 +988,7 @@
     {
         //illegal string
         delete [] pStr;
-        throw new MgInvalidArgumentException(L"MgCoordinateSystem.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystem.SetCsCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Copy into the definition
@@ -999,13 +999,13 @@
     delete [] pStr;
 
     //And we're done!
-    MG_CATCH_AND_THROW(L"MgCoordinateSystem.SetCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystem.SetCsCode")
 }
 
 //Checks whether the specified string is a legal
 //coordinate system key name.
 //
-bool CCoordinateSystem::IsLegalCode(CREFSTRING sCode)
+bool CCoordinateSystem::IsLegalCsCode(CREFSTRING sCode)
 {
     return IsLegalMentorName(sCode.c_str());
 }
@@ -1309,7 +1309,7 @@
         {
             Ptr<MgStringCollection> pCsNameColl=pEnumSystemsInCategory->NextName(1);
             if (1 != pCsNameColl->GetCount()) break;
-            if (GetCode()==pCsNameColl->GetItem(0))
+            if (GetCsCode()==pCsNameColl->GetItem(0))
             {
                 //we are in this category, let's get it and move on to the next category
                 pCategoryNames->Add(pCtDef->GetName());

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.h
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSys.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -63,7 +63,7 @@
     virtual double GetMinY();  /// __get
     virtual double GetMaxX();  /// __get
     virtual double GetMaxY();  /// __get
-    virtual STRING GetCode();  /// __get
+    virtual STRING GetCsCode();  /// __get
     virtual STRING GetDescription();  /// __get
     virtual STRING GetProjection();  /// __get
     virtual STRING GetProjectionDescription();  /// __get
@@ -76,8 +76,8 @@
     virtual MgStringCollection* GetCategories();
     virtual MgCoordinateSystemCatalog* GetCatalog();
     virtual void SetCatalog(MgCoordinateSystemCatalog* pCatalog);
-    virtual void SetCode(CREFSTRING sCode);
-    virtual bool IsLegalCode(CREFSTRING sCode);
+    virtual void SetCsCode(CREFSTRING sCode);
+    virtual bool IsLegalCsCode(CREFSTRING sCode);
     virtual bool IsValid();
     virtual bool IsUsable(MgCoordinateSystemCatalog *pCatalog);
     virtual bool IsSameAs(MgGuardDisposable *pDef);

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -42,22 +42,12 @@
 #include "csNameMapper.hpp"                 //for csReleaseNameMapper
 
 #ifdef _WIN32
-#ifdef UNICODE
-#define GetMessage  GetMessageW
-#else
-#define GetMessage  GetMessageA
-#endif // !UNICODE
 #include <atlbase.h>
 #include <atlconv.h>
 #include <tchar.h>                          //for _tsplitpath
 #include <shlobj.h>                         //for SHGetFolderPath
-#undef GetMessage
 #endif
 
-#ifndef _WIN32
-#include "CoordSysEnvVariable.h"
-#endif
-
 //Global variables needed from Mentor
 extern "C"
 {
@@ -198,7 +188,10 @@
     //if not set then try the default location
     if(!szPathVar)
     {
+        #ifdef _DEBUG
+        // This debug statement appears in the Apache log even under release builds. Wrapping this in an #ifdef will ensure it doesn't appear in RELEASE builds
         ACE_DEBUG((LM_DEBUG, ACE_TEXT("\n(%t) CCoordinateSystemCatalog::GetDefaultDictionaryDir() - environment variable MENTOR_DICTIONARY_PATH not set.\n")));
+        #endif
 
         TCHAR szPath[MAX_PATH];
         if(SHGetSpecialFolderPath(NULL, szPath, CSIDL_COMMON_APPDATA, FALSE))
@@ -225,12 +218,6 @@
         MgUtil::MultiByteToWideChar(string(szPath), sDir);
     }
 
-    if (sDir.empty())
-    {
-        bResult = true;
-        sDir = LINUX_COORD_PATH;
-    }
-
 #endif
     if (sDir.empty())
     {

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -187,7 +187,7 @@
 //
 //Corresponds to cs_Dtdef_::key_nm.
 //
-STRING CCoordinateSystemDatum::GetCode()
+STRING CCoordinateSystemDatum::GetDtCode()
 {
     STRING sCode;
 
@@ -195,11 +195,11 @@
     wchar_t* pName = Convert_Ascii_To_Wide(m_DtDef.key_nm);
     if (NULL == pName)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemDatum.GetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystemDatum.GetDtCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     sCode=pName;
     delete[] pName;
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemDatum.GetCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemDatum.GetDtCode")
 
     return sCode;
 }
@@ -209,27 +209,27 @@
 //if the provided string is not
 //a legal datum name.
 //
-void CCoordinateSystemDatum::SetCode(CREFSTRING sCode)
+void CCoordinateSystemDatum::SetDtCode(CREFSTRING sCode)
 {
     MG_TRY()
 
     if (Protected())
     {
         //Can't modify a read-only object.
-        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemDatum.SetCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemDatumProtectedException", NULL);
+        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemDatum.SetDtCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemDatumProtectedException", NULL);
     }
 
     if (sCode.empty())
     {
         //null pointer is obviously not legal...
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemDatum.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemDatum.SetDtCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Convert to a C++ string, for Mentor's sake
     char *pStr = Convert_Wide_To_Ascii(sCode.c_str()); //need to delete[] pStr
     if (NULL == pStr)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemDatum.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystemDatum.SetDtCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Try to make a legal name.  CS_nampp() legalizes the
@@ -241,7 +241,7 @@
     {
         //illegal string
         delete [] pStr;
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemDatum.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemDatum.SetDtCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Copy into the definitions, dtdef and cs_datum_ must be in synch
@@ -255,12 +255,12 @@
     delete [] pStr;
 
     //And we're done!
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemDatum.SetCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemDatum.SetDtCode")
 }
 
 //Checks whether the specified string is a legal datum key name.
 //
-bool CCoordinateSystemDatum::IsLegalCode(CREFSTRING sCode)
+bool CCoordinateSystemDatum::IsLegalDtCode(CREFSTRING sCode)
 {
     return IsLegalMentorName(sCode.c_str());
 }
@@ -808,7 +808,7 @@
         throw new MgNullArgumentException(L"MgCoordinateSystemDatum.SetEllipsoidDefinition", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    STRING sEllipsoid=pEllipsoidDef->GetCode();
+    STRING sEllipsoid=pEllipsoidDef->GetElCode();
 
     //Make sure it's a legal datum name
     if (!IsLegalMentorName(sEllipsoid.c_str()))

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.h
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysDatum.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -30,9 +30,9 @@
     void InitFromCatalog(const cs_Dtdef_& def);
     void GetMentorDef(cs_Dtdef_& def){def=m_DtDef;};
 
-    virtual STRING GetCode();
-    virtual void SetCode(CREFSTRING sCode);
-    virtual bool IsLegalCode(CREFSTRING sCode);
+    virtual STRING GetDtCode();
+    virtual void SetDtCode(CREFSTRING sCode);
+    virtual bool IsLegalDtCode(CREFSTRING sCode);
     virtual bool IsValid();
     virtual bool IsUsable(MgCoordinateSystemCatalog *pCatalog);
     virtual bool IsSameAs(MgGuardDisposable *pDef);

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -59,26 +59,26 @@
 
     if (NULL==pDest)
     {
-        throw new MgNullArgumentException(L"MgCoordinateSystemEllipsoidEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgNullArgumentException(L"MgCoordinateSystemEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     if (Protected())
     {
         //Can't modify a read-only object.
-        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemEllipsoidEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemEllipsoidProtectedException", NULL);
+        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemEllipsoidProtectedException", NULL);
     }
 
     if (!IsLegalString(sSrc.c_str(), nMaxSize))
     {
         //Can't set string, caller gave us an illegal value
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoidEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Convert to a C++ string, for Mentor's sake
     char *pStr = Convert_Wide_To_Ascii(sSrc.c_str()); //need to delete[] pStr
     if (NULL == pStr)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoidEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoid.SetString", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Copy it in
@@ -87,7 +87,7 @@
 
     //Clean up and return success.
     delete [] pStr;
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoidEllipsoid.SetString")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.SetString")
 }
 
 //Private function that evaluates the protect data member of m_def
@@ -111,7 +111,7 @@
 //
 //Corresponds to cs_Eldef_::key_nm.
 //
-STRING CCoordinateSystemEllipsoid::GetCode()
+STRING CCoordinateSystemEllipsoid::GetElCode()
 {
     STRING sName;
 
@@ -120,11 +120,11 @@
     wchar_t *pName = Convert_Ascii_To_Wide(m_def.key_nm);
     if (NULL == pName)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoidEllipsoid.GetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoid.GetElCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     sName=pName;
     delete[] pName;
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoidEllipsoid.SetProjectionCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.GetElCode")
 
     return sName;
 }
@@ -132,26 +132,26 @@
 //Sets the key name of the ellipsoid.
 //Throws an exception if the provided string is not
 //a legal ellipsoid name.
-void CCoordinateSystemEllipsoid::SetCode(CREFSTRING sCode)
+void CCoordinateSystemEllipsoid::SetElCode(CREFSTRING sCode)
 {
     MG_TRY()
 
     if (Protected())
     {
         //Can't modify a read-only object.
-        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemEllipsoid.SetCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemEllipsoidProtectedException", NULL);
+        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemEllipsoid.SetElCode", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemEllipsoidProtectedException", NULL);
     }
 
     if (sCode.empty())
     {
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.SetElCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Convert to a C++ string, for Mentor's sake
     char *pStr = Convert_Wide_To_Ascii(sCode.c_str()); //need to delete[] pStr
     if (NULL == pStr)
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoid.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgOutOfMemoryException(L"MgCoordinateSystemEllipsoid.SetElCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Try to make a legal name.  CS_nampp() legalizes the
@@ -163,7 +163,7 @@
     {
         //illegal string
         delete [] pStr;
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.SetCode", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.SetElCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     //Copy into the definition
@@ -174,11 +174,11 @@
     delete [] pStr;
 
     //And we're done!
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.SetCode")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.SetElCode")
 }
 
 //Checks whether the specified string is a legal ellipsoid key name.
-bool CCoordinateSystemEllipsoid::IsLegalCode(CREFSTRING sCode)
+bool CCoordinateSystemEllipsoid::IsLegalElCode(CREFSTRING sCode)
 {
     return IsLegalMentorName(sCode.c_str());
 }
@@ -599,13 +599,13 @@
     assert(dFlatteningRatio < 1.0);
     if ((dFlatteningRatio < 0.0) || (dFlatteningRatio >= 1.0))
     {
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.EquatorialFromPolarFlat", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.EquatorialRadiusFromPolarRadiusFlatteningRatio", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     dEquatorialRadius = dPolarRadius / (1.0 - dFlatteningRatio);
     assert(FloatEqual(dFlatteningRatio, FlatteningRatio(dEquatorialRadius, dPolarRadius)));
 
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.EquatorialFromPolarFlat")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.EquatorialRadiusFromPolarRadiusFlatteningRatio")
 
     return dEquatorialRadius;
 }
@@ -624,13 +624,13 @@
     assert(dFlatteningRatio < 1.0);
     if ((dFlatteningRatio < 0.0) || (dFlatteningRatio >= 1.0))
     {
-        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.PolarFromEquatorialFlat", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgInvalidArgumentException(L"MgCoordinateSystemEllipsoid.PolarRadiusFromEquatorialRadiusFlatteningRatio", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     dPolarRadius = dEquatorialRadius * (1.0 - dFlatteningRatio);
     assert(FloatEqual(dFlatteningRatio, FlatteningRatio(dEquatorialRadius, dPolarRadius)));
 
-    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.PolarFromEquatorialFlat")
+    MG_CATCH_AND_THROW(L"MgCoordinateSystemEllipsoid.PolarRadiusFromEquatorialRadiusFlatteningRatio")
 
     return dPolarRadius;
 }

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.h
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEllipsoid.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -30,9 +30,9 @@
     void GetMentorDef(cs_Eldef_& def){def=m_def;};
 
     //MgCoordinateSystemEllipsoid
-    virtual STRING GetCode();  /// __get
-    virtual void SetCode(CREFSTRING sCode);
-    virtual bool IsLegalCode(CREFSTRING sCode);
+    virtual STRING GetElCode();  /// __get
+    virtual void SetElCode(CREFSTRING sCode);
+    virtual bool IsLegalElCode(CREFSTRING sCode);
     virtual bool IsValid();
     virtual bool IsUsable();
     virtual bool IsSameAs(MgGuardDisposable *pDef);

Deleted: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysEnvVariable.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -1,11 +0,0 @@
-//
-//  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
-//
-#define LINUX_COORD_PATH    L"/usr/local/mapguideopensource/share/gis/coordsys";  // NOXLATE

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysFormatConverter.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysFormatConverter.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysFormatConverter.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -300,7 +300,7 @@
 
             if (NULL != pCsFromDict.p)
             {
-                sCsNameFromDict=pCsFromDict->GetCode();
+                sCsNameFromDict=pCsFromDict->GetCsCode();
                 sDtNameFromDict=pCsFromDict->GetDatum();
                 sElNameFromDict=pCsFromDict->GetEllipsoid();
 
@@ -744,7 +744,7 @@
     }
 
     //get the name of the source system
-    STRING sCsSource=pSource->GetCode();
+    STRING sCsSource=pSource->GetCsCode();
     if (sCsSource.empty())
     {
         throw new MgInvalidArgumentException(L"MgCoordinateSystemFormatConverter.DefinitionToCode", __LINE__, __WFILE__, NULL, L"", NULL);

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformation.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformation.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysGeodeticTransformation.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -402,7 +402,7 @@
         return false;
     }
     //if not WGS84 for the target system, bye bye!
-    if (m_pDtTarget->GetCode()!=kpWGS84Datum)
+    if (m_pDtTarget->GetDtCode()!=kpWGS84Datum)
     {
         return false;
     }
@@ -491,7 +491,7 @@
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetOffset", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     //if not WGS84 for the target system, bye bye!
-    if (m_pDtTarget->GetCode()!=kpWGS84Datum)
+    if (m_pDtTarget->GetDtCode()!=kpWGS84Datum)
     {
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetOffset", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemMismatchException", NULL);
     }
@@ -630,7 +630,7 @@
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetBursaWolfeTransform", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     //if not WGS84 for the target system, bye bye!
-    if (m_pDtTarget->GetCode()!=kpWGS84Datum)
+    if (m_pDtTarget->GetDtCode()!=kpWGS84Datum)
     {
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetBursaWolfeTransform", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemMismatchException", NULL);
     }
@@ -712,7 +712,7 @@
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetGeodeticTransformationMethod", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     //if not WGS84 for the target system, bye bye!
-    if (m_pDtTarget->GetCode()!=kpWGS84Datum)
+    if (m_pDtTarget->GetDtCode()!=kpWGS84Datum)
     {
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemGeodeticTransformation.SetGeodeticTransformationMethod", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemMismatchException", NULL);
     }

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -408,297 +408,168 @@
 
 ///////////////////////////////////////////////////////////////////////////
 ///<summary>
-/// Transforms the specified source envelope and returns a new envelope
-/// if the target envelope is NULL, otherwise updates and returns the
-/// target envelope with the values of the transformed source envelope.
+/// Transforms the specified source envelope and returns a new envelope.
 ///</summary>
 ///<param name="envelope">
-/// The input MgEnvelope to transform.
+/// The MgEnvelope to be transformed.
 ///</param>
 ///<returns>
 /// A new MgEnvelope transformed from the specified envelope.
 ///</returns>
+///<remarks>
+///By its definition, an envelope is a rectangle whose sides are parallel
+///to the X and Y axes of the coordinate system to which the coordinate
+///values are reference the extents of which define the extents of the
+///collection of geometries associated with the envelope.  The transformed
+///geometry is an approximation (a very good one we hope) of an envelope
+///in a new and different coordinate system.  Since a transformation may
+///include some rotation (among other transofrmation affects), the resulting
+///envelop is often enlarged to meet the above described requirements.
+///</remarks>
 MgEnvelope* CCoordinateSystemTransform::Transform(MgEnvelope* envelope)
 {
-    MgEnvelope* pEnvelope = NULL;
-    MG_TRY()
+    // The following value puts limit on the number of points generated
+    // by the GridLine function which is used below.  The value is not an
+    // actual limit, but more a threshold which when exceeded the algorithm
+    // start a clean shut down.  Thus, there may be as many as twice this
+    // number of points in a line returned by GridLine.  To increase the
+    // accuracy of this function, increase the value of this constant.  Of
+    // course, you'll pay a penalty in performance and memory usage.
+    static const INT32 maxPoints = 127;
 
-    if(NULL == envelope)
-    {
-        throw new MgNullArgumentException(L"MgCoordinateSystemTransform.Transform", __LINE__, __WFILE__, NULL, L"", NULL);
-    }
+    INT32 dimension;
 
-    Ptr<MgCoordinate> lowerLeft = envelope->GetLowerLeftCoordinate();
-    Ptr<MgCoordinate> upperRight = envelope->GetUpperRightCoordinate();
-
-    Ptr<MgCoordinate> lowerLeftTarget;
-    Ptr<MgCoordinate> upperRightTarget;
-
-    // Leave commented except for temporary debugging.  The printf output gets
-    // sent to stdout and ends up being included in the web-tier HTTP response.
-//  printf("\nTransform(envelope) -- Source: %S  Dest: %S\n", m_pCsSource->GetCode().c_str(), m_pCsTarget->GetCode().c_str());
-
-    if((m_pCsSource->GetType() == MgCoordinateSystemType::Projected) && (m_pCsTarget->GetType() == MgCoordinateSystemType::Geographic))
-    {
-        // This is a projected to geographic transform.
-        double ptUpperRightX = upperRight->GetX();
-        double ptUpperRightY = upperRight->GetY();
-        double ptUpperRightZ = upperRight->GetZ();
-        double ptLowerLeftX = lowerLeft->GetX();
-        double ptLowerLeftY = lowerLeft->GetY();
-        double ptLowerLeftZ = lowerLeft->GetZ();
-
-        int dimension = upperRight->GetDimension();
-
-        double ptNWX = ptLowerLeftX;
-        double ptNWY = ptUpperRightY;
-        double ptSEX = ptUpperRightX;
-        double ptSEY = ptLowerLeftY;
-
+    double tmpDbl;
+    double magnitude;
         double xMax = -HUGE_VAL;
         double yMax = -HUGE_VAL;
+    double zMax = -HUGE_VAL;
         double xMin = HUGE_VAL;
         double yMin = HUGE_VAL;
+    double zMin = HUGE_VAL;
 
-        int i;
+    Ptr<MgEnvelope> pEnvelope;
+    Ptr<MgCoordinate> xyPoint;
+    Ptr<MgLineString> lineString;
+    Ptr<MgCoordinateIterator> stringItr;
 
-        // compute the max and min longitude along the top and bottom borders
+    // Leave commented except for temporary debugging.  The printf output gets
+    // sent to stdout and ends up being included in the web-tier HTTP response.
+    // printf("\nTransform(envelope) -- Source: %S  Dest: %S\n", m_pCsSource->GetCsCode().c_str(), m_pCsTarget->GetCsCode().c_str());
 
-        double xInc = (ptNWX - ptSEX) / 100.0;
-        double tempX;
-        double tempY;
+    MG_TRY()
 
-        for (i = 0; i <= 100; i++)
+    if(NULL == envelope)
         {
-            tempX = ptSEX + i * xInc;
-            tempY = ptNWY;
-
-            Transform(&tempX, &tempY);
-
-            xMax = max(tempX, xMax);
-            xMin = min(tempX, xMin);
-            yMax = max(tempY, yMax);
-            yMin = min(tempY, yMin);
+        throw new MgNullArgumentException(L"MgCoordinateSystemTransform.Transform", __LINE__, __WFILE__, NULL, L"", NULL);
         }
 
-        xInc = (ptNWX - ptSEX) / 100.0;
-
-        for (i = 0; i <= 100; i++)
+    // Extract the two defining corners of this envelope.
+    Ptr<MgCoordinate> lowerLeft  = envelope->GetLowerLeftCoordinate();
+    Ptr<MgCoordinate> upperRight = envelope->GetUpperRightCoordinate();
+    
+    // Determine if this is a 3D envelope.  Don't know that this is possible,
+    // but the code I modified handles 3D envelopes, so I will too.
+    dimension = upperRight->GetDimension();
+    if (dimension == MgCoordinateDimension::XYZ)
         {
-            tempX = ptSEX + i * xInc;
-            tempY = ptSEY;
+        // Extract the Z minimum and maximum.
+        tmpDbl = lowerLeft->GetZ ();
+        if (tmpDbl < zMin) zMin = tmpDbl;
+        if (tmpDbl > zMax) zMax = tmpDbl;
 
-            Transform(&tempX, &tempY);
-
-            xMax = max(tempX, xMax);
-            xMin = min(tempX, xMin);
-            yMax = max(tempY, yMax);
-            yMin = min(tempY, yMin);
+        tmpDbl = upperRight->GetZ ();
+        if (tmpDbl < zMin) zMin = tmpDbl;
+        if (tmpDbl > zMax) zMax = tmpDbl;
         }
 
-        // compute the max and min longitude along the left and right borders
+    // Determine a value which represents a good tolerance value for the
+    // GridLine function.  A smaller value will provide greater accuracy
+    // at the expense of performance.
+    xyPoint = Transform (lowerLeft);
+    magnitude = fabs (xyPoint->GetX ());
+    tmpDbl = fabs (xyPoint->GetY ());
+    if (tmpDbl > magnitude) magnitude = tmpDbl;
+    xyPoint = Transform (upperRight);
+    tmpDbl = fabs (xyPoint->GetX ());
+    if (tmpDbl > magnitude) magnitude = tmpDbl;
+    tmpDbl = fabs (xyPoint->GetY ());
+    if (tmpDbl > magnitude) magnitude = tmpDbl;
+    magnitude *= 1.0E-07;               // Make this constant even smaller if more accuracy is required.
 
-        double yInc = (ptNWY - ptSEY) / 100.0;
+    // Extract the other two corners of the envelope.
+    Ptr<MgCoordinate> upperLeft  = new MgCoordinateXY (lowerLeft->GetX (),upperRight->GetY ());
+    Ptr<MgCoordinate> lowerRight = new MgCoordinateXY (upperRight->GetX (),lowerLeft->GetY ());
 
-        for (i = 0; i <= 100; i++)
+    // Generate line strings from one corner to the next.  Magnitude is the
+    // maximum distance between the real line and the multi-segment
+    // approximation returned by GridLine.  Thus, this is a measure of the
+    // accuracy.  To prevent a serious looping problem, the maxPoints
+    // argument sets an upper limit on the number of points generated in the
+    // the returned line string.
+    lineString = GridLine (lowerLeft,lowerRight,magnitude,maxPoints);
+    stringItr = lineString->GetCoordinates ();
+    while (stringItr->MoveNext ())
         {
-            tempX = ptNWX;
-            tempY = ptSEY + i * yInc;
-
-            Transform(&tempX, &tempY);
-
-            xMax = max(tempX, xMax);
-            xMin = min(tempX, xMin);
-            yMax = max(tempY, yMax);
-            yMin = min(tempY, yMin);
+        xyPoint = stringItr->GetCurrent ();
+        if (xyPoint->GetX () < xMin) xMin = xyPoint->GetX ();
+        if (xyPoint->GetX () > xMax) xMax = xyPoint->GetX ();
+        if (xyPoint->GetY () < yMin) yMin = xyPoint->GetY ();
+        if (xyPoint->GetY () > yMax) yMax = xyPoint->GetY ();
         }
 
-        yInc = (ptNWY - ptSEY) / 100.0;
-
-        for (i = 0; i <= 100; i++)
+    lineString = GridLine (lowerRight,upperRight,magnitude,maxPoints);
+    stringItr = lineString->GetCoordinates ();
+    while (stringItr->MoveNext ())
         {
-            tempX = ptSEX;
-            tempY = ptSEY + i * yInc;
-
-            Transform(&tempX, &tempY);
-
-            xMax = max(tempX, xMax);
-            xMin = min(tempX, xMin);
-            yMax = max(tempY, yMax);
-            yMin = min(tempY, yMin);
+        xyPoint = stringItr->GetCurrent ();
+        if (xyPoint->GetX () < xMin) xMin = xyPoint->GetX ();
+        if (xyPoint->GetX () > xMax) xMax = xyPoint->GetX ();
+        if (xyPoint->GetY () < yMin) yMin = xyPoint->GetY ();
+        if (xyPoint->GetY () > yMax) yMax = xyPoint->GetY ();
         }
 
-        if(dimension == MgCoordinateDimension::XYZ)
+    lineString = GridLine (upperRight,upperLeft,magnitude,maxPoints);
+    stringItr = lineString->GetCoordinates ();
+    while (stringItr->MoveNext ())
         {
-            double zMax = 0.0;
-            double zMin = 0.0;
-
-            zMax = max(ptUpperRightZ, ptLowerLeftZ);
-            zMin = min(ptUpperRightZ, ptLowerLeftZ);
-
-            lowerLeftTarget = new MgCoordinateXYZ(xMin, yMin, zMin);
-            upperRightTarget = new MgCoordinateXYZ(xMax, yMax, zMax);
+        xyPoint = stringItr->GetCurrent ();
+        if (xyPoint->GetX () < xMin) xMin = xyPoint->GetX ();
+        if (xyPoint->GetX () > xMax) xMax = xyPoint->GetX ();
+        if (xyPoint->GetY () < yMin) yMin = xyPoint->GetY ();
+        if (xyPoint->GetY () > yMax) yMax = xyPoint->GetY ();
         }
-        else
-        {
-            lowerLeftTarget = new MgCoordinateXY(xMin, yMin);
-            upperRightTarget = new MgCoordinateXY(xMax, yMax);
-        }
 
-        pEnvelope = new MgEnvelope(lowerLeftTarget, upperRightTarget);
-    }
-    else if((m_pCsSource->GetType() == MgCoordinateSystemType::Geographic) && (m_pCsTarget->GetType() == MgCoordinateSystemType::Projected))
+    lineString = GridLine (upperLeft,lowerLeft,magnitude,maxPoints);
+    stringItr = lineString->GetCoordinates ();
+    while (stringItr->MoveNext ())
     {
-        // This is a geographic to projected transform.
-        double ptUpperRightX = upperRight->GetX();
-        double ptUpperRightY = upperRight->GetY();
-        double ptUpperRightZ = upperRight->GetZ();
-        double ptLowerLeftX = lowerLeft->GetX();
-        double ptLowerLeftY = lowerLeft->GetY();
-        double ptLowerLeftZ = lowerLeft->GetZ();
-
-        int dimension = upperRight->GetDimension();
-
-        double ptNWX = ptLowerLeftX;
-        double ptNWY = ptUpperRightY;
-        double ptSEX = ptUpperRightX;
-        double ptSEY = ptLowerLeftY;
-
-        double lon = (ptSEX + ptNWX) / 2.0;
-        double lat = (ptSEY + ptNWY) / 2.0;
-        double xDist = ::fabs(ptSEX - ptNWX);
-
-        double tempX = 0.0;
-        double tempY = 0.0;
-
-        // Bottom center
-        tempX = lon;
-        tempY = ptSEY;
-        Transform(&tempX, &tempY);
-
-        double xMax = tempX;
-        double xMin = tempX;
-        double yMax = tempY;
-        double yMin = tempY;
-
-        // Bottom right
-        tempX = (lon + xDist / 2);
-        tempY = ptSEY;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Bottom left
-        tempX = (lon - xDist / 2);
-        tempY = ptSEY;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Top center
-        tempX = lon;
-        tempY = ptNWY;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Top right
-        tempX = (lon + xDist / 2);
-        tempY = ptNWY;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Top left
-        tempX = (lon - xDist / 2);
-        tempY = ptNWY;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Middle center
-        tempX = lon;
-        tempY = lat;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Middle right
-        tempX = (lon + xDist / 2);
-        tempY = lat;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        // Middle left
-        tempX = (lon - xDist / 2);
-        tempY = lat;
-        Transform(&tempX, &tempY);
-
-        xMax = max(tempX, xMax);
-        xMin = min(tempX, xMin);
-        yMax = max(tempY, yMax);
-        yMin = min(tempY, yMin);
-
-        if(dimension == MgCoordinateDimension::XYZ)
-        {
-            double zMax = 0.0;
-            double zMin = 0.0;
-
-            zMax = max(ptUpperRightZ, ptLowerLeftZ);
-            zMin = min(ptUpperRightZ, ptLowerLeftZ);
-
-            lowerLeftTarget = new MgCoordinateXYZ(xMin, yMin, zMin);
-            upperRightTarget = new MgCoordinateXYZ(xMax, yMax, zMax);
+        xyPoint = stringItr->GetCurrent ();
+        if (xyPoint->GetX () < xMin) xMin = xyPoint->GetX ();
+        if (xyPoint->GetX () > xMax) xMax = xyPoint->GetX ();
+        if (xyPoint->GetY () < yMin) yMin = xyPoint->GetY ();
+        if (xyPoint->GetY () > yMax) yMax = xyPoint->GetY ();
         }
-        else
-        {
-            lowerLeftTarget = new MgCoordinateXY(xMin, yMin);
-            upperRightTarget = new MgCoordinateXY(xMax, yMax);
-        }
 
-        pEnvelope = new MgEnvelope(lowerLeftTarget, upperRightTarget);
-
-    }
-    else
+    // Construct an evelope of the appropriate dimensions.
+    if (dimension != MgCoordinateDimension::XYZ)    // 2D
     {
-        lowerLeftTarget = Transform(lowerLeft);
-        upperRightTarget = Transform(upperRight);
-
-        pEnvelope = new MgEnvelope(lowerLeftTarget, upperRightTarget);
+        Ptr<MgCoordinate> xyLowerLeft = new MgCoordinateXY (xMin,yMin);
+        Ptr<MgCoordinate> xyUpperRight = new MgCoordinateXY (xMax,yMax);
+        pEnvelope = new MgEnvelope (xyLowerLeft,xyUpperRight);
     }
-
-    if (!pEnvelope)
+    else                                            // 3D
     {
-        throw new MgOutOfMemoryException(L"MgCoordinateSystemTransform.Transform", __LINE__, __WFILE__, NULL, L"", NULL);
+        Ptr<MgCoordinate> xyzLowerLeft = new MgCoordinateXYZ (xMin,yMin,zMin);
+        Ptr<MgCoordinate> xyzUpperRight = new MgCoordinateXYZ (xMax,yMax,zMax);
+        pEnvelope = new MgEnvelope (xyzLowerLeft,xyzUpperRight);
     }
 
     MG_CATCH_AND_THROW(L"MgCoordinateSystemTransform.Transform")
 
     // Leave commented except for temporary debugging.  The printf output gets
     // sent to stdout and ends up being included in the web-tier HTTP response.
-/*
+    /*
     Ptr<MgCoordinate> ll = envelope->GetLowerLeftCoordinate();
     Ptr<MgCoordinate> ur = envelope->GetUpperRightCoordinate();
     printf("Transform(envelope) -- Source: %f,%f to %f,%f\n", ll->GetX(), ll->GetY(), ur->GetX(), ur->GetY());
@@ -706,9 +577,10 @@
     ll = pEnvelope->GetLowerLeftCoordinate();
     ur = pEnvelope->GetUpperRightCoordinate();
     printf("Transform(envelope) -- Dest  : %f,%f to %f,%f\n", ll->GetX(), ll->GetY(), ur->GetX(), ur->GetY());
-*/
+    */
 
-    return pEnvelope;
+    // Return the computed envelope.
+    return pEnvelope.Detach ();
 }
 
 //MgDisposable

Modified: sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysUtil.h
===================================================================
--- sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysUtil.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/CoordinateSystem/CoordSysUtil.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -30,8 +30,6 @@
 
 #ifdef _WIN32
 #include "windows.h"
-// To undefine GetMessage macro defined in windows
-#undef GetMessage
 #endif
 
 // Mentor specific information

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -43,7 +43,7 @@
 /// \brief
 /// Retrieve the formatted exception message for the specified locale.
 ///
-STRING MgConfigurationLoadFailedException::GetMessage(CREFSTRING locale) throw()
+STRING MgConfigurationLoadFailedException::GetExceptionMessage(CREFSTRING locale) throw()
 {
-    return MgException::GetMessage(locale, MgResources::FailedToLoadConfigurationFile);
+    return MgException::GetExceptionMessage(locale, MgResources::FailedToLoadConfigurationFile);
 }

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/ConfigurationLoadFailedException.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -68,7 +68,7 @@
     /// \return
     /// Formatted exception message
     ///
-    virtual STRING GetMessage(CREFSTRING locale) throw();
+    virtual STRING GetExceptionMessage(CREFSTRING locale) throw();
 
 INTERNAL_API:
 

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -17,10 +17,6 @@
 
 #include "Foundation.h"
 
-// To undefine GetMessage macro defined in windows
-#ifdef _WIN32
-    #undef GetMessage
-#endif
 
 IMPLEMENT_EXCEPTION_ABSTRACT(MgException)
 
@@ -437,7 +433,7 @@
 /// This method should be called for critical errors when the configuration
 /// or resource file has not been loaded.
 ///
-STRING MgException::GetMessage(CREFSTRING locale, CREFSTRING resourceStr) throw()
+STRING MgException::GetExceptionMessage(CREFSTRING locale, CREFSTRING resourceStr) throw()
 {
     //
     // Format:
@@ -475,7 +471,7 @@
 /// \brief
 /// Retrieve the formatted exception message for the specified locale.
 ///
-STRING MgException::GetMessage(CREFSTRING locale) throw()
+STRING MgException::GetExceptionMessage(CREFSTRING locale) throw()
 {
     //
     // Format:
@@ -535,7 +531,7 @@
 
     if (m_details.empty())
     {
-        m_details = GetMessage(locale);
+        m_details = GetExceptionMessage(locale);
         m_details += L"\n";
         m_details += FormatDetails(locale);
     }
@@ -579,9 +575,9 @@
 /// \brief
 /// Retrieve the formatted exception message for the specified locale.
 ///
-STRING MgException::GetMessage() throw()
+STRING MgException::GetExceptionMessage() throw()
 {
-    return GetMessage(GetLocale());
+    return GetExceptionMessage(GetLocale());
 }
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/Exception.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -20,11 +20,6 @@
 
 /// \ingroup Exceptions_Module
 
-// To undefine GetMessage macro defined in windows
-#ifdef _WIN32
-    #undef GetMessage
-#endif
-
 class MgByteReader;
 class MgStringCollection;
 
@@ -45,20 +40,20 @@
     ///
     /// <!-- Syntax in .Net, Java, and PHP -->
     /// \htmlinclude DotNetSyntaxTop.html
-    /// string GetMessage() throw();
+    /// string GetExceptionMessage() throw();
     /// \htmlinclude SyntaxBottom.html
     /// \htmlinclude JavaSyntaxTop.html
-    /// String GetMessage() throw();
+    /// String GetExceptionMessage() throw();
     /// \htmlinclude SyntaxBottom.html
     /// \htmlinclude PHPSyntaxTop.html
-    /// string GetMessage() throw();
+    /// string GetExceptionMessage() throw();
     /// \htmlinclude SyntaxBottom.html
     ///
     /// \return
     /// Localized exception message.  See MgSiteConnection for information on specifying
     /// the locale.
     ///
-    STRING GetMessage() throw();
+    STRING GetExceptionMessage() throw();
 
     ///////////////////////////////////////////////////////////////////////////
     /// \brief
@@ -120,7 +115,7 @@
     /// \return
     /// Formatted exception message
     ///
-    virtual STRING GetMessage(CREFSTRING locale) throw();
+    virtual STRING GetExceptionMessage(CREFSTRING locale) throw();
 
     ///////////////////////////////////////////////////////////////////////////
     /// \brief
@@ -274,7 +269,7 @@
     /// This method should be called for critical errors when the configuration
     /// or resource file has not been loaded.
     ///
-    STRING GetMessage(CREFSTRING locale, CREFSTRING resourceStr) throw();
+    STRING GetExceptionMessage(CREFSTRING locale, CREFSTRING resourceStr) throw();
 
 private:
 

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -45,7 +45,7 @@
 /// <param name="nLocale">The locale identifier to format the message text.</param>
 ///
 ///
-STRING MgInvalidArgumentException::GetMessage(CREFSTRING locale) throw()
+STRING MgInvalidArgumentException::GetExceptionMessage(CREFSTRING locale) throw()
 {
     //
     // Format:

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/InvalidArgumentException.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -73,7 +73,7 @@
     /// \return
     /// Formatted exception message
     ///
-    virtual STRING GetMessage(CREFSTRING locale) throw();
+    virtual STRING GetExceptionMessage(CREFSTRING locale) throw();
 
 CLASS_ID:
 

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -43,7 +43,7 @@
 /// \brief
 /// Retrieve the formatted exception message for the specified locale.
 ///
-STRING MgResourcesLoadFailedException::GetMessage(CREFSTRING locale) throw()
+STRING MgResourcesLoadFailedException::GetExceptionMessage(CREFSTRING locale) throw()
 {
-    return MgException::GetMessage(locale, MgResources::FailedToLoadResourcesFile);
+    return MgException::GetExceptionMessage(locale, MgResources::FailedToLoadResourcesFile);
 }

Modified: sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Exception/ResourcesLoadFailedException.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -76,7 +76,7 @@
     /// \return
     /// Formatted exception message
     ///
-    virtual STRING GetMessage(CREFSTRING locale) throw();
+    virtual STRING GetExceptionMessage(CREFSTRING locale) throw();
 
 CLASS_ID:
 

Modified: sandbox/rfc90/MgDev/Common/Foundation/Foundation.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Foundation.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Foundation.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -68,7 +68,6 @@
 #include "ace/Process_Manager.h"
 #include "ace/Date_Time.h"
 
-#undef GetMessage
 #undef GetObject
 #include "FoundationDefs.h"
 #include "System/FoundationClassId.h"

Modified: sandbox/rfc90/MgDev/Common/Foundation/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -239,7 +239,7 @@
   -lMgMdfModel \
   -lxerces-c
 
-libMgFoundation_la_LDFLAGS = -version-info 7:0:0 \
+libMgFoundation_la_LDFLAGS = -release $(PACKAGE_VERSION) \
   -L../../Oem/ACE/ACE_wrappers/ace \
   -L../../Oem/dbxml-2.3.10/install/lib \
   -L../MdfParser \

Modified: sandbox/rfc90/MgDev/Common/Foundation/System/Resources.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/System/Resources.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/System/Resources.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -592,7 +592,7 @@
 /// \return
 /// The formatted message string.
 ///
-STRING MgResources::GetMessage(CREFSTRING section, CREFSTRING resourceId,
+STRING MgResources::GetResourceMessage(CREFSTRING section, CREFSTRING resourceId,
     MgStringCollection* arguments)
 {
     STRING message;
@@ -616,7 +616,7 @@
 
     message = FormatMessage(resourceStr, arguments);
 
-    MG_RESOURCES_CATCH_AND_THROW(L"MgResources.GetMessage")
+    MG_RESOURCES_CATCH_AND_THROW(L"MgResources.GetResourceMessage")
 
     return message;
 }

Modified: sandbox/rfc90/MgDev/Common/Foundation/System/Resources.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Foundation/System/Resources.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Foundation/System/Resources.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -161,7 +161,7 @@
     /// \return
     /// The formatted message string.
     ///
-    STRING GetMessage(CREFSTRING section, CREFSTRING resourceId,
+    STRING GetResourceMessage(CREFSTRING section, CREFSTRING resourceId,
         MgStringCollection* arguments);
 
     /// Resource Components

Modified: sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystem.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystem.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystem.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -49,7 +49,7 @@
     virtual double GetMinY()=0;  /// __get
     virtual double GetMaxX()=0;  /// __get
     virtual double GetMaxY()=0;  /// __get
-    virtual STRING GetCode()=0;  /// __get
+    virtual STRING GetCsCode()=0;  /// __get
     virtual STRING GetDescription()=0;  /// __get
     virtual STRING GetProjection()=0;  /// __get
     virtual STRING GetProjectionDescription()=0;  /// __get
@@ -61,8 +61,8 @@
     virtual MgCoordinateSystemMeasure* GetMeasure()=0;
     virtual MgStringCollection* GetCategories()=0;
     virtual MgCoordinateSystemCatalog* GetCatalog()=0;
-    virtual void SetCode(CREFSTRING sCode)=0;
-    virtual bool IsLegalCode(CREFSTRING sCode)=0;
+    virtual void SetCsCode(CREFSTRING sCode)=0;
+    virtual bool IsLegalCsCode(CREFSTRING sCode)=0;
     virtual bool IsValid()=0;
     virtual bool IsUsable(MgCoordinateSystemCatalog *pCatalog)=0;
     virtual bool IsSameAs(MgGuardDisposable *pDef)=0;

Modified: sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemDatum.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -26,9 +26,9 @@
     DECLARE_CLASSNAME(MgCoordinateSystemDatum)
 
 PUBLISHED_API:
-    virtual STRING GetCode()=0;
-    virtual void SetCode(CREFSTRING sCode)=0;
-    virtual bool IsLegalCode(CREFSTRING sCode)=0;
+    virtual STRING GetDtCode()=0;
+    virtual void SetDtCode(CREFSTRING sCode)=0;
+    virtual bool IsLegalDtCode(CREFSTRING sCode)=0;
     virtual bool IsValid()=0;
     virtual bool IsUsable(MgCoordinateSystemCatalog *pCatalog)=0;
     virtual bool IsSameAs(MgGuardDisposable *pDef)=0;

Modified: sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemEllipsoid.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -23,9 +23,9 @@
     DECLARE_CLASSNAME(MgCoordinateSystemEllipsoid)
 
 PUBLISHED_API:
-    virtual STRING GetCode()=0;  /// __get
-    virtual void SetCode(CREFSTRING sCode)=0;
-    virtual bool IsLegalCode(CREFSTRING sCode)=0;
+    virtual STRING GetElCode()=0;  /// __get
+    virtual void SetElCode(CREFSTRING sCode)=0;
+    virtual bool IsLegalElCode(CREFSTRING sCode)=0;
     virtual bool IsValid()=0;
     virtual bool IsUsable()=0;
     virtual bool IsSameAs(MgGuardDisposable *pDef)=0;

Modified: sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -402,7 +402,7 @@
 
         // Coordinate system properties
         // Add the Code
-        pProperty = new MgStringProperty(CCoordinateSystem::CoordinateSystemCode, pCsDef->GetCode());
+        pProperty = new MgStringProperty(CCoordinateSystem::CoordinateSystemCode, pCsDef->GetCsCode());
         pCoordSysProperties->Add(pProperty);
 
         // Add the Description

Modified: sandbox/rfc90/MgDev/Common/Geometry/Geometry.vcproj
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/Geometry.vcproj	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/Geometry.vcproj	2010-04-10 03:18:47 UTC (rev 4777)
@@ -2879,10 +2879,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\CoordinateSystem\CoordSysEnvVariable.h"
-				>
-			</File>
-			<File
 				RelativePath="..\CoordinateSystem\CoordSysFormatConverter.cpp"
 				>
 			</File>

Modified: sandbox/rfc90/MgDev/Common/Geometry/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -390,8 +390,7 @@
   ../CoordinateSystem/CoordSysMgrsZone.h \
   ../CoordinateSystem/CoordSysMgrs.h \
   ../CoordinateSystem/CoordSysMgrsMajorRegion.h \
-  ../CoordinateSystem/CoordSysOneGrid.h\
-  ../CoordinateSystem/CoordSysEnvVariable.h
+  ../CoordinateSystem/CoordSysOneGrid.h
 
 INCLUDES = \
   -I../Security \
@@ -411,7 +410,7 @@
   ../../Oem/CsMap/.libs/libCsmap.a \
   ../../Oem/geos-2.2.0/source/geom/.libs/libgeos.a
 
-libMgGeometry_la_LDFLAGS = -version-info 7:0:0 \
+libMgGeometry_la_LDFLAGS = -release $(PACKAGE_VERSION) \
   -L../../Oem/ACE/ACE_wrappers/ace \
   -L../Foundation \
   -L../../Oem/CsMap \

Modified: sandbox/rfc90/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -1053,11 +1053,14 @@
 INT32 MgSpatialUtility::PointIsInPolygon (MgCoordinateIterator* polyItr,MgCoordinate* outsidePoint,
                                                                         MgCoordinate* queryPoint)
 {
-    INT32 pointStatus (MgSpatialUtilityStatus::PointIsOutside);
+    INT32 pointStatus;
 
     Ptr<MgCoordinateXYM> lastIntersection;
     Ptr<MgCoordinateCollection> intersectionCollection;
 
+    // Until we know different.
+    pointStatus = MgSpatialUtilityStatus::PointIsOutside;
+
     // Get all the intersections between the "outPoint" amd the query Point.
     intersectionCollection = PolySegIntersection (polyItr,outsidePoint,queryPoint);
     INT32 count = intersectionCollection->GetCount ();
@@ -1082,7 +1085,10 @@
             // The query point is not on the polygon, so its inside/outside
             // status can be determined by the number of intersections.  An
             // odd number of intersections says the point is inside.
-            pointStatus = ((count % 2) == 1) ? MgSpatialUtilityStatus::PointIsInside : MgSpatialUtilityStatus::PointIsOutside;
+            // This rather strange sequence of code is required to overcome
+            // a glitch in the Linux build tools.
+            INT32 xxx = MgSpatialUtilityStatus::PointIsOutside;
+            pointStatus = ((count % 2) == 1) ? MgSpatialUtilityStatus::PointIsInside : xxx;
         }
     }
     return pointStatus;

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -273,7 +273,7 @@
   -lMgGeometry \
   -lMgSecurity
 
-libMgMapGuideCommon_la_LDFLAGS = -version-info 7:0:0 \
+libMgMapGuideCommon_la_LDFLAGS = -release $(PACKAGE_VERSION) \
   -L../../Oem/ACE/ACE_wrappers/ace \
   -L../PlatformBase \
   -L../Foundation \

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/MapLayer/Map.h
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/MapLayer/Map.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/MapLayer/Map.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -119,7 +119,7 @@
 /// }
 /// catch (MgException $e)
 /// {
-///     echo "ERROR: " . $e->GetMessage() . "n";
+///     echo "ERROR: " . $e->GetExceptionMessage() . "n";
 ///     echo $e->GetDetails() . "n";
 ///     echo $e->GetStackTrace() . "n";
 /// }

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res	2010-04-10 03:18:47 UTC (rev 4777)
@@ -268,7 +268,7 @@
 MgInvalidPropertyType                                 = The property type is invalid because it is not recognized.
 MgInvalidPropertyTypeForCommand                       = The property type is invalid for the command because it was of a different type then expected.
 MgInvalidResourceCannotBeRoot                         = The resource is invalid because it cannot be the root.
-MgInvalidScaleIndex                                   = Scale index is out of range.
+MgInvalidScaleIndex                                   = Scale index %1 is out of range.
 MgInvalidSecond                                       = The second is invalid because it must be between 0 and 59.
 MgInvalidServiceType                                  = The service type is invalid because it is not recognized.
 MgInvalidSessionsId                                   = The session ID is invalid because the session separator character was not found.
@@ -309,6 +309,7 @@
 MgStringEmpty                                         = The string cannot be empty.
 MgStringTooLong                                       = The string is too long.
 MgTagFieldNotFound                                    = The tag contained no fields.
+MgTooLargeMetaTilingFactor                            = The metatile factor must be smaller than the given MAX.
 MgUnableToLockTileFile                                = Unable to lock the tile file.
 MgUnableToOpenLockFile                                = Unable to open the tile lock file.
 MgUnableToOpenTileFile                                = Unable to open the tile file.

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/PackageStatusInformation.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/PackageStatusInformation.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/PackageStatusInformation.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -246,7 +246,7 @@
     }
     else
     {
-        statusMessage = resources->GetMessage(MgResources::ResourceService,
+        statusMessage = resources->GetResourceMessage(MgResources::ResourceService,
             resourceId, &arguments);
     }
 

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -78,7 +78,7 @@
                     if(NULL != mgException.p)
                     {
                         // Exception was thrown
-                        STRING message = mgException->GetMessage();
+                        STRING message = mgException->GetExceptionMessage();
                     }
                 }
             }
@@ -98,7 +98,7 @@
         }
 
         // Sleep the thread as thread resume/suspend is not supported on all platforms
-        for(size_t i=0;i<sleepTime;i++)
+        for(INT32 i=0;i<sleepTime;i++)
         {
             ACE_OS::sleep(1);
 

Modified: sandbox/rfc90/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -64,6 +64,9 @@
 #define MG_CONFIG_MIN_JOIN_QUERY_BATCH_SIZE             1
 #define MG_CONFIG_MAX_JOIN_QUERY_BATCH_SIZE             10000
 
+#define MG_CONFIG_MIN_RENDER_SELECTION_SIZE             1000
+#define MG_CONFIG_MAX_RENDER_SELECTION_SIZE             100000
+
 ///////////////////////////////////////////////////////////////////////////////
 /// Length ranges of string properties
 ///
@@ -293,7 +296,7 @@
 const STRING MgConfigProperties::RenderingServicePropertyRasterGridSizeOverrideRatioForPlot = L"RasterGridSizeOverrideRatioForPlot";
 const double MgConfigProperties::DefaultRenderingServicePropertyRasterGridSizeOverrideRatioForPlot = 0.10;
 const STRING MgConfigProperties::RenderingServicePropertyRenderSelectionBatchSize           = L"RenderSelectionBatchSize";
-const INT32  MgConfigProperties::DefaultRenderingServicePropertyRenderSelectionBatchSize    = 10000;
+const INT32  MgConfigProperties::DefaultRenderingServicePropertyRenderSelectionBatchSize    = 50000;
 const STRING MgConfigProperties::RenderingServicePropertyClampPoints                        = L"ClampPoints";
 const bool   MgConfigProperties::DefaultRenderingServicePropertyClampPoints                 = false;
 const STRING MgConfigProperties::RenderingServicePropertyGeneralizeData                     = L"GeneralizeData";
@@ -613,7 +616,7 @@
     { MgConfigProperties::RenderingServicePropertyRasterGridSizeForPlot             , MgPropertyType::Int32     , 1                                     , MG_CONFIG_MAX_INT32                   , L""                                       },
     { MgConfigProperties::RenderingServicePropertyMinRasterGridSizeForPlot          , MgPropertyType::Int32     , 1                                     , MG_CONFIG_MAX_INT32                   , L""                                       },
     { MgConfigProperties::RenderingServicePropertyRasterGridSizeOverrideRatioForPlot, MgPropertyType::Double    , 0.0                                   , 1.0                                   , L""                                       },
-    { MgConfigProperties::RenderingServicePropertyRenderSelectionBatchSize          , MgPropertyType::Int32     , 0                                     , MG_CONFIG_MAX_INT32                   , L""                                       },
+    { MgConfigProperties::RenderingServicePropertyRenderSelectionBatchSize          , MgPropertyType::Int32     , MG_CONFIG_MIN_RENDER_SELECTION_SIZE   , MG_CONFIG_MAX_RENDER_SELECTION_SIZE   , L""                                    },
     { L""                                                                           , 0                         , 0.0                                   , 0.0                                   , L""                                       }
 };
 

Modified: sandbox/rfc90/MgDev/Common/MdfModel/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/MdfModel/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MdfModel/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -201,4 +201,4 @@
   W2DSymbol.h \
   stdafx.h
 
-libMgMdfModel_la_LDFLAGS = -version-info 7:0:0
+libMgMdfModel_la_LDFLAGS = -release $(PACKAGE_VERSION)

Modified: sandbox/rfc90/MgDev/Common/MdfParser/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/MdfParser/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/MdfParser/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -198,6 +198,6 @@
 
 libMgMdfParser_la_LIBADD = -lMgMdfModel -lxerces-c
 
-libMgMdfParser_la_LDFLAGS = -version-info 7:0:0 \
+libMgMdfParser_la_LDFLAGS = -release $(PACKAGE_VERSION) \
   -L../MdfModel \
   -L../../Oem/dbxml-2.3.10/install/lib

Modified: sandbox/rfc90/MgDev/Common/PlatformBase/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/PlatformBase/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/PlatformBase/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -260,7 +260,7 @@
   -lMgFoundation \
   -lMgGeometry
 
-libMgPlatformBase_la_LDFLAGS = -version-info 7:0:0 \
+libMgPlatformBase_la_LDFLAGS = -release $(PACKAGE_VERSION) \
   -L../../Oem/ACE/ACE_wrappers/ace \
   -L../Foundation \
   -L../Geometry \

Modified: sandbox/rfc90/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -518,8 +518,8 @@
 MgStringCollection* MgSelectionBase::GenerateFilters(MgLayerBase* layer,
     CREFSTRING className, INT32 selectionSize)
 {
+    const INT32 OR_TEXT_SIZE = 4; // ie: " OR "
     Ptr<MgStringCollection> filters;
-    INT32 selectionCount = 0;
     STRING filter;
     bool filterReserved = false;
 
@@ -542,14 +542,7 @@
         {
             m_stream->FromBase64(*sIter);
 
-            if (bFirstSel)
-            {
                 selText = L"(";
-            }
-            else
-            {
-                selText = L" OR (";
-            }
 
             bool bFirstProp = true;
             MgLayerBase::IdPropertyList::iterator idIter;
@@ -686,20 +679,24 @@
                 filterReserved = true;
             }
 
-            filter.append(selText);
-            ++selectionCount;
-
-            if (selectionSize > 0 && selectionCount >= selectionSize)
+            if ((selectionSize > 0) && (((INT32)filter.length() + (INT32)selText.length() + OR_TEXT_SIZE) >= selectionSize))
             {
-                bFirstSel = true;
                 filters->Add(filter);
                 filter.clear();
-                selectionCount = 0;
             }
             else
             {
+                // Check if the "OR" needs to be added
+                if (!bFirstSel)
+                {
+                    filter.append(L" OR ");
+                }
+
                 bFirstSel = false;
             }
+
+            // Add the selection
+            filter.append(selText);
         }
 
         if (!filter.empty())

Modified: sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -18,10 +18,6 @@
 #include "PlatformBase.h"
 #include <assert.h>
 
-// To undefine GetMessage macro defined in windows
-#ifdef _WIN32
-    #undef GetMessage
-#endif
 
 MG_IMPL_DYNCREATE(MgWarnings);
 

Modified: sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.h
===================================================================
--- sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.h	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/PlatformBase/Services/Warnings.h	2010-04-10 03:18:47 UTC (rev 4777)
@@ -22,11 +22,6 @@
 /// \ingroup Common_Module
 /// \{
 
-// To undefine GetMessage macro defined in windows
-#ifdef _WIN32
-    #undef GetMessage
-#endif
-
 class MgWarnings;
 template class MG_PLATFORMBASE_API Ptr<MgWarnings>;
 

Modified: sandbox/rfc90/MgDev/Common/Renderers/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/Renderers/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Renderers/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -86,4 +86,4 @@
   ../../Oem/gd/lpng/libpng.a \
   ../../Oem/agg-2.4/src/libagg.a
 
-libMgRenderers_la_LDFLAGS = -version-info 7:0:0
+libMgRenderers_la_LDFLAGS = -release $(PACKAGE_VERSION)

Modified: sandbox/rfc90/MgDev/Common/Stylization/DefaultStylizer.cpp
===================================================================
--- sandbox/rfc90/MgDev/Common/Stylization/DefaultStylizer.cpp	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Stylization/DefaultStylizer.cpp	2010-04-10 03:18:47 UTC (rev 4777)
@@ -217,7 +217,7 @@
             nFeatures = StylizeVLHelper(layer, scaleRange, renderer, features, true, xformer, cancel, userData);
         }
 
-        #ifdef _DEBUG
+        #ifdef _MAPDEBUG
         printf("  DefaultStylizer::StylizeVectorLayer() Layer: %S  Features: %d\n", layer->GetFeatureName().c_str(), nFeatures);
         #endif
     }
@@ -303,7 +303,7 @@
     int nFeatures = 0;
     while (features->ReadNext())
     {
-        #ifdef _DEBUG
+        #ifdef _MAPDEBUG
         ++nFeatures;
         #endif
 

Modified: sandbox/rfc90/MgDev/Common/Stylization/Makefile.am
===================================================================
--- sandbox/rfc90/MgDev/Common/Stylization/Makefile.am	2010-04-10 02:40:44 UTC (rev 4776)
+++ sandbox/rfc90/MgDev/Common/Stylization/Makefile.am	2010-04-10 03:18:47 UTC (rev 4777)
@@ -205,4 +205,4 @@
 
 libMgStylization_la_LIBADD =
 
-libMgStylization_la_LDFLAGS = -version-info 7:0:0
+libMgStylization_la_LDFLAGS = -release $(PACKAGE_VERSION)



More information about the mapguide-commits mailing list