[mapserver-users] Projection object parameters for UTM to lat-long
Bistrais, Bob
Bob.Bistrais at maine.gov
Tue Mar 24 11:08:50 PDT 2009
Hi Pietro,
That was it! After making this correction, it works!
Thank you,
Bob
________________________________
From: Pietro Giannini [mailto:pgiannini at bytewise.it]
Sent: Tuesday, March 24, 2009 6:12 AM
To: mapserver-users
Subject: Re: [mapserver-users] Projection object parameters for UTM to lat-long
Bob,
maybe error is in first line: "ellps-GRS80" is wrong, "ellps=GRS80" is correct.
bye
................pg
Bistrais, Bob ha scritto:
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,north,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?
________________________________
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090324/6c34887e/attachment.htm>
More information about the MapServer-users
mailing list