NTv2Transform extends AbstractMathTransform implements MathTransform2D, Serializable { @Override public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException { bidirectionalTransform(srcPts,srcOff, dstPts, dstOff, numPts, true); } NTv2Transform(URI file); @Override int hashCode(); @Override boolean equals(final Object object); @Override synchronized MathTransform2D inverse(); @Override void transform(double[] srcPts, int srcOff, double[] dstPts,
            int dstOff, int numPts); void inverseTransform(double[] srcPts, int srcOff, double[] dstPts,
            int dstOff, int numPts); @Override int getSourceDimensions(); @Override int getTargetDimensions(); @Override ParameterValueGroup getParameterValues();  }
@Test public void testTransform() throws TransformException { double[] p = new double[2]; transform.transform(TEST_POINT_SRC, 0, p, 0, 1); assertEquals(p[0], TEST_POINT_DST[0], TOLERANCE); assertEquals(p[1], TEST_POINT_DST[1], TOLERANCE); }
@Test public void testTransformTranslated() throws TransformException { double[] src = new double[4]; double[] dst = new double[4]; src[2] = TEST_POINT_SRC[0]; src[3] = TEST_POINT_SRC[1]; transform.transform(src, 2, dst, 2, 1); assertEquals(0, dst[0], TOLERANCE); assertEquals(0, dst[1], TOLERANCE); assertEquals(dst[2], TEST_POINT_DST[0], TOLERANCE); assertEquals(dst[3], TEST_POINT_DST[1], TOLERANCE); }