<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> </DIV>
<DIV>This is how I do something similar. I use proj4 - with appropriate projection files specified:</DIV>
<DIV> </DIV>
<DIV><BR> <script src="lib/proj4js-combined.js"></script><BR> <script src="lib/EPSG2193.js"></script><BR> <script src="lib/EPSG4326.js"></script><BR></DIV>
<DIV>Here is the code that does the re-projection:</DIV>
<DIV> </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> </DIV>
<DIV>Regards,</DIV>
<DIV> </DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>>>> Joel <joel@srcti.com> 17/02/2010 6:11 a.m. >>><BR><BR>How do I transform deg decimal to Transverse Mercator projection for the<BR>following?<BR><BR><BR>SRS WKT: 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"]] <BR>Native SRS WKT: 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> var proj3 = new OpenLayers.Projection("EPSG:4326");<BR> var proj1 = new OpenLayers.Projection("EPSG:900913");<BR> itemloc = new OpenLayers.LonLat(gpslon2, gpslat2);<BR> itemloc.transform( proj3, proj1);<BR><BR>I end up with:<BR> -87.66646666666666 lon: -9758986.427620362 deglat: 41.90336666666667<BR>lat: 5146515.211664708<BR>should be:<BR> -87.66646666666666 lon: 1160049.27959 deglat: 41.90336666666667 lat:<BR>1912889.44114<BR><BR> -87.68734166666668 lon: -9761310.22199035 deglat: 41.91610833333334<BR>lat: 5148421.150384361<BR>should be:<BR> -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 contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this 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>