Thanks for the reply Nicol.&nbsp; That looks simple enough.&nbsp; My initial test gave me this error message:<b><br><br>Fatal error</b>:  [MapServer Error]: msProcessProjection(): projection not named
 in <b>/var/www/home/newlands/www_nc3d_com/temp/kml2mxs.php</b> on line <b>4<br></b><br><div class="gmail_quote">I did some googling and found some suggested modifications that fixed it:<br><br>&lt;?PHP<br>dl(&#39;php_mapscript.so&#39;);<br>
$projInObj = ms_newprojectionobj(&#39;proj=latlong&#39;);<br>$projOutObj = ms_newprojectionobj(&#39;init=epsg:2269&#39;);<br>$poPoint = ms_newpointobj();<br>$poPoint-&gt;setXY(-122.667591, 45.522973);<br>$poPoint-&gt;project($projInObj, $projOutObj);<br>
print_r($poPoint);<br>?&gt;<br><br>It looks like the projectionstring &quot;EPSG:####&quot; does not work (at least it does not work with the version in the latest Ubuntu package php5-mapscript_4.10.3-1_amd64.deb).&nbsp; I had to make the &quot;epsg&quot; lower case and prepend an &quot;init=&quot;.&nbsp; But I now have a functioning projection routine and I&#39;m now off to write an XML routine to process KML files.&nbsp; What fun!<br>
<br>Thanks!<br>-Ray<br><br>On Sat, Jun 28, 2008 at 2:40 AM, Nicol Hermann &lt;<a href="mailto:mapserver@geoworld.de">mapserver@geoworld.de</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ray,<br>
<br>
dl(&#39;../bin/php_mapscript.so&#39;);<br>
$projInObj = ms_newprojectionobj(&#39;EPSG:4326&#39;);<br>
$projOutObj = ms_newprojectionobj(&#39;EPSG:31466&#39;);<br>
$poPoint = ms_newpointobj();<br>
$poPoint-&gt;setXY(8.43, 50.4);<br>
$poPoint-&gt;project($projInObj, $projOutObj);<br>
<br>
print_r($poPoint);<br>
<br>
<br>
HTH<br>
Nicol<br>
<br>
<br>
Am Donnerstag, den 26.06.2008, 08:03 -0700 schrieb Ray Collett:<br>
<div><div></div><div class="Wj3C7c">&gt; Hello all,<br>
&gt; &nbsp; I need to project UTM coordinates into stateplane, but I have no<br>
&gt; need for drawing graphical maps. &nbsp;My output is to be a script that<br>
&gt; will be imported into another application. &nbsp;I have found the<br>
&gt; Geo::Proj4 for PERL, and I have a functioning skeleton program that is<br>
&gt; properly translating coordinates, but I&#39;m not that familar with PERL<br>
&gt; and I&#39;m spending 10x the time trying to do what I want as opposed to<br>
&gt; PHP which I know very well. &nbsp;I&#39;m looking for the same functionality in<br>
&gt; PHP, but having a hard time finding it. &nbsp;I just discovered<br>
&gt; PHP/MapScript, and I hope that it can do what I need, but so far I<br>
&gt; have not found any samples that I can learn from. I have PHP/MapScript<br>
&gt; installed and working, It&#39;s drawing maps and processing shp files.<br>
&gt;<br>
&gt; Here&#39;s a sample of the PERL code that I am using:<br>
&gt;<br>
&gt; ====================================<br>
&gt; #!/usr/bin/perl<br>
&gt; use Geo::Proj4;<br>
&gt; my $proj = Geo::Proj4-&gt;new(init =&gt; &quot;epsg:2269&quot;) or die;<br>
&gt; my($lon, $lat) = (-122.667591, &nbsp;45.522973);<br>
&gt; my @newLatLon = $proj-&gt;forward($lat, $lon);<br>
&gt; print &quot;x:&quot;, $newLatLon[0],&quot; y:&quot;, $newLatLon[1],&quot;\n&quot;;<br>
&gt; ====================================<br>
&gt;<br>
&gt; When run, it returns: x:7646617.87276814 y:684215.14079164<br>
&gt;<br>
&gt; Is there a way to do this in PHP? &nbsp;Is MapScript the way to go, or is<br>
&gt; there another project that I have not yet found that could do it for<br>
&gt; me? &nbsp;Any assistance is much appreciated!<br>
&gt;<br>
&gt; -Ray<br>
</div></div>&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>=======================================<br>--==-- Ray Collett --==--<br>Technical Director; Newlands &amp; Co. Inc.<br>503.287.8000 x520 <a href="mailto:3dlover@gmail.com">3dlover@gmail.com</a><br>
<a href="http://www.nc3d.com">www.nc3d.com</a> <a href="http://www.norwesters.org">www.norwesters.org</a><br>=======================================