[OSRS-PROJ] cs2cs and datum shift: my solution

Roberto Vidmar rvidmar at ogs.trieste.it
Tue Aug 27 02:01:14 PDT 2002


Frank,

  maybe I got the solution.

 From 
http://www.posc.org/Epicentre.2_2/DataModel/ExamplesofUsage/eu_cs35.html 
I got the formulae that I supposed you used in pj_transform.c.

I changed x_out calculation from

  x_out = M_BF*(       x[io] - Rz_BF*y[io] + Ry_BF*z[io]) + Dx_BF;

to

x_out = M_BF*(       x[io] - Rz_BF*y[io] + Rx_BF*z[io]) + Dx_BF;

in pj_geocentic_to_wgs84()

and in the same way
/*            x_out = M_BF*(       x[io] + Rz_BF*y[io] - Ry_BF*z[io]) - 
Dx_BF;
 */
            x_out = M_BF*(       x[io] + Rz_BF*y[io] - Rx_BF*z[io]) - Dx_BF;
in pj_geocentic_from_wgs84()

Now my test

cs2cs +proj=latlong +datum=WGS84\
 +to \
 +proj=latlong +ellps=intl \
 +towgs84=10,20,30,1,2,3,444 \
 bb | \
cs2cs -I +proj=latlong +datum=WGS84\
 +to \
 +proj=latlong +ellps=intl  \
 +towgs84=10,20,30,1,2,3,-443.80295 (thanks to Duncan Agnew)

with the bb file being:
11 45 77

gives:
11d0'0.001"E    45d0'0.001"N 77.024

Now I will go on playing with my Abbazia Pisani point, trying to add a 
longitude constant shift to output coordinates in some way as the Roma40 
datum counts longitude starting from Monte Mario :-(

Tanks to the whole community for all the help you sent so quickly. I did 
not send my solution to bugzilla because I'm not (yet!) used to it.

Roberto

-- 
------------------------------------
                                                             
Roberto Vidmar 
  ___  __  __    OCEANOGRAFIA
 /  / /__ /__    GEOFISICA
/__/ /__/ __/    SPERIMENTALE
                                   
Istituto Nazionale di Oceanografia e
di Geofisica Sperimentale
34010 Sgonico (TS) ITALY

Research Group: CARS
(CArtography and Remote Sensing)

Tel. +39 040 2140 336 direct
Tel. +39 040 2140 1  operator

 E-mail: rvidmar at inogs.it
------------------------------------



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



More information about the Proj mailing list