I sent an other reply today this morning though it has not appeared yet, so I suppose I must rewrite it and resend it. So...<br>
<br>
Let's take a more standard tranformation and let's (together) evaluate the results.<br>
I will use as my starting coordinate system the standard greek grid
system (GGRS87). As found on the web page
<a href="http://cvs.gis.umn.edu/cgi-bin/viewcvs/mapserver_docs/proj.html?rev=1.2#GGRS87%20/%20Greek%20Grid">http://cvs.gis.umn.edu/cgi-bin/viewcvs/mapserver_docs/proj.html?rev=1.2#GGRS87%20/%20Greek%20Grid</a><br>
the parameters of this system are: &nbsp;<br>
&nbsp;&nbsp;&nbsp; proj=tmerc <br>
&nbsp;&nbsp;&nbsp; lat_0=0.000000000 <br>
&nbsp;&nbsp;&nbsp; lon_0=24.000000000 <br>
&nbsp;&nbsp;&nbsp; k=0.999600 <br>
&nbsp;&nbsp;&nbsp; x_0=500000.000 <br>
&nbsp;&nbsp;&nbsp; y_0=0.000 <br>
&nbsp;&nbsp;&nbsp; ellps=GRS80 <br>
&nbsp;&nbsp;&nbsp; towgs84=-199.87,74.79,246.62,0,0,0,0 <br>
&nbsp;&nbsp;&nbsp; units=m <br>
&nbsp;&nbsp;&nbsp; no_defs <br>
Here, I will inform that the greek system has its borders on <br>
Xmin = 80000<br>
Xmax = 1050000<br>
Ymin = 3760000<br>
Ymax = 4660000<br>
<br>
Supposing that these params are official and accepted enough, I step
over to the tranformation from this system (GGRS87) to WGS84.<br>
So we have the following code:<br>
<br>
[CODE]<br>
// Projections declaration<br>
$projInObj=ms_newprojectionobj(&quot;proj=tmerc,ellps=GRS80,towgs84=-199.87,74.79,246.62,0,0,0,0,units=m,lon_0=24,k=0.9996,x_0=500000,no_defs&quot;)<br>
$projOutObj=ms_newprojectionobj(&quot;proj=latlong,ellps=WGS84,DATUM=WGS84,no_defs&quot;);<br>
<br>
// Shape to be reprojected<br>
$myshape = ms_newpointobj();<br>
$myshape-&gt;setXY(552000, 4098077);&nbsp; <br>
<br>
// Some code to confirm initial values<br>
print_r($myshape);<br>
echo &quot;&lt;p /&gt;&quot;;<br>
<br>
$myshape-&gt;project($projInObj, $projOutObj);<br>
<br>
// Code to get the final values<br>
print_r($myshape);<br>
[/CODE]<br>
<br>
The expected result (according to very reliable software like ArcGIS and others...) is:<br>
lon=24,351076881,lat=37,014812887<br>
Though! the result that I get from mapscript is:<br>
lon=24.585568772,lat=37.028433901<br>
<br>
Again it seems to a small difference but the truth is that we have to deal with a very large difference on the results!<br>
<br>
I did test the tranformation with different values. I provide some triads of input and output:<br>
&lt;triad 1&gt;<br>
Input:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; X=100000, Y=4000000<br>
Expected:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lon:19,334046546,lat:36,035407643<br>
mapscript gave: lon:19.560466687 lat:36.063361179<br>
&lt;/triad 1&gt;<br>
<br>
&lt;triad 2&gt;<br>
Input:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X=400000, Y=4200000<br>
Expected:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lon:22,514890564,lat:37,564089629<br>
mapscript gave: lon:22.862809496,lat:37.943105553<br>
&lt;/triad 2&gt; <br>
<br>
&lt;triad 3&gt;<br>
Input:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X=700000, Y=4400000<br>
Expected:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; lon:26,200754084,lat:39,434436875<br>
mapscript gave: lon:26.334654875,lat:39.727476986<br>
&lt;/triad 3&gt; <br>
<br>
&lt;triad 4&gt;<br>
Input:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; X=1000000, Y=4600000<br>
Expected:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; lon:29,585420281,lat:41,235432698<br>
mapscript gave: lon:29.980956617,lat:41.396983529<br>
&lt;/triad 4&gt; <br>
<br>
I can't relize any sytematic error. The only thing that can mention by
a first look is that I get bad results. And, once again, I ask: Do I do
something wrong or are there any limitations on the PROJ or the
mapscript that I must know?<br>
<br>
Thanks on advance<br>
<br>
Andreas Trantidis