Package gml4u.model

Examples of gml4u.model.GmlLocation


   * Gets the xyz values from the given elements and returns the corresponding Vec3D
   * @param elements - List<Element>
   * @return GmlLocation
   */
  private static GmlLocation getGmlLocation(List<Element> elements) {
    GmlLocation loc = new GmlLocation();
   
    for (Element e : elements) {
      String name = e.getName();
      String value = e.getValue();

      try {
        if (name.equalsIgnoreCase("alt")) {
          loc.setLat(Long.parseLong(value));
        }
        else if (name.equalsIgnoreCase("y")) {
          loc.setLon(Long.parseLong(value));
        }
        else if (name.equalsIgnoreCase("z")) {
          loc.setAlt(Long.parseLong(value));
        }
      }
      catch (NumberFormatException ex) {
        LOGGER.log(Level.WARNING, ex.getMessage());
      }
View Full Code Here


      else if (isColor((List<Element>) element.getChildren())) {
        Integer c = getGmlColor((List<Element>) element.getChildren());
        return c;
      }
      else if (isLocation((List<Element>) element.getChildren())) {
        GmlLocation loc = getGmlLocation((List<Element>) element.getChildren());
        return loc;
      }
      else {
        // Nothing found, returning null
        LOGGER.log(Level.WARNING, "Unrecognized element type: "+element.toString());
View Full Code Here

TOP

Related Classes of gml4u.model.GmlLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.