[mapserver-users] Problem in pointObj-> project from php/mapscript

Juanma M. R. juanma.mr at gmail.com
Tue Oct 4 13:51:45 EDT 2011


Hi list,

I have got the following code:

$pointObj=ms_newPointObj();
$pointObj->setXY($x,$y);
$pointObj->project(ms_newProjectionObj("init=".$srsIn),
ms_newProjectionObj("init=".$srsOut));

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


$srsIn is epsg:32612 and $srsOut is epsg:4326. The issue is that the point
modified has the correct value for the Y coordinate already converted in the
X field, and viceversa. So that I get a point with the X and Y coordinates
interchanged.

The input coordinates are:
$x = 642138
$y = 2983678

And the result:
$pointObj->x = -109.5678723348
$pointObj->y = 26.967831676085

I think this is not the expected result. I have checked it with mapscript
from  Mapserver 4.10 and 5.6.3. I have looked for a bug or something similar
that could cause that. Anyone with the same problem?

Cheers,
Juan Manuel Moreno Rivera.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111004/5c034bfc/attachment.html


More information about the mapserver-users mailing list