GeocentricAffine.asDatumShift(transforms); return transforms;
if (isOperation(GeographicToGeocentric.NAME, transforms.get(i)) && isOperation(GeocentricToGeographic.NAME, transforms.get(i+2))) log(Loggers.WKT, "asDatumShift", e); continue; final Parameters values = createParameters(isTranslation ? GeocentricTranslation.PARAMETERS : PositionVector7Param.PARAMETERS, parameters, isTranslation); transforms.set(i+1, new FormattableObject() {
/** * Creates a transformation for the given method. * * @param method the method to test. */ private void create(final GeocentricAffine method) throws FactoryException { final ParameterValueGroup values = method.getParameters().createValue(); setTranslation(values); if (method instanceof GeocentricAffineBetweenGeographic) { setEllipsoids(values, CommonCRS.WGS84.ellipsoid(), CommonCRS.ED50.ellipsoid()); } transform = method.createMathTransform(DefaultFactories.forBuildin(MathTransformFactory.class), values); }
final MathTransform affine = super.createMathTransform(factory, pv);
parameters.setPositionVectorTransformation(datumShift, BURSAWOLF_TOLERANCE); } catch (IllegalArgumentException e) { log(Loggers.COORDINATE_OPERATION, "createParameters", e); return null; } else { final Parameters values = createParameters(descriptor, parameters, isTranslation); switch (method) { case MOLODENSKY:
final Parameters pv = Parameters.castOrWrap(values); boolean reverseRotation = false; switch (getType()) { default: throw new AssertionError(); case FRAME_ROTATION: reverseRotation = true; // Fall through
parameters = GeocentricAffine.createParameters(sourceCS, targetCS, datumShift, preferredMethod); if (parameters == null) {
/** * Creates the transformation from WGS 72 to WGS 84. * * @param method the operation method to use. * @param rotationSign {@code +1} for Position Vector, or -1 for Frame Rotation. */ static MathTransform createTransform(final GeocentricAffine method, final int rotationSign) throws FactoryException { final ParameterValueGroup values = method.getParameters().createValue(); values.parameter("Z-axis translation").setValue(+4.5 ); // metres values.parameter("Z-axis rotation") .setValue(+0.554 * rotationSign); // arc-seconds values.parameter("Scale difference") .setValue(+0.219); // parts per million if (method instanceof GeocentricAffineBetweenGeographic) { GeocentricTranslationTest.setEllipsoids(values, CommonCRS.WGS72.ellipsoid(), CommonCRS.WGS84.ellipsoid()); } return method.createMathTransform(DefaultFactories.forBuildin(MathTransformFactory.class), values); }
final MathTransform affine = super.createMathTransform(factory, pv);
parameters.setPositionVectorTransformation(datumShift, BURSAWOLF_TOLERANCE); } catch (IllegalArgumentException e) { log(Loggers.COORDINATE_OPERATION, "createParameters", e); return null; } else { final Parameters values = createParameters(descriptor, parameters, isTranslation); switch (method) { case MOLODENSKY:
final Parameters pv = Parameters.castOrWrap(values); boolean reverseRotation = false; switch (getType()) { default: throw new AssertionError(); case FRAME_ROTATION: reverseRotation = true; // Fall through
parameters = GeocentricAffine.createParameters(sourceCS, targetCS, datumShift, preferredMethod); if (parameters == null) {
if (isOperation(GeographicToGeocentric.NAME, transforms.get(i)) && isOperation(GeocentricToGeographic.NAME, transforms.get(i+2))) log(Loggers.WKT, "asDatumShift", e); continue; final Parameters values = createParameters(isTranslation ? GeocentricTranslation.PARAMETERS : PositionVector7Param.PARAMETERS, parameters, isTranslation); transforms.set(i+1, new FormattableObject() {
GeocentricAffine.asDatumShift(transforms); return transforms;