cdm/src/main/java/ucar/unidata/geoloc/ProjectionImpl.java
public double[][] projToLatLon(double[][] from, double[][] to) {
    if ((from == null) || (from.length != 2)) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "null array argument or wrong dimension (from)");
    }
    if ((to == null) || (to.length != 2)) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "null array argument or wrong dimension (to)");
    }

    if (from[0].length != to[0].length) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "from array not same length as to array");
    }

    for (int i = 0; i < from[0].length; i++) {
      LatLonPoint endL = projToLatLon(from[0][i], from[1][i]);
      to[0][i] = endL.getLatitude();
      to[1][i] = endL.getLongitude();
    }

    return to;
  }
public double[][] projToLatLon(double[][] from, double[][] to) {
    if ((from == null) || (from.length != 2)) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "null array argument or wrong dimension (from)");
    }
    if ((to == null) || (to.length != 2)) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "null array argument or wrong dimension (to)");
    }

    if (from[0].length != to[0].length) {
      throw new IllegalArgumentException("ProjectionImpl.projToLatLon:"
              + "from array not same length as to array");
    }

    for (int i = 0; i < from[0].length; i++) {
      LatLonPoint endL = projToLatLon(from[0][i], from[1][i]);
      to[0][i] = endL.getLatitude();
      to[1][i] = endL.getLongitude();
    }

    return to;
  }
public double [ ] [ ] projToLatLon ( double [ ] [ ] from , double [ ] [ ] to ) { if ( ( from == null ) || ( from . length != 2 ) ) { throw new IllegalArgumentException ( "ProjectionImpl.projToLatLon:" + "null array argument or wrong dimension (from)" ) ; } if ( ( to == null ) || ( to . length != 2 ) ) { throw new IllegalArgumentException ( "ProjectionImpl.projToLatLon:" + "null array argument or wrong dimension (to)" ) ; } if ( from [ 0 ] . length != to [ 0 ] . length ) { throw new IllegalArgumentException ( "ProjectionImpl.projToLatLon:" + "from array not same length as to array" ) ; } for ( int i = 0 ; i < from [ 0 ] . length ; i ++ ) { LatLonPoint endL = projToLatLon ( from [ 0 ] [ i ] , from [ 1 ] [ i ] ) ; to [ 0 ] [ i ] = endL . getLatitude ( ) ; to [ 1 ] [ i ] = endL . getLongitude ( ) ; } return to ; }
Convert projection coordinates to lat/lon coordinate.

@param from array of projection coordinates: from[2][n], where
(from[0][i], from[1][i]) is the (x, y) coordinate
of the ith point
@param to   resulting array of lat/lon coordinates: to[2][n] where
(to[0][i], to[1][i]) is the (lat, lon) coordinate of
the ith point
@return the "to" array
Convert projection coordinates to lat / lon coordinate .