public static LatLonPoint UTMtoLL(Ellipsoid ellip,double UTMNorthing,double UTMEasting,String UTMZone,LatLonPoint llpoint){
  if (UTMZone == null || UTMZone.length() == 0) {
    return null;
  }
  int ZoneNumber=1;
  char ZoneLetter='N';
  int ln=UTMZone.length() - 1;
  if (ln > 0) {
    ZoneLetter=UTMZone.charAt(ln);
    if (!Character.isLetter(ZoneLetter)) {
      ZoneLetter='N';
      ln++;
    }
  }
  try {
    ZoneNumber=Integer.parseInt(UTMZone.substring(0,ln));
  }
 catch (  NumberFormatException nfe) {
    return null;
  }
  return UTMtoLL(ellip,UTMNorthing,UTMEasting,ZoneNumber,ZoneLetter,llpoint);
}

public static LatLonPoint UTMtoLL ( Ellipsoid ellip , double UTMNorthing , double UTMEasting , String UTMZone , LatLonPoint llpoint ) { if ( UTMZone == null || UTMZone . length ( ) == 0 ) { return null ; } int ZoneNumber = 1 ; char ZoneLetter = 'N' ; int ln = UTMZone . length ( ) - 1 ; if ( ln > 0 ) { ZoneLetter = UTMZone . charAt ( ln ) ; if ( ! Character . isLetter ( ZoneLetter ) ) { ZoneLetter = 'N' ; ln ++ ; } } try { ZoneNumber = Integer . parseInt ( UTMZone . substring ( 0 , ln ) ) ; } catch ( NumberFormatException nfe ) { return null ; } return UTMtoLL ( ellip , UTMNorthing , UTMEasting , ZoneNumber , ZoneLetter , llpoint ) ; }
converts utm coords to lat / long given an ellipsoid . this is a convenience class where the zone can be specified as a single string eg . " 60n " which is then broken down into the zonenumber and zoneletter .
