* datum shift methods, since the conversion from ellipsoid to geocentric
* for "geocentric translations" is implicit in the EPSG database. Even in
* the case of Molodenski transforms, the axis length to set are the same.
*/
if (isBursaWolf) try {
Ellipsoid ellipsoid = CRSUtilities.getHeadGeoEllipsoid(sourceCRS);
if (ellipsoid != null) {
final Unit axisUnit = ellipsoid.getAxisUnit();
parameters.parameter("src_semi_major").setValue(ellipsoid.getSemiMajorAxis(), axisUnit);
parameters.parameter("src_semi_minor").setValue(ellipsoid.getSemiMinorAxis(), axisUnit);
parameters.parameter("src_dim").setValue(sourceCRS.getCoordinateSystem().getDimension());
}
ellipsoid = CRSUtilities.getHeadGeoEllipsoid(targetCRS);
if (ellipsoid != null) {
final Unit axisUnit = ellipsoid.getAxisUnit();
parameters.parameter("tgt_semi_major").setValue(ellipsoid.getSemiMajorAxis(), axisUnit);
parameters.parameter("tgt_semi_minor").setValue(ellipsoid.getSemiMinorAxis(), axisUnit);
parameters.parameter("tgt_dim").setValue(targetCRS.getCoordinateSystem().getDimension());
}
} catch (ParameterNotFoundException exception) {
result.close();
throw new FactoryException(Errors.format(