coordi = RAD2DD.transform(coordi);
@Override public double[] transform(double[] coord) throws IllegalCoordinateException { // Creates a temp coord to find the final translation parameters double[] coordi = coord.clone(); // Find a rough position on GRS 80 coordi = GEOC2GEOG.transform(coordi); // Get decimal degree coordinates for grid interpolation coordi = RAD2DD.transform(coordi); // Definitive translation parameters are initialized with mean // translation parameters double tx = -168.0; double ty = -60.0; double tz = 320.0; // Get the definitive translation parameters from the grids try { double[] t = GRID3D.bilinearInterpolation(coordi[0], coordi[1]); tx = t[0]; ty = t[1]; tz = t[2]; } catch (OutOfExtentException e) { throw new IllegalCoordinateException(e.getMessage()); } // Apply definitive translation coord[0] = -tx + coord[0]; coord[1] = -ty + coord[1]; coord[2] = -tz + coord[2]; return coord; }