[mapguide-commits] r4784 - sandbox/adsk/2.2gp/Common/Geometry/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Apr 12 18:45:10 EDT 2010


Author: chrisclaydon
Date: 2010-04-12 18:45:07 -0400 (Mon, 12 Apr 2010)
New Revision: 4784

Modified:
   sandbox/adsk/2.2gp/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp
Log:
Fixes #1320 - WKT to EPSG conversion fails for spherical mercator coordinate system

This submission modifies the coordinate system API method MgCoordinateSystemFactory::ConvertWktToEpsgCode to use MgCoordinateSystemWktFlavor::Unknown instead of MgCoordinateSystemWktFlavor::Ogc, which allows it to support more WKT flavors than just OGC, and allows it successfully to convert the WKT string currently used for the commercial mapping coordinate system used by Google Maps, Bing etc.

Modified: sandbox/adsk/2.2gp/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp
===================================================================
--- sandbox/adsk/2.2gp/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp	2010-04-12 20:05:02 UTC (rev 4783)
+++ sandbox/adsk/2.2gp/Common/Geometry/CoordinateSystem/CoordinateSystemFactory.cpp	2010-04-12 22:45:07 UTC (rev 4784)
@@ -507,7 +507,7 @@
     {
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemFactory.ConvertWktToEpsgCode", __LINE__, __WFILE__, NULL, L"", NULL);
     }
-    STRING strEpsgCode=pConverter->WktToCode(MgCoordinateSystemWktFlavor::Ogc, wkt, MgCoordinateSystemCodeFormat::Epsg);
+    STRING strEpsgCode=pConverter->WktToCode(MgCoordinateSystemWktFlavor::Unknown, wkt, MgCoordinateSystemCodeFormat::Epsg);
     nEpsg = (INT32)wcstol(strEpsgCode.c_str(), NULL, 10);
     MG_CATCH_AND_THROW(L"MgCoordinateSystemFactory.ConvertWktToEpsgCode")
 



More information about the mapguide-commits mailing list