<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Hi Joel</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is how I do something similar. I use proj4 - with appropriate projection files specified:</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;&lt;script src="lib/proj4js-combined.js"&gt;&lt;/script&gt;<BR>&nbsp;&lt;script src="lib/EPSG2193.js"&gt;&lt;/script&gt;<BR>&nbsp;&lt;script src="lib/EPSG4326.js"&gt;&lt;/script&gt;<BR></DIV>
<DIV>Here is the code that does the re-projection:</DIV>
<DIV>&nbsp;</DIV>
<DIV>src = new OpenLayers.Projection('EPSG:4326');<BR>dest = new OpenLayers.Projection('EPSG:2193');<BR>markergeom = new OpenLayers.Geometry.Point(gpsx,gpsy);<BR>//now in-place re-projection<BR>OpenLayers.Projection.transform(markergeom, src, dest); <BR>gpsx = markergeom.x;<BR>gpsy = markergeom.y;<BR>alert("from WGS84:" + gpsx + "," + gpsy);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>&gt;&gt;&gt; Joel &lt;joel@srcti.com&gt; 17/02/2010 6:11 a.m. &gt;&gt;&gt;<BR><BR>How do I transform deg decimal to Transverse Mercator projection for the<BR>following?<BR><BR><BR>SRS WKT:&nbsp; PROJCS["NAD27 / Illinois East", GEOGCS["NAD27", DATUM["North<BR>American Datum 1927", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982,<BR>AUTHORITY["EPSG","7008"]], TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0],<BR>AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich", 0.0,<BR>AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295],<BR>AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH],<BR>AUTHORITY["EPSG","4267"]], PROJECTION["Transverse Mercator",<BR>AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian",<BR>-88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664],<BR>PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 500000.0],<BR>PARAMETER["false_northing", 0.0], UNIT["foot_survey_us",<BR>0.30480060960121924], AXIS["Easting", EAST], AXIS["Northing", NORTH],<BR>AUTHORITY["EPSG","26771"]]&nbsp; <BR>Native SRS WKT:&nbsp; PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet",<BR>GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983",<BR>SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0],<BR>UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST],<BR>AXIS["Latitude", NORTH]], PROJECTION["Transverse_Mercator"],<BR>PARAMETER["central_meridian", -88.33333333333333],<BR>PARAMETER["latitude_of_origin", 36.666666666666664],<BR>PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 984250.0],<BR>PARAMETER["false_northing", 0.0], UNIT["foot_survey_us",<BR>0.3048006096012192], AXIS["X", EAST], AXIS["Y", NORTH]]<BR><BR><BR>I have tried numerious combinations including :<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var proj3 = new OpenLayers.Projection("EPSG:4326");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var proj1 = new OpenLayers.Projection("EPSG:900913");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; itemloc = new OpenLayers.LonLat(gpslon2, gpslat2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; itemloc.transform( proj3, proj1);<BR><BR>I end up with:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -87.66646666666666 lon: -9758986.427620362 deglat: 41.90336666666667<BR>lat: 5146515.211664708<BR>should be:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -87.66646666666666 lon: 1160049.27959 deglat: 41.90336666666667 lat:<BR>1912889.44114<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -87.68734166666668 lon: -9761310.22199035 deglat: 41.91610833333334<BR>lat: 5148421.150384361<BR>should be:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -87.68734166666668 lon: 1163172.7780096494 deglat: 41.91610833333334<BR>lat: 1909982.150384361<BR><BR>-- <BR>View this message in context: <A href="http://n2.nabble.com/How">http://n2.nabble.com/How</A>-do-I-transform-deg-decimal-to-Transverse-Mercator-projection-NAD27-tp4581461p4581461.html<BR>Sent from the OpenLayers Users mailing list archive at Nabble.com.<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc.  </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>