[Proj4j] ESPG:28992

Martin Davis mtnclimb at telus.net
Thu Jan 12 00:47:46 EST 2012


As is usually the case with projection issues, this is getting 
complicated...

Gertjan, in the test you give below you are using a slightly different 
+towgs string than the one in the PROJ4 definition.  However, the effect 
of the difference seems to be fairly minor. I just tested both towgs84 
definitions in Proj4J and the results are within a few mm of each 
other.  (This is *with* the towgs84 parameter conversion implemented, of 
course!)

So, it would be great if you can confirm that the value below is correct 
within mm (using some independent program?).  In that case, Proj4J seems 
to be working correctly.

Not sure why the PROJ4 value that Jeff reported was off by 30 or so 
metres, though.



On 1/11/2012 3:03 PM, Gertjan Idema wrote:
> Hi Fitz,
>
> I just wrote a test script and can confirm your result.
> 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.
>
> Apart from that, as far as I know, the +towgs should be 
> :+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812
> Applying the above calculation to the last 4 parameters as a work 
> around gives:
>   
> +towgs84=565.237,50.0087,465.658,-1.972e-6,1.7004e-6,-9.0677e-6,1.0000040812
>
> When I put this into the nad/epsg file for proj4j I thought I would 
> get the same results you got from proj, but I didn't.
> I get 155029.79163595638 463109.9538034333 for your reference point 
> instead.
>
> However, the result seems to agree with some other data I have. I'll 
> do some more research tomorrow.
>
> Gertjan Idema
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/proj4j/attachments/20120111/fbea8561/attachment-0001.html


More information about the Proj4j mailing list