Exemplo n.º 1
0
  private static String toHTML(Coordinates c, int zoom) {
    PUWG92 puwg92 = new PUWG92(c);
    UTM utm = new UTM(c);
    LatLon latLon = new LatLon(c);

    String slatLon =
        String.format("N %02.08f\u00B0 E %02.08f\u00B0", latLon.getLat(), latLon.getLon());
    String slatLonDeg =
        GeoUtils.getDegMinFormat(latLon.getLat(), true)
            + " "
            + GeoUtils.getDegMinFormat(latLon.getLon(), false);

    CoordinateDms2Format fmt = new CoordinateDms2Format(new DecimalFormatSymbols());
    String slatLonSec = "N " + fmt.format(latLon.getLat()) + " E " + fmt.format(latLon.getLon());
    String sutm =
        String.format("%s %.0f E %.0f N", utm.getZone(), utm.getEasting(), utm.getNorthing());
    String spuwg = String.format("X %06.0f   Y %06.0f", puwg92.getY(), puwg92.getX());
    String text =
        "<html>\n"
            + slatLon
            + "<br/>\n"
            +
            //			slatLonDeg+"<br/>\n"+
            //			slatLonSec+"<br/>\n"+
            spuwg
            + "<br/>\n"
            + sutm
            + "<br/>\n"
            + zoom
            + "\n</html>";
    return text;
  }