[mapserver-users] ms_newprojectionobj

Hans Wapenaar (GIS Innovations) hans.wapenaar at gis-innovations.nl
Fri Jul 3 08:33:33 EDT 2009


Hallo Sven,

Did you check the environment variables PATH and PROJ_LIB? May be one of
your servers refers to another project directory. 

Hans



-----Oorspronkelijk bericht-----
Van: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Namens Sven Schroeter
Verzonden: vrijdag 3 juli 2009 12:28
Aan: Milo van der Linden
CC: mapserver-users at lists.osgeo.org
Onderwerp: Re: [mapserver-users] ms_newprojectionobj

Hi,

thanks for the hint, but I checkt the proj already, it's the same.
I work with Windows and have the same proj-dir under C:\proj installed on 
both servers.
Any idea?

Sven



----- Original Message ----- 
From: "Milo van der Linden" <mlinden at zeelandnet.nl>
To: "Sven Schroeter" <schroeter at netgis.de>
Cc: <mapserver-users at lists.osgeo.org>
Sent: Friday, July 03, 2009 12:00 PM
Subject: Re: [mapserver-users] ms_newprojectionobj


> 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.29504
3&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.29565
1&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
>>
>
>
> 



_______________________________________________
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