Search in sources :

Example 1 with NADCON

use of org.apache.sis.internal.referencing.provider.NADCON in project sis by apache.

the class InterpolatedTransformTest method createNADCON.

/**
 * Creates a transformation from NAD27 to NAD93
 *
 * @throws FactoryException if an error occurred while loading the grid.
 */
private void createNADCON() throws FactoryException {
    final URL latitudeShifts = NADCONTest.getResourceAsConvertibleURL(NADCONTest.TEST_FILE + ".laa");
    final URL longitudeShifts = NADCONTest.getResourceAsConvertibleURL(NADCONTest.TEST_FILE + ".loa");
    final NADCON provider = new NADCON();
    final ParameterValueGroup values = provider.getParameters().createValue();
    values.parameter("Latitude difference file").setValue(latitudeShifts);
    values.parameter("Longitude difference file").setValue(longitudeShifts);
    transform = provider.createMathTransform(DefaultFactories.forBuildin(MathTransformFactory.class), values);
    tolerance = NADCONTest.ANGULAR_TOLERANCE;
    validate();
}
Also used : ParameterValueGroup(org.opengis.parameter.ParameterValueGroup) NADCON(org.apache.sis.internal.referencing.provider.NADCON) URL(java.net.URL)

Aggregations

URL (java.net.URL)1 NADCON (org.apache.sis.internal.referencing.provider.NADCON)1 ParameterValueGroup (org.opengis.parameter.ParameterValueGroup)1