cdm/src/main/java/ucar/unidata/geoloc/ProjectionImpl.java
public float[][] projToLatLon(float[][] from, float[][] 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");
    }

    ProjectionPointImpl ppi = new ProjectionPointImpl();
    LatLonPointImpl llpi = new LatLonPointImpl();

    for (int i = 0; i < from[0].length; i++) {
      ppi.setLocation((double) from[0][i], (double) from[1][i]);
      projToLatLon(ppi, llpi);
      to[0][i] = (float) llpi.getLatitude();
      to[1][i] = (float) llpi.getLongitude();
    }

    return to;
  }
public float[][] projToLatLon(float[][] from, float[][] 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");
    }

    ProjectionPointImpl ppi = new ProjectionPointImpl();
    LatLonPointImpl llpi = new LatLonPointImpl();

    for (int i = 0; i < from[0].length; i++) {
      ppi.setLocation((double) from[0][i], (double) from[1][i]);
      projToLatLon(ppi, llpi);
      to[0][i] = (float) llpi.getLatitude();
      to[1][i] = (float) llpi.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