Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.7, 0.8
-
None
Description
Following Java code:
GeographicCRS geographic = CommonCRS.WGS84.geographic();
GeocentricCRS geocentric = CommonCRS.WGS84.geocentric();
CRS.findOperation(geographic, geocentric, null);
fails with the following exception.
org.apache.sis.referencing.factory.InvalidGeodeticParameterException: Les transformations « Affine parametric transformation » et « Geographic/geocentric conversions » ne peuvent pas être combinées. Les dimensions des objets (2D et 3D) ne concordent pas. at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.createConcatenatedTransform(DefaultMathTransformFactory.java:1313) at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.swapAndScaleAxes(DefaultMathTransformFactory.java:1158) at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.createParameterizedTransform(DefaultMathTransformFactory.java:1058) at org.apache.sis.referencing.operation.CoordinateOperationFinder.createOperationStep(CoordinateOperationFinder.java:572) at org.apache.sis.referencing.operation.CoordinateOperationFinder.createOperation(CoordinateOperationFinder.java:272) at org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:814) at org.apache.sis.referencing.CRS.findOperation(CRS.java:644) Caused by: org.opengis.geometry.MismatchedDimensionException: Les transformations « Affine parametric transformation » et « Geographic/geocentric conversions » ne peuvent pas être combinées. Les dimensions des objets (2D et 3D) ne concordent pas. at org.apache.sis.referencing.operation.transform.ConcatenatedTransform.create(ConcatenatedTransform.java:164) at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.createConcatenatedTransform(DefaultMathTransformFactory.java:1311) ... 7 more
If we replace the call to geographic() by a call to geographic3D, then the code succeed and the converted coordinates are corrects.