[Proj] Re: WGS84 Lat Lon to XYZ convercion
Frank Warmerdam
warmerdam at pobox.com
Fri Feb 1 08:03:21 PST 2008
Alekos Ntermaris wrote:
> The problem is that using the pj_fwd function i get the same results as
> the input ( lon , lat) and not XYZ....
Alekos,
I haven't followed this thread closely, but you pj_fwd() and pj_inv() only
do geographic <-> projected transformations. If you want to do a
transformation involving datum shifts or geocentric coordinates you should
be using pj_transform().
When you refer to XYZ coordinates, are you mean geocentric? That is, meters
from the center of the earth in the x, y and z axes? If so, you should
use +proj=geocent with pj_transform() or it's commandline equivelent cs2cs.
For example:
cs2cs +proj=latlong +datum=WGS84 +to +proj=geocent +datum=WGS84
-117 55 (input)
-1664598.63 -3266958.75 5201383.52 (output)
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Proj
mailing list