question: public static String latToFileString ( float lat , int level ) { String direction ; if ( lat >= 0 ) { direction = "n" ; lat = ( float ) Math . floor ( lat ) ; } else { direction = "s" ; lat = ( float ) Math . ceil ( lat * - 1 ) ; } java . text . DecimalFormat fd = new java . text . DecimalFormat ( "00" ) ; String result = direction + fd . format ( lat ) + ".dt" + level ; return result ; }
target:  Conversion of a float latitude value and DTED level to a DTED filename. DTED filenames are based on these two factors -&lt;n/s&gt; &lt;value&gt;.dt{0,1} DTED Level 0 files are named .dt0. Level 1 and higher are named .dt1, rather than .dt{level}