Coordinate Reference Systems created from the EPSG database have a wrong BursaWolf ppm parameter

Description

The parsing of the EPSG database has an issue for BursaWolf parameters: the ppm (the last parameter) is interpreted as being in microradians and having to be converted into arc seconds, although it is unitless. Thus systems created from the EPSG database which contain a Position Vector Transformation will have a ppm parameter equal to ppm_EPSG * 10e-6 / (1 / 3600.0 * Pi / 180)) instead of just being ppm_EPSG.
This can be verified by creating a system from the EPSG database, exporting it to WKT and taking a look at the last parameter of the TOWGS84 tag.
According to my analysis, this is due to a mistake in the code of setBursaWolfParameter in AbstractEpsgFactory and DirectEpsgFactory:
if (code >= 8605)
{
if (code <= 8607) target = SI .METER;
else if (code <= 8710) target = NonSI.SECOND_ANGLE;
else if (code == 8611) target = Units.PPM;
}

Code 8611 effectively corresponds to the code of the ppm parameter. But because 8611<=8710, the target for the ppm parameter is always interpreted as NonSI.SECOND_ANGLE (the line "else if (code == 8611) target = Units.PPM;" is never executed).

Environment

None

Activity

Show:
codehaus
April 10, 2015, 2:53 PM

CodeHaus Comment From: julien.carlos - Time: Thu, 24 Mar 2011 03:58:46 -0500
---------------------
Unit test which connects to the EPSG data base and tests ppm parameter

codehaus
April 10, 2015, 2:53 PM

CodeHaus Comment From: julien.carlos - Time: Thu, 24 Mar 2011 04:02:07 -0500
---------------------
I have attached a unit test for this issue. It is designed to connect to the 7.6 version of the EPSG database (the mdb Access file must be located in the same package as the test), it then creates a WGS 72 system and tests the ppm parameter contained in the BursaWolf parameter attached to the datum with the one in the database.

codehaus
April 10, 2015, 2:53 PM

CodeHaus Comment From: aaime - Time: Sun, 3 Apr 2011 08:53:03 -0500
---------------------
Thanks. The Access based factory is now completely gone form GeoTools, version 2.7.x does not have it anymore due to lack of maintainership and lack of complete support for the SQL standard, but I'll port the test over to HSQL and H2

codehaus
April 10, 2015, 2:53 PM

CodeHaus Comment From: aaime - Time: Sun, 3 Apr 2011 09:58:25 -0500
---------------------
Fixed on 2.7.x and trunk. Thanks again for the report and the test

codehaus
April 10, 2015, 2:53 PM

CodeHaus Comment From: aaime - Time: Sat, 28 May 2011 04:19:50 -0500
---------------------
Mass closing all issues that have been in "resolved" state for more than one month without further comments

Fixed

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Priority

High
Configure