Mapscript php projection problems

Frank Warmerdam warmerdam at POBOX.COM
Fri Aug 18 10:37:15 PDT 2006


Sven Borgers wrote:
> When I use Mapscript PHP:
>    $projInObj = ms_newProjectionObj( "proj=tmerc,".
>   "lat_0=49,".
>   "lon_0=-2,".
>   "k=0.999601,".
>   "x_0=400000,".
>   "y_0=-100000,".
>   "ellps=airy,".
>   "towgs84=375,-111,431,0,0,0,0");

Sven,

I found the problem!  It is that you can't use the comma delimited format
for the projection string when using towgs84 since there is no way to
know that all the towgs84 arements are part of the same argument.

I changed it to this and it worked:

$projInObj = ms_newProjectionObj( "+proj=tmerc ".
   "+lat_0=49 ".
   "+lon_0=-2 ".
   "+k=0.999601 ".
   "+x_0=400000 ".
   "+y_0=-100000 ".
   "+ellps=airy ".
   "+towgs84=375,-111,431,0,0,0,0");

I would like to strongly encourage folks to use the "+" format for all
MapServer purposes!

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the MapServer-users mailing list