[mapserver-users] Projection object parameters for UTM to lat-long
Pietro Giannini
pgiannini at bytewise.it
Tue Mar 24 03:12:04 PDT 2009
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/d4311cc6/attachment.htm>
More information about the MapServer-users
mailing list