[OSRS-PROJ] cs2cs and datum shift]

Frank Warmerdam warmerdam at pobox.com
Mon Aug 26 05:51:22 PDT 2002


Roberto Vidmar wrote:
> The geoid stuff is quite complicated and I know that many people are 
> deep inside this matter. From my point of view if I run a program with 
> some input and then again requiring the reverse transform I should 
> return to the same starting point. So either I called the program with 
> wrong parameters or it is buggy :-)

Roberto,

As Clifford suggests, PROJ.4 knows nothing about different geoid models.

> cs2cs +proj=latlong +datum=WGS84\
>  +to \
>  +proj=latlong +ellps=intl \
>  +towgs84=10,20,30,1,2,3,44 \
>  bb | \
> cs2cs -I +proj=latlong +datum=WGS84\
>  +to \
>  +proj=latlong +ellps=intl  \
>  +towgs84=10,20,30,1,2,3,44
> 
> The bb file is:
> 11 45 77
> 
> My output is:
> 
> 10d59'55.09"E   45d0'2.796"N 15.661
> 11dE    44d59'59.939"N 637.364
> 
> So:
> 1st:) The two outputs are different.
> 2nd:) Both are wrong.

You do not need to reverse the sign of the +towgs84 parameters when reversing
the direction of the transformation, so the second form you suggested (above)
is correct.  This is handled internally by PROJ.4.  The parameters should
always be expressed in a form suitable for transforming from the datum in
question to WGS84 (hence "towgs84").

That said, the parameters are clearly not being correctly inverted internally
since the elevation comes out so far from where it is supposed to be.  I will
file a bug report in bugzilla on this, but I can't promise when I will get to
fixing it. Feel free to register with bugzilla and add yourself to the cc list
so you will be notified when the bug is fixed.

   http://bugzilla.remotesensing.org/show_bug.cgi?id=194

Overall, I don't know why you can't get the correct output value, but I
imagine it is because a different mechanism is being used by IGM to express
the 7 parameters than PROJ.4 is expecting.  PROJ.4's 7 parameter datum shift
code is based on NIMA Geotrans, and apparently matches the 7 parameter parameters
as expected for method 9606 in the EPSG database.  However, there are many other
ways of expressing the transformation.  A bit more detail is available at:

   http://www.remotesensing.org/proj/gen_parms.html#towgs84

However, basically, if it doesn't work I have no idea how to transform the
parameters into a useable form.  I am sure the list would appreciate your
summarizing if you do find a solution.

Good luck,

-- 
---------------------------------------+--------------------------------------
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


----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list