cdm/src/main/java/ucar/unidata/geoloc/projection/AlbersEqualArea.java
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result) {
    double toLat, toLon;
    double fromX = world.getX() - falseEasting;
    double fromY = world.getY() - falseNorthing;
    double rrho0 = rho0;

    if (n < 0) {
      rrho0 *= -1.0;
      fromX *= -1.0;
      fromY *= -1.0;
    }

    double yd = rrho0 - fromY;
    double rho = Math.sqrt(fromX * fromX + yd * yd);
    double theta = Math.atan2(fromX, yd);
    if (n < 0) {
      rho *= -1.0;
    }
    toLat = Math.toDegrees(Math.asin((C - Math.pow((rho * n / earth_radius), 2)) / (2 * n)));

    toLon = Math.toDegrees(theta / n + lon0);

    result.setLatitude(toLat);
    result.setLongitude(toLon);
    return result;
  }
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result) {
    double toLat, toLon;
    double fromX = world.getX() - falseEasting;
    double fromY = world.getY() - falseNorthing;
    double rrho0 = rho0;

    if (n < 0) {
      rrho0 *= -1.0;
      fromX *= -1.0;
      fromY *= -1.0;
    }

    double yd = rrho0 - fromY;
    double rho = Math.sqrt(fromX * fromX + yd * yd);
    double theta = Math.atan2(fromX, yd);
    if (n < 0) {
      rho *= -1.0;
    }
    toLat = Math.toDegrees(Math.asin((C - Math.pow((rho * n / earth_radius), 2)) / (2 * n)));

    toLon = Math.toDegrees(theta / n + lon0);

    result.setLatitude(toLat);
    result.setLongitude(toLon);
    return result;
  }
public LatLonPoint projToLatLon ( ProjectionPoint world , LatLonPointImpl result ) { double toLat , toLon ; double fromX = world . getX ( ) - falseEasting ; double fromY = world . getY ( ) - falseNorthing ; double rrho0 = rho0 ; if ( n < 0 ) { rrho0 *= - 1.0 ; fromX *= - 1.0 ; fromY *= - 1.0 ; } double yd = rrho0 - fromY ; double rho = Math . sqrt ( fromX * fromX + yd * yd ) ; double theta = Math . atan2 ( fromX , yd ) ; if ( n < 0 ) { rho *= - 1.0 ; } toLat = Math . toDegrees ( Math . asin ( ( C - Math . pow ( ( rho * n / earth_radius ) , 2 ) ) / ( 2 * n ) ) ) ; toLon = Math . toDegrees ( theta / n + lon0 ) ; result . setLatitude ( toLat ) ; result . setLongitude ( toLon ) ; return result ; }
Convert projection coordinates to a LatLonPoint
Note: a new object is not created on each call for the return value.

@param world  convert from these projection coordinates
@param result the object to write to
@return LatLonPoint convert to these lat/lon coordinates
Convert projection coordinates to a LatLonPoint Note : a new object is not created on each call for the return value .