[mapserver-users] Projection object parameters for UTM to lat-long

Bistrais, Bob Bob.Bistrais at maine.gov
Mon Mar 23 17:41:02 EDT 2009


I am trying to project an object from UTM to lat-long.  I cannot get the
projection to work, and I suspect it's the parameters for the UTM
projection object.  I am trying to project from UTM Zone 19N, NAD 1983
to lat-long.  Here is my code:

$projInObj =
ms_newprojectionobj("proj=utm,ellps-GRS80,datum=NAD83,zone=19,units=m,no
rth,no_defs");
$projOutObj = ms_newprojectionobj("proj=latlong");
$poPoint = ms_newpointobj();
$poPoint->setXY($xmin, $ymin);
echo "<p/>Coords: " . $poPoint->x . ",".$poPoint->y;
$poPoint = $poPoint->project($projInObj, $projOutObj);
echo "<p/>x = " . $poPoint->x;
echo "<p/>y = " . $poPoint->y;
$poPoint->free();

I can see the output using the echo lines.  The coordinates going into
the point show up and are correct, but there are no x/y values after
doing the project.  Can anyone see what I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090323/5cf86c1c/attachment.html


More information about the mapserver-users mailing list