[Proj] Cartesian (geocentric) transformations

Frank Warmerdam warmerdam at pobox.com
Mon Nov 29 09:50:28 EST 2004


Richard didier wrote:
> Hi all,
> 
> Using the following :
> 
> cs2cs \
> +proj=geocent +towgs84=0.0000,0.0000,0.0000 \
> +a=6378137.0000 +b=6356752.3141 +units=m +no_defs \
> +to \
> +proj=geocent 
> +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 \
> +a=6378388.0000 +b=6356911.9461 +units=m +no_def
> <<EOF
> 3356123.5400 1303218.3090 5247430.6050
> 3353657.1750 1303862.6620 5249102.0550
> EOF
> 
> I got :
> 3353421.83      1304074.31 5248935.61
> 3350954.73      1304718.57 5250606.19
> 
> While I'm expecting :
> 3353421.02      1304074.55 5248934.99 (not too bad)
> 3353740.30      1303962.22 5249236.89 (very bad)
> 
> any idea ?

Richard,

I don't know off hand why there is such a divergence in the results from
the expected values, but then I also don't know how you derived your
expected values or the towgs84 values you used.  What I will say is that
the conversion between geocentric coordinate systems is relatively easy
to follow.  I would encourage you to step and/or read through the related
code in pj_transform.c, and geocent.c to see if you can see any errors.

One thing to be careful about is the sign and handedness of the towgs84
conversions.  The best supporting information on how the towgs84 stuff works
is at:

   http://proj.maptools.org/gen_parms.html#towgs84

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    | Geospatial Programmer for Rent




More information about the Proj mailing list