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

jeff fitzgerald jeffery.fitzgerald at gmail.com
Thu Jan 12 06:40:49 EST 2012


I've been using proj4j for probably over a year now, and this is the first
problem I've run into.

Thanks for a much needed project and great support.

Fitz

On Thu, Jan 12, 2012 at 1:52 AM, Martin Davis <mtnclimb at telus.net> wrote:

>  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
>
>
> _______________________________________________
> Proj4j mailing list
> Proj4j at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/proj4j
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/proj4j/attachments/20120112/fd728508/attachment.html


More information about the Proj4j mailing list