use of org.apache.sis.internal.referencing.provider.Molodensky in project sis by apache.
the class MolodenskyTransformTest method testProvider.
/**
* Tests the creation through the provider.
*
* @throws FactoryException if an error occurred while creating a transform step.
* @throws TransformException if a transformation failed.
*/
@Test
@DependsOnMethod("testRandomPoints")
public void testProvider() throws FactoryException, TransformException {
final MathTransformFactory factory = new MathTransformFactoryMock(new Molodensky());
final ParameterValueGroup parameters = factory.getDefaultParameters("Molodenski");
parameters.parameter("dim").setValue(3);
parameters.parameter("dx").setValue(-3.0);
parameters.parameter("dy").setValue(142.0);
parameters.parameter("dz").setValue(183.0);
parameters.parameter("src_semi_major").setValue(6378206.4);
parameters.parameter("src_semi_minor").setValue(6356583.8);
parameters.parameter("tgt_semi_major").setValue(6378137.0);
parameters.parameter("tgt_semi_minor").setValue(6356752.31414036);
transform = factory.createParameterizedTransform(parameters);
assertEquals(3, transform.getSourceDimensions());
assertEquals(3, transform.getTargetDimensions());
tolerance = Formulas.ANGULAR_TOLERANCE * 5;
zTolerance = Formulas.LINEAR_TOLERANCE * 5;
verifyInDomain(CoordinateDomain.RANGE_10, ORDINATE_COUNT);
}
Aggregations