[mapserver-users] pointObj->project behaviour differences from 4.10 to 5.6 versions

Juanma M. R. juanma.mr at gmail.com
Mon Apr 23 09:39:16 EDT 2012


Hi,

I have been doing more tests to try to identify exactly the problem and I
ahve realized that, according to http://twcc.free.fr/, the coordinates
returned when working with php_mapscript from version 4.10 are not correct.
I am trying to get where is the problem, so that I can decide wether
sorting out a The issue is that the function project returns different
things depending on the server configuration:

Input coordinates in Google Spherical Mercator:
(-20500513.477395,-3641436.
715144)

Server 1: proj 4.1.5 and MapServer 4.10 returns
(-90270074.105905,-216622133.8792)
Server 2: proj 4.1.7 and MapServer 5.6 returns
(-20500513.477395,-3641436.715144)
The World Coordinate Converter automatically transform the output CRS to
UTM 60S, so I can't not validate the transformation with it.

The issue is that I would like to understand the expected behaviour from
this function, so that I can go on checking it and defining the best way to
support the functionality or detecting a problem in servers configuration.

The code is as follows:

function project($x, $y, $srsIn, $srsOut)
        {
                $pointObj=ms_newPointObj();

                $pointObj->setXY($x,$y);


$pointObj->project(ms_newProjectionObj("init=".strtolower($srsIn)),
ms_newProjectionObj("init=".strtolower($srsOut)));

                $xout=$pointObj->x;
                $yout=$pointObj->y;

                $pointObj->free();

                return $xout.",".$yout;
        }
?>


2012/4/16 Lime, Steve D (DNR) <Steve.Lime at state.mn.us>

>  The transformation is done in place, I’ve not had problems with it. What
> language? Can you post a code snippet?****
>
> ** **
>
> *From:* mapserver-users-bounces at lists.osgeo.org [mailto:
> mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Juanma M. R.
> *Sent:* Thursday, April 12, 2012 4:13 AM
> *To:* mapserver-users at lists.osgeo.org
> *Subject:* [mapserver-users] pointObj->project behaviour differences from
> 4.10 to 5.6 versions****
>
> ** **
>
> Dear list,
>
> I have a webgis application working with different CRS all over the world.
> I have realized that the behaviour from version 4.10 of the function
> pointObj->project differs from the one of version 5.6 from Mapserver. For
> example, I try to convert (-116,-15) in 4326 and in mapscript from version
> 4.10 it returns  (-26158630.407638,-25040425.679281) when passing to 32630.
> On the other hand, in version 5.6 of mapscript it returns the original
> coordinates without transforming them.
>
> Is this intended or am I doing something wrong? Which is the intended
> behaviour of project function in MapServer 5.6?
>
> Best regards,
> --
> Juan Manuel Moreno Rivera.
> University of Castilla-La Mancha
> Albacete, Spain****
>



-- 
Juan Manuel Moreno Rivera.
University of Castilla-La Mancha
Albacete, Spain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120423/85ca954c/attachment.html


More information about the mapserver-users mailing list