<span style="font-family: courier;">Hi folks,</span><br style="font-family: courier;"><span style="font-family: courier;">I am trying to write a script that can convert LatLong point to UTM. Although the script its working but I am not getting the right results. Below please find my script.</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> $wktProj = 'PROJCS["NAD_1983_UTM_Zone_12N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-111.0],PARAMETER["Scale_Factor",0.99965242],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]';</span><br style="font-family: courier;"><span style="font-family: courier;">
$coordSysFactory = new MgCoordinateSystemFactory();</span><br style="font-family: courier;"><span style="font-family: courier;"> $coordSysProj = $coordSysFactory->Create($wktProj);</span><br style="font-family: courier;"><span style="font-family: courier;"> $geometryFactory = new MgGeometryFactory();</span><br style="font-family: courier;"><span style="font-family: courier;"> $xProj = -71.061342;</span><br style="font-family: courier;"><span style="font-family: courier;"> $yProj= 42.353966647205;</span><br style="font-family: courier;"><span style="font-family: courier;"> $coordinate = $geometryFactory->CreateCoordinateXY($xProj, $yProj);</span><br style="font-family: courier;"><span style="font-family: courier;">
$convertedCoordinate = $coordSysProj->ConvertFromLonLat($coordinate);</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> $xConv = $convertedCoordinate->GetX();</span><br style="font-family: courier;"><span style="font-family: courier;"> $yConv = $convertedCoordinate->GetY();</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;">I am getting (434696.747152, 6017918.57788) and the correct porjected point is (434700.172, 6017603.009).</span><br style="font-family: courier;"><span style="font-family: courier;">Any help in this regard would be highly appreciated.</span><br style="font-family: courier;"><span style="font-family: courier;">Thanks</span><br><p> 
<p class="MsoNormal"> </p>
<tbody><tr>
<td style="padding: 0.75pt;">
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="1" width="100%">
</span></font></div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><img id="_x0000_i1026" src="http://us.i1.yimg.com/us.yimg.com/i/ca/iotg_search.jpg" align="absbottom" border="0" height="25" hspace="4" width="25"><a href="http://ca.toolbar.yahoo.com/" target="_new"><b><span style="font-weight: bold;" lang="NO-BOK">Yahoo!
Canada Toolbar :</span></b><span lang="NO-BOK"> Search from anywhere on
the web and bookmark your favourite sites. Download it now! </span></a>
</span></font><span lang="NO-BOK"><o:p></o:p></span></p>