Sorry, my mistake: I misunderstood what you were trying to do.<br>As Mike says: the compressed script should have the specific definitions for the different projection types.<br>As an aside, I&#39;ve just implemented the &quot;gnom&quot; projection which I shall be checking in soon (probably later tonight).<br>
<br>Richard<br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 1:28 PM, Dash <span dir="ltr">&lt;<a href="mailto:jimlug@co.clackamas.or.us">jimlug@co.clackamas.or.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks for the quick response Richard, but I don&#39;t see how I&#39;m re-projecting<br>
raster layers when I&#39;m explicitly specifying coordinates to transform?  I&#39;m<br>
only using the transformation on coordinates, not the base layers (Google).<br>
<br>
Ahhh, I just figured it out.  Here is what I had to do in-order to transform<br>
coordinates from EPSG:2913 (Stateplane) to EPSG:900913.  Within the head tag<br>
I added 2 projCodes (lcc.js and merc.js).<br>
<div class="im"><br>
&lt;script src=&quot;./proj4js/lib/proj4js.js&quot;&gt;&lt;/script&gt;<br>
</div>&lt;script src=&quot;./proj4js/lib/proj4js-compressed.js&quot;&gt;&lt;/script&gt;<br>
<div class="im">&lt;script src=&quot;./proj4js/lib/defs/EPSG2913.js&quot;&gt;&lt;/script&gt;<br>
</div>&lt;script src=&quot;./proj4js/lib/projCode/lcc.js&quot;&gt;&lt;/script&gt;<br>
&lt;script src=&quot;./proj4js/lib/projCode/merc.js&quot;&gt;&lt;/script&gt;<br>
<br>
Also, here is my transformation:<br>
<br>
var srcProj = new OpenLayers.Projection(&quot;EPSG:2913&quot;);<br>
var destProj = new OpenLayers.Projection(&quot;EPSG:900913&quot;);<br>
var point = new OpenLayers.LonLat(7662464.286, 614886.646);<br>
<div class="im">point.transform(srcProj, map.getProjectionObject());<br>
<br>
</div>My input coordinates were: 7662464.286, 614886.646<br>
Transformed coordinates: -13647631.260266263, 5674262.881180859<br>
<br>
Works great, at least for now.<br>
<div><div></div><div class="h5"><br>
<br>
Richard Marsden wrote:<br>
&gt;<br>
&gt; It looks like you are trying to re-project Google raster layers?<br>
&gt;<br>
&gt; I thought OpenLayers was only capable of re-projecting vector layers?<br>
&gt;<br>
&gt; For example, the following article uses OpenLayers (&amp; Proj4JS) to<br>
&gt; re-project<br>
&gt; KML and GeoRSS data (geographic coords, WGS84) to a number of different<br>
&gt; projections (Mollweide, Behrmann, etc):<br>
&gt;<br>
&gt; <a href="http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2" target="_blank">http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2</a><br>

&gt;<br>
&gt;<br>
&gt; Richard Marsden<br>
&gt; Winwaed Software Technology LLC<br>
&gt; <a href="http://www.winwaed.com" target="_blank">http://www.winwaed.com</a><br>
&gt; <a href="http://www.mapping-tools.com" target="_blank">http://www.mapping-tools.com</a><br>
&gt; <a href="http://www.geowebguruc.om" target="_blank">http://www.geowebguruc.om</a><br>
&gt;<br>
&gt;<br>
&gt; On Thu, Nov 19, 2009 at 12:12 PM, Dash &lt;<a href="mailto:jimlug@co.clackamas.or.us">jimlug@co.clackamas.or.us</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Aloha Thursday folks,<br>
&gt;&gt;<br>
&gt;&gt; I am banging my head against the problem for the last several hours.  I<br>
&gt;&gt; have<br>
&gt;&gt; went through numerous examples and utilized OpenLayers tutorial on<br>
&gt;&gt; reprojecting points without any success.  I&#39;ve even used the Proj4js Wiki<br>
&gt;&gt; without any help.  Could some please shed some light on what I am doing<br>
&gt;&gt; wrong?<br>
&gt;&gt;<br>
&gt;&gt; Here is the scenario.  I am trying to transform some coordinates from<br>
&gt;&gt; EPSG:2913 to EPSG:900913.  I&#39;ve also tried a simplified version using<br>
&gt;&gt; EPSG:4326 -&gt; EPSG:900913.  Anyway, the transform is not happening for<br>
&gt;&gt; some<br>
&gt;&gt; odd reason.  I do have the proj4js library within my code and I have<br>
&gt;&gt; added<br>
&gt;&gt; EPSG definition to my /proj4js/lib/def directory.  I am checking if the<br>
&gt;&gt; projection by using the getUnits function of the projection class within<br>
&gt;&gt; OpenLayers.  If the units come back null, then the proj4js library is<br>
&gt;&gt; unavailable.  Why is this?  I&#39;m so confused.  This should be rather<br>
&gt;&gt; straight<br>
&gt;&gt; forward.  Anyway, here is some of my code.  Hopefully someone can help me<br>
&gt;&gt; out.  Thanks.<br>
&gt;&gt;<br>
&gt;&gt; &lt;head&gt;<br>
&gt;&gt; &lt;script src=&quot;<a href="http://openlayers.org/dev/lib/OpenLayers.js" target="_blank">http://openlayers.org/dev/lib/OpenLayers.js</a>&quot;<br>
&gt;&gt; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>
&gt;&gt; &lt;script src=&quot;./proj4js/lib/proj4js.js&quot;&gt;&lt;/script&gt;<br>
&gt;&gt; &lt;script src=&quot;proj4js/lib/defs/EPSG2913.js&quot;&gt;&lt;/script&gt;<br>
&gt;&gt; &lt;script src=&quot;proj4js/lib/defs/EPSG900913.js&quot;&gt;&lt;/script&gt;<br>
&gt;&gt; &lt;script src=&quot;proj4js/lib/defs/EPSG4326.js&quot;&gt;&lt;/script&gt;<br>
&gt;&gt; &lt;/head&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;script type=&quot;text/javascript&quot;&gt;<br>
&gt;&gt; var map;<br>
&gt;&gt; function init(){<br>
&gt;&gt;        var options = {<br>
&gt;&gt;                //projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>
&gt;&gt;     // Map projection<br>
&gt;&gt;                projection: &quot;EPSG:900913&quot;,<br>
&gt;&gt;                displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>
&gt;&gt;    // Display<br>
&gt;&gt; projection<br>
&gt;&gt;                units: &quot;m&quot;,<br>
&gt;&gt;                numZoomLevels: 5,<br>
&gt;&gt;                maxResolution: 156543.0339,<br>
&gt;&gt;        maxExtent: new OpenLayers.Bounds(-13698618.8209569,<br>
&gt;&gt; 5595988.4768255,<br>
&gt;&gt; -13521569.8682338, 5701506.49106001)<br>
&gt;&gt;        };<br>
&gt;&gt;<br>
&gt;&gt;        // Initiate Map Controls<br>
&gt;&gt;        map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&gt;&gt;        map.addControl(new OpenLayers.Control.MousePosition());<br>
&gt;&gt;<br>
&gt;&gt;        // Create Google Mercator Layers<br>
&gt;&gt;        var gmap = new OpenLayers.Layer.Google(&quot;Google<br>
&gt;&gt; Streets&quot;,{&#39;sphericalMercator&#39;: true, numZoomLevels: 20});<br>
&gt;&gt;        var gphy = new OpenLayers.Layer.Google(&quot;Google Physical&quot;,<br>
&gt;&gt; {&#39;sphericalMercator&#39;: true, type: G_PHYSICAL_MAP, numZoomLevels: 20});<br>
&gt;&gt;    var gsat = new OpenLayers.Layer.Google(&quot;Google<br>
&gt;&gt; Satellite&quot;,{&#39;sphericalMercator&#39;: true, type: G_SATELLITE_MAP,<br>
&gt;&gt; numZoomLevels:<br>
&gt;&gt; 20});<br>
&gt;&gt;    var ghyb = new OpenLayers.Layer.Google(&quot;Google<br>
&gt;&gt; Hybrid&quot;,{&#39;sphericalMercator&#39;: true, type: G_HYBRID_MAP, numZoomLevels:<br>
&gt;&gt; 20});<br>
&gt;&gt;<br>
&gt;&gt; map.addLayers([gmap, gphy, gsat, ghyb]);<br>
&gt;&gt;<br>
&gt;&gt; var srcProj = new OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>
&gt;&gt; alert(srcProj.getUnits());<br>
&gt;&gt; var point = new OpenLayers.LonLat(-71, 42);<br>
&gt;&gt; point.transform(srcProj, map.getProjectionObject());<br>
&gt;&gt;<br>
&gt;&gt; if(point.transformed)<br>
&gt;&gt;        {<br>
&gt;&gt;                alert(&quot;point already transformed&quot;);<br>
&gt;&gt;        }<br>
&gt;&gt;<br>
&gt;&gt; Proj4js.transform(srcProj, map.getProjectionObject(), point);<br>
&gt;&gt;<br>
&gt;&gt; Any suggestions would be greatly appreciated.  THANKS...<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://n2.nabble.com/transform-help-please-tp4033462p4033462.html" target="_blank">http://n2.nabble.com/transform-help-please-tp4033462p4033462.html</a><br>
&gt;&gt; Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/transform-help-please-tp4033462p4033873.html" target="_blank">http://n2.nabble.com/transform-help-please-tp4033462p4033873.html</a><br>
</font><div><div></div><div class="h5">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>