NADCONTransform extends AbstractMathTransform implements MathTransform2D, Serializable { public void transform(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) { double x = srcPts[srcOff++]; double y = srcPts[srcOff++]; if (((x < grid.getMinX()) || (x > grid.getMaxX())) || ((y < grid.getMinY()) || (y > grid.getMaxY()))) { throw new TransformException("Point (" + x + " " + y + ") is not outside of ((" + grid.getMinX() + " " + grid.getMinY() + ")(" + grid.getMaxX() + " " + grid.getMaxY() + "))"); } final double xgrid = (x - grid.getMinX()) / grid.getDx(); final double ygrid = (y - grid.getMinY()) / grid.getDy(); double[] array = new double[] { xgrid, ygrid }; gridShiftTransform.transform(array, 0, array, 0, 1); dstPts[dstOff++] = x - (array[0] / SEC_2_DEG); dstPts[dstOff++] = y + (array[1] / SEC_2_DEG); 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 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); }