Examples of addColorMapEntry()


Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        throws Exception {
        ColorMap colorMap = styleFactory.createColorMap();
        List entries = (List) node.getChildValues("ColorMapEntry");

        for (Iterator itr = entries.iterator(); itr.hasNext();) {
            colorMap.addColorMapEntry((ColorMapEntry) itr.next());
        }

        return colorMap;
    }
}
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

      if (childName == null) {
        childName = child.getNodeName();
      }

      if (childName.equalsIgnoreCase("ColorMapEntry")) {
        symbol.addColorMapEntry(parseColorMapEntry(child));
      }
    }

    return symbol;
  }
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

                  ColorMapEntry clone = new ColorMapEntryImpl();
                  clone.setColor(cm.getColorMapEntry(cm.getColorMapEntries().length - 1 - i).getColor());
                  clone.setLabel(entry.getLabel());
                  clone.setQuantity(entry.getQuantity());
                  clone.setOpacity(entry.getOpacity());
                  reverse.addColorMapEntry(clone);
                 
                }
                cm = reverse;
              }
             
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

      ColorMapEntryBuilder cme = new ColorMapEntryBuilder();
      ColorMapEntry e = cme.color(c.getColor()).opacity(c.getOpacity()).quantity(formatter.formatNumber(c.getValue())).build();
      if (c.getLabel() != null && !c.getLabel().trim().isEmpty()){
        e.setLabel(c.getLabel());
      }
      colorMap.addColorMapEntry(e);
    }
    return colorMap;
   
  }
 
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

      entries.add(e);
    }
    ColorMapEntry[] sorted = entries.toArray(new ColorMapEntry[0]);
    SingleBandEditorPage.sortEntries(sorted);
    for (int i = 0; i < sorted.length; i ++){
      colorMap.addColorMapEntry(sorted[i]);
    }
    return colorMap;
  }

  private void reverse(Color[] cls){
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

      ColorMapEntryBuilder cme = new ColorMapEntryBuilder();
      ColorMapEntry e = cme.color(c1.getColor()).opacity(c1.getOpacity()).quantity(formatter.formatNumber(c1.getValue())).build();
      if (c1.getLabel() != null && !c1.getLabel().trim().isEmpty()){
        e.setLabel(c1.getLabel());
      }
      colorMap.addColorMapEntry(e);
     
    }
    return colorMap;
  }
 
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

            ColorMapEntryImpl cme = new ColorMapEntryImpl();
            cme.setColor((Expression) builder.literal(fromColor)
                .build());
            cme.setQuantity((Expression) builder.literal(from)
                .build());
            cm.addColorMapEntry(cme);
          }
          ColorMapEntryImpl cme = new ColorMapEntryImpl();
          cme.setColor((Expression) builder.literal(toColor).build());
          cme.setQuantity((Expression) builder.literal(to).build());
          cm.addColorMapEntry(cme);
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

            cm.addColorMapEntry(cme);
          }
          ColorMapEntryImpl cme = new ColorMapEntryImpl();
          cme.setColor((Expression) builder.literal(toColor).build());
          cme.setQuantity((Expression) builder.literal(to).build());
          cm.addColorMapEntry(cme);

        } catch (NumberFormatException e) {
          SLDPlugin.log(e.getMessage(), e);
          continue;
        }
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

            ColorMapEntryImpl cme = new ColorMapEntryImpl();
            cme.setColor((Expression) builder.literal(fromColor)
                .build());
            cme.setQuantity((Expression) builder.literal(from)
                .build());
            cm.addColorMapEntry(cme);
          }
          ColorMapEntryImpl cme = new ColorMapEntryImpl();
          cme.setColor((Expression) builder.literal(toColor).build());
          cme.setQuantity((Expression) builder.literal(to).build());
          cm.addColorMapEntry(cme);
View Full Code Here

Examples of org.geotools.styling.ColorMapImpl.addColorMapEntry()

            cm.addColorMapEntry(cme);
          }
          ColorMapEntryImpl cme = new ColorMapEntryImpl();
          cme.setColor((Expression) builder.literal(toColor).build());
          cme.setQuantity((Expression) builder.literal(to).build());
          cm.addColorMapEntry(cme);
        } catch (NumberFormatException e) {
          SLDPlugin.log(e.getMessage(), e);
          continue;
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.