Ejemplo n.º 1
0
 public static void main(String argv[]) {
   RTConfig.setCommandLineArgs(argv);
   InitJ1587DescriptionProvider();
   RTProperties cmdLineProps = RTConfig.getCommandLineProperties();
   long fault = EncodeFault(cmdLineProps);
   Print.sysPrintln("Fault : " + fault + " [0x" + StringTools.toHexString(fault) + "]");
   Print.sysPrintln("String: " + GetPropertyString(fault));
   Print.sysPrintln("Desc  : " + GetFaultDescription(fault, null));
 }
Ejemplo n.º 2
0
  /** ** Main entery point for debugging/testing */
  public static void main(String argv[]) {
    RTConfig.setCommandLineArgs(argv);
    Print.setAllOutputToStdout(true);
    Print.setEncoding(ENCODING_UTF8);

    /* host */
    String host = RTConfig.getString("host", null);
    if (!StringTools.isBlank(host)) {
      HOST_PRIMARY = host;
    }

    /* GeoPoint */
    GeoPoint gp = new GeoPoint(RTConfig.getString("gp", null));
    if (!gp.isValid()) {
      Print.logInfo("Invalid GeoPoint specified");
      System.exit(1);
    }
    Print.logInfo("Reverse-Geocoding GeoPoint: " + gp);

    /* Reverse Geocoding */
    Nominatim gn = new Nominatim("nominatim", null, RTConfig.getCommandLineProperties());
    Print.sysPrintln("RevGeocode = " + gn.getReverseGeocode(gp, null /*localeStr*/));
  }