Package org.geotools.styling

Examples of org.geotools.styling.ShadedReliefImpl


    return symbol;
  }

  /** Internal parse method - made protected for unit testing */
  protected ShadedRelief parseShadedRelief(Node root) {
    ShadedRelief symbol = new ShadedReliefImpl();

    NodeList children = root.getChildNodes();
    final int length = children.getLength();
    for (int i = 0; i < length; i++) {
      Node child = children.item(i);

      if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
        continue;
      }
      String childName = child.getLocalName();
      if (childName == null) {
        childName = child.getNodeName();
      }
      if ("BrightnessOnly".equalsIgnoreCase(childName)) {
        symbol.setBrightnessOnly(Boolean
            .getBoolean(getFirstChildValue(child)));
      } else if ("ReliefFactor".equalsIgnoreCase(childName)) {
        try {
          final String reliefString = getFirstChildValue(child);
          Expression relief = ExpressionDOMParser
              .parseExpression(child);
          symbol.setReliefFactor(relief);
        } catch (Exception e) {
          if (LOGGER.isLoggable(Level.WARNING))
            LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
        }
      }
View Full Code Here

TOP

Related Classes of org.geotools.styling.ShadedReliefImpl

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.