[mapserver-users] ms_newprojectionobj

Milo van der Linden mlinden at zeelandnet.nl
Fri Jul 3 03:00:57 PDT 2009


Hello Sven,

I suggest you search for a file called epsg on both systems. It is a
text file containing EPSG projection parameters.
Search both for <31466> and  <4326>
Compare the lines and check to see they match.

Good luck!

Sven Schroeter wrote:
> Hi,
>
> I'm using php-mapscript to project a point from epsg:31466
> (Gauss-Krueger-Zone2) to epsg:4326 (WGS84):
>
> //create point
> $qPoint = ms_newPointObj();
> $qPoint->setXY(2521189,5541667);
>
> // Calculate -> WGS84
> $projInObj = ms_newprojectionobj("init=epsg:31466");
> $projOutObj = ms_newprojectionobj("init=epsg:4326");
> $qPoint->project($projInObj, $projOutObj);
> $WGS_X = round($qPoint->x,6);
> $WGS_Y = round($qPoint->y,6);
> echo 'WGS84: <strong>'.$WGS_Y.','.$WGS_X.' </strong>';
>
> I let the script running on two diferent Servers with the same
> Mapserver-Installation:
>
> The first Server calculates the correct coordinates:
> WGS84: 50.010907,6.295043
>
> http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.010907,6.295043&t=h&ie=UTF8&ll=50.010907,6.295043&spn=0.009542,0.015407&z=16&iwloc=near
>
>
>
> The second server calculates the wrong coordinates:
> WGS84: 50.012688,6.295651
>
> http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.012688,6.295651&t=h&ie=UTF8&ll=50.012688,6.295651&spn=0.009542,0.015407&z=16&iwloc=near
>
>
> Both Servers have the same Mapscriptversion:
> MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG
> SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
> INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> What is wrong with the second installation? Is there a different
> geosversion, how can I test this?
> Thanks
> Sven
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>




More information about the MapServer-users mailing list