NADCONTransform extends AbstractMathTransform implements MathTransform2D, Serializable { public void inverseTransform(final double[] srcPts, int srcOff, final double[] dstPts, int dstOff, int numPts) throws TransformException { int step = 0; if ((srcPts == dstPts) && (srcOff < dstOff) && ((srcOff + (numPts * getSourceDimensions())) > dstOff)) { step = -getSourceDimensions(); srcOff -= ((numPts - 1) * step); dstOff -= ((numPts - 1) * step); } while (--numPts >= 0) { final double x = srcPts[srcOff++]; final double y = srcPts[srcOff++]; double xtemp = x; double ytemp = y; for (int i = MAX_ITER;;) { double[] array = { xtemp, ytemp }; transform(array, 0, array, 0, 1); double xdif = array[0] - x; double ydif = array[1] - y; if (Math.abs(xdif) > TOL) { xtemp = xtemp - xdif; } if (Math.abs(ydif) > TOL) { ytemp = ytemp - ydif; } if ((Math.abs(xdif) <= TOL) && (Math.abs(ydif) <= TOL)) { dstPts[dstOff++] = xtemp; dstPts[dstOff++] = ytemp; break; } if (--i < 0) { throw new TransformException(Errors.format(ErrorKeys.NO_CONVERGENCE)); } } srcOff += step; dstOff += step; } } NADCONTransform(final URI latGridName, final URI longGridName); ParameterDescriptorGroup getParameterDescriptors(); @Override ParameterValueGroup getParameterValues(); int getSourceDimensions(); int getTargetDimensions(); void transform(final double[] srcPts, int srcOff,
        final double[] dstPts, int dstOff, int numPts); void inverseTransform(final double[] srcPts, int srcOff,
        final double[] dstPts, int dstOff, int numPts); @Override synchronized MathTransform2D inverse(); @Override int hashCode(); @Override boolean equals(Object object); static void main(String[] args);  }
@Test public void testInverseTransform() throws TransformException { double[] p = new double[2]; transform.inverseTransform(TEST_POINT_DST, 0, p, 0, 1); assertEquals(p[0], TEST_POINT_SRC[0], TOLERANCE); assertEquals(p[1], TEST_POINT_SRC[1], TOLERANCE); }