[mapguide-commits] r4554 - trunk/MgDev/Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jan 28 16:16:47 EST 2010


Author: NormOlsen
Date: 2010-01-28 16:16:47 -0500 (Thu, 28 Jan 2010)
New Revision: 4554

Modified:
   trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
Log:
Trac Ticket 1253 -- First installment.

Corrects the construction of an MgrsZone object when constructed for the southern hemisphere.  Added a minus sign in two places.

Note, the internal convention used for UTM zone: Positive means northern hemisphere, negative means southern hemisphere; 61 used for polar region.

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2010-01-28 21:15:20 UTC (rev 4553)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2010-01-28 21:16:47 UTC (rev 4554)
@@ -1210,7 +1210,7 @@
                     if (pPolygonIntersection != 0)
                     {
                         reducedFrameBoundary = csFactory->GridBoundary (pPolygonIntersection);
-                        mgrsZoneGrid = new CCoordinateSystemMgrsZone (reducedFrameBoundary,zoneNbr,useFrameDatum,frameCRS,m_nLetteringScheme,
+                        mgrsZoneGrid = new CCoordinateSystemMgrsZone (reducedFrameBoundary,-zoneNbr,useFrameDatum,frameCRS,m_nLetteringScheme,
                                                                       m_GridLineMemoryThreshold,m_GridTickMemoryThreshold,m_GridRegionMemoryThreshold);
                         zoneCollection->Add (mgrsZoneGrid);
                     }
@@ -1335,7 +1335,7 @@
     }
     else if (zoneNbr < 0 && zoneNbr > -61)
     {
-        swprintf (wcBufr,64,L"UTM84-%dS",zoneNbr);
+        swprintf (wcBufr,64,L"UTM84-%dS",-zoneNbr);
         utmCode = wcBufr;
     }
     else



More information about the mapguide-commits mailing list