[Proj4j] Fix for +towgs rotation and scaling parameter conversion committed

Martin Davis mtnclimb at telus.net
Thu Jan 12 00:52:44 EST 2012


I have committed a fix for this to SVN.  Thanks for noticing this!

On 1/11/2012 3:03 PM, Gertjan Idema wrote:
> Then I remembered that there was a difference between proj (c-version) 
> and proj4j in handling the +towgs parameters.
> The c version has some conversion code for parameters 4-7.
> Parameters 4-6 get converted from arc seconds to radians. 
> (param=param*pi/180/3600)
> Parameter 7 gets converted from ppm to scaling factor 
> (param=1+param/1000000)
>
> Here's the code from pj_datum_set.c:
>   /* transform from arc seconds to radians */
>   projdef->datum_params[3] *= SEC_TO_RAD;
>   projdef->datum_params[4] *= SEC_TO_RAD;
>   projdef->datum_params[5] *= SEC_TO_RAD;
>   /* transform from parts per million to scaling factor */
>   projdef->datum_params[6] =  (projdef->datum_params[6]/1000000.0) + 1;
>
> This code seems to be missing in proj4j 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/proj4j/attachments/20120111/57d24e67/attachment.html


More information about the Proj4j mailing list