Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.3.0, 2.4-M0
-
Fix Version/s: 2.7.6
-
Component/s: referencing
-
Labels:None
Description
Geotools currently try to select Bursa-Wolf parameters from the EPSG database using the following algorithm:
For a given source and target datum pair, we pickup the first set of parameters returned by a SQL statement that contains the following clause:
ORDER BY ABS(DEPRECATED), COORD_OP_ACCURACY, COORD_OP_CODE DESC
So deprecated parameters are last. If there is more than one non-deprecated set of parameters, the most accurate one is selected. If they all have the same accuracy, we choose the one with the highest primary key value, assuming that it is the most recently added. I admit that this last rule is not a very reliable one, but in the particular case of EPSG:4289, it seems to work.
However this algorithm lead to the selection of the following parameters for EPSG:4312 ("MGI"):
TOWGS84[426.9, 142.6, 460.1, 4.91, 4.49, -12.42, 3.5271281868253483]
This seem to be the values for Slovenia. The expected values should be:
TOWGS84[577.326, 90.129, 463.919, 5.1365988, 1.4742, 5.2970436, 2.4232]
This is in EPSG 6.12, Coordinate Transformation 1618: MGI to WGS 84 (3). The same issue apply to all projected CRS derived from the 4312 geographic CRS, like EPSG:31286
We need to improve the way Geotools selects the set of Bursa-Wolf parameters. Just looking at the source and target datum is not suffisient.
We also need a mechanism that warn the user when more than one set of Bursa-Wolf parameters were found for a given geographic CRS, so the user know that the set selected by Geotools may not be the most appropriate one. We also need a mechanism for forcing the selection of a particular set of Bursa-Wolf parameters, to override the automatic selection.
Issue Links
- is related to
-
GEOS-1783
override an existing EPSG definition in the property file
-
what is the suggested workaround until the problem will be solved?
for the moment I am using the gt2-epsg-wkt-2.X.X.jar with correct TOWGS84 section added to all PROJCS based on Datum Austria.
thanks
Peter